文件名称:6_PWM_LED
- 所属分类:
- 单片机(51,AVR,MSP430等)
- 资源属性:
- [C/C++] [源码]
- 上传时间:
- 2014-07-25
- 文件大小:
- 152kb
- 下载次数:
- 0次
- 提 供 者:
- 林**
- 相关连接:
- 无
- 下载说明:
- 别用迅雷下载,失败请重下,重下不扣分!
介绍说明--下载内容均来自于网络,请自行研究使用
TA(Timer_A定时器)可用于自动输出PWM而无需CPU干预。
编写PWM初始化、设定频率改写占空比的库函数文件TA _PWM.c。
主函数调用库函数TA0_PWM_Init()完成TA_PWM初 始化,然后休眠。
P1.3事件处理函数中,循环递增静态局部变量循环递增静态局部变量 Bright的值,并调用库函数TA0_PWM_SetPeriod()改写PWM占空比参数。-TA (Timer_A timer) can be used for the automatic output of PWM without CPU intervention.
Preparation of PWM initialization, set the frequency to rewrite the duty ratio of the library file TA _PWM.c.
The main function call library function TA0_PWM_Init (TA_PWM) to complete the initialization, and then sleep.
Function P1.3 event processing, circulation increasing static local variable cycle increasing value of the static local variable Bright, and call the library function TA0_PWM_SetPeriod () to rewrite the PWM duty cycle parameters.
编写PWM初始化、设定频率改写占空比的库函数文件TA _PWM.c。
主函数调用库函数TA0_PWM_Init()完成TA_PWM初 始化,然后休眠。
P1.3事件处理函数中,循环递增静态局部变量循环递增静态局部变量 Bright的值,并调用库函数TA0_PWM_SetPeriod()改写PWM占空比参数。-TA (Timer_A timer) can be used for the automatic output of PWM without CPU intervention.
Preparation of PWM initialization, set the frequency to rewrite the duty ratio of the library file TA _PWM.c.
The main function call library function TA0_PWM_Init (TA_PWM) to complete the initialization, and then sleep.
Function P1.3 event processing, circulation increasing static local variable cycle increasing value of the static local variable Bright, and call the library function TA0_PWM_SetPeriod () to rewrite the PWM duty cycle parameters.
(系统自动生成,下载前可以参看下载内容)
下载文件列表
6_PWM_LED\6_PWM_LED.dep
.........\6_PWM_LED.ewd
.........\6_PWM_LED.ewp
.........\6_PWM_LED.eww
.........\6_PWM_LEDCustomSfr.sfr
.........\Debug\Exe\6_PWM_LED.d43
.........\.....\Obj\6_PWM_LED.pbd
.........\.....\...\6_PWM_LED.pbd.browse
.........\.....\...\main.pbi
.........\.....\...\main.pbi.cout
.........\.....\...\main.r43
.........\.....\...\TA_PWM.pbi
.........\.....\...\TA_PWM.pbi.cout
.........\.....\...\TA_PWM.r43
.........\main.c
.........\path.txt
.........\settings\6_PWM_LED.cspy.bat
.........\........\6_PWM_LED.dbgdt
.........\........\6_PWM_LED.dni
.........\........\6_PWM_LED.wsdt
.........\TA_PWM.c
.........\TA_PWM.h
.........\Debug\Exe
.........\.....\List
.........\.....\Obj
.........\Debug
.........\settings
6_PWM_LED