M
1
6
C
2 /
6
A
G
o r
u
p
(
M
1
6
12. Timer
Note
The TB2IN pin is not available in the 42-pin package. Do not use functions associated with the TB2IN
pin.
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
f
8
32
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
F
e
b
1 .
, 5
2
0
0
7
R
E
J
0
9
B
0
2
0
2
0 -
2
0
0
C
2 /
6
, A
M
1
6
C
2 /
6
, B
M
1
6
f
2
PCLK0 bit = "0"
1/2
f
1 or
PCLK0 bit = "1"
f
8
1/8
f
1/4
32
f
C32
Noise
filter
Noise
filter
Noise
filter
Noise
filter
Noise
filter
Timer B2 overflow or underflow
page 92
f o
3
2
9
C
2 /
6
) T
f
2
X
CIN
Set the CPSR bit in the
CPSRF register to "1"
(= 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