M
1
6
C
2 /
8
G
o r
u
p
(
M
1
6
C
12. Timer
Eight 16-bit timers, each capable of operating independently of the others, can be classified by function as
either timer A (five) and timer B (three). The count source for each timer acts as a clock, to control such
timer operations as counting, reloading, etc. Figures 12.1 and 12.2 show block diagrams of timer A and
timer B configuration, respectively.
• Main clock
f
1
• PLL clock
• On-chip oscillator
clock
f
f
f
8
1 or
2
TA0
IN
TA1
IN
TA2
IN
TA3
IN
TA4
IN
Figure 12.1 Timer A Configuration
R
e
. v
2
0 .
0
J
a
. n
3
, 1
2
0
0
7
R
E
J
0
9
B
0
0
4
7
0 -
2
0
0
2 /
, 8
M
1
6
C
2 /
8
) B
f
2
PCLK0 bit = 0
1/2
f
PCLK0 bit = 1
f
1/8
f
1/4
f
f
32
C32
Noise
filter
Noise
filter
Noise
filter
Noise
filter
Noise
filter
Timer B2 overflow or underflow
page 98
f o
3
8
5
f
1 or
2
X
CIN
8
Set the CPSR bit in the
CPSRF register to "1"
32
(prescaler reset)
• Timer mode
• One-shot timer mode
• Pulse Width Measuring (PWM) mode
• Event counter mode
• Timer mode
• One-shot timer mode
• PWM mode
• Event counter mode
• Timer mode
• One-shot timer mode
• PWM mode
• Event counter mode
• Timer mode
• One-shot timer mode
• PWM mode
• Event counter mode
• Timer mode
• One-shot timer mode
• PWM mode
• Event counter mode
Clock prescaler
f
1/32
C32
Reset
Timer A0 interrupt
Timer A0
Timer A1 interrupt
Timer A1
Timer A2 interrupt
Timer A2
Timer A3 interrupt
Timer A3
Timer A4 interrupt
Timer A4
12. Timer