2014年4月2日 星期三

CC2530 8051 TIMER1 (16-Bit Timer) - Free-Running,Modulo,Up/Down Mode

CC2530 8051 TIMER1 (16-Bit Timer) 

Free-Running Mode
Free-Running Mode to control the R-LED ON / OFF

Timer1 starts counting from 0x0000 to 0xFFFF
An interrupt is generated when Timer1 count to 0xFFFF
An interrupt is generated the R-LED status changes and Timer1 recount

An interrupt is generated every 32.76ms 
65535(0xFFFF) / (16Mhz / 8) = 32.76 ms

Modulo Mode
Modulo Mode to control the R-LED ON / OFF

Timer1 starts counting from 0x0000 to T1CC0 
An interrupt is generated when Timer1 count to T1CC0
An interrupt is generated the R-LED status changes and Timer1 recount

T1CC0 = 0x7FFF 
An interrupt is generated every 16.38 ms 
32767(0x7FFF) / (16Mhz / 8) = 16.38 ms

Up/Down Mode
Up/Down Mode to control the R-LED ON / OFF

Timer1 starts counting from 0x0000 to T1CC0
When Timer1 count to T1CC0,TIMER1 will reverse counting from T1CC0 to 0x0000 
An interrupt is generated when reverse count to 0x0000
An interrupt is generated the R-LED status changes and Timer1 recount

T1CC0 = 0xFFFF
An interrupt is generated every 65.52ms 
65535(0xFFFF) x 2 / (16Mhz / 8) = 65.52ms




沒有留言:

張貼留言