文件名称:TIMER
- 所属分类:
- 微处理器(ARM/PowerPC等)
- 资源属性:
- [C/C++] [源码]
- 上传时间:
- 2013-08-02
- 文件大小:
- 137kb
- 下载次数:
- 0次
- 提 供 者:
- 宋**
- 相关连接:
- 无
- 下载说明:
- 别用迅雷下载,失败请重下,重下不扣分!
介绍说明--下载内容均来自于网络,请自行研究使用
6. 定时器程序设计与电路仿真
LPC2138微控制器具有两个32位定时器,分别具有4路捕获收入,4路匹配比较输出,定时器是增量计数的,但溢出时并不会使中断标志置位,而只能通过比较匹配或捕获输入产生中断标志。
定义LED的输出端口,设置所有的引脚连接,使用IO0DIR寄存器定义LED控制口的输出,初始化定时器0,设置定时器0的分频、比较值。等待定时时间到,清除中断标志,通过IO0SET、IO0CLR寄存器控制LED的亮灭。
-6 Timer program design and circuit simulation LPC2138 microcontroller has two 32-bit timers, each with 4 capture revenue, four matched comparison output, the timer count is incremental, but does not cause overflow interrupt flag is set, but only by compare match or input capture interrupt flag. Definition LED output ports, set all the pin connections, use IO0DIR Register Definition LED control output port, initialize the timer 0, set the timer 0 prescaler compare values. Wait regular time to clear the interrupt flag, through IO0SET, IO0CLR registers control the LED light off.
LPC2138微控制器具有两个32位定时器,分别具有4路捕获收入,4路匹配比较输出,定时器是增量计数的,但溢出时并不会使中断标志置位,而只能通过比较匹配或捕获输入产生中断标志。
定义LED的输出端口,设置所有的引脚连接,使用IO0DIR寄存器定义LED控制口的输出,初始化定时器0,设置定时器0的分频、比较值。等待定时时间到,清除中断标志,通过IO0SET、IO0CLR寄存器控制LED的亮灭。
-6 Timer program design and circuit simulation LPC2138 microcontroller has two 32-bit timers, each with 4 capture revenue, four matched comparison output, the timer count is incremental, but does not cause overflow interrupt flag is set, but only by compare match or input capture interrupt flag. Definition LED output ports, set all the pin connections, use IO0DIR Register Definition LED control output port, initialize the timer 0, set the timer 0 prescaler compare values. Wait regular time to clear the interrupt flag, through IO0SET, IO0CLR registers control the LED light off.
(系统自动生成,下载前可以参看下载内容)
下载文件列表
TIMER\CONFIG.H
.....\HEAP.S
.....\IRQ.S
.....\Last Loaded TIMELED.DBK
.....\Last Loaded TIMER.DBK
.....\LPC2138.H
.....\main.C
.....\main.crf
.....\main.d
.....\main.i
.....\main.o
.....\main.txt
.....\STACK.S
.....\Startup.lst
.....\Startup.o
.....\Startup.s
.....\TARGET.C
.....\TARGET.H
.....\timeled.crf
.....\timeled.d
.....\timeled.o
.....\TIMELED.PWI
.....\TIMER.axf
.....\TIMER.DSN
.....\TIMER.hex
.....\TIMER.htm
.....\TIMER.lnp
.....\TIMER.map
.....\TIMER.Opt
.....\TIMER.plg
.....\TIMER.PWI
.....\TIMER.sct
.....\TIMER.tra
.....\TIMER.Uv2
.....\timerout.PWI
.....\TIMER_Opt.Bak
.....\TIMER_Target 1.dep
.....\TIMER_Uv2.Bak
TIMER