62 7.1 Timer0
CW6632B Bluetooth 3.0 Audio Player SOC Version 1.0.0
Copyright ©2015, www.appotech.com. All Rights Reserved.
7 Timers
7.1 Timer0
Timer0 is an 8-bit timer/counter with a 7-bit prescaler. It can be configured as timer, counter or PWM generator. X
7.1.1 Timer0 Features
8bits counter
7bits pre-scaler
Counter mode (clock source from system clock or TMR0)
Capture mode (event source from CAP0)
PWM mode (PWM signal output to PWM0)
7.1.2 Timer0 Special Function Registers
Register 7-1 TMR0CON – Timer0 control
T0PND: Timer0 Pending Flag
0 = Not Pending
1 = Pending
T0ES: Timer0 Capture Mode Edge Select
0 = CAP0 Rising Edge
1 = CAP0 Falling Edge
T0M: Timer0 Mode
00 = Timer0 is disabled
01 = Timer0 is enabled and works in Counter Mode
10 = Timer0 is enabled and works in PWM Mode
11 = Timer0 is enabled and works in Capture Mode
T0IS: Timer0 Increase Source
0 = Select system clock cycle
1 = Select TMR0 rising edge
T0PSR: Timer0 Prescaler
000 = Timer0 counts at every counting source event
001 = Timer0 counts at every 2 counting source events
010 = Timer0 counts at every 4 counting source events
011 = Timer0 counts at every 8 counting source events