191
Chapter 7 Timer/Counter Units
7
Fig. 7-97 Setting of Control Registers for Interval Timer Operation (1)
(a) Prescaler mode register 1 (PRM1)
(b) Capture /compare control register 0 (CRC0)
76543210
000 0
0
1
CRC0 00
Disables clearing TM2
Both TO2 and TO3 are used for
toggle output
(c) Timer control register 1 (TMC1)
Fig. 7-98 Setting Procedure for Interval Timer Operation (1)
Interval timer (1)
Set count value in CR20 register
Set CRC2 register
Set TMC1 register ; Sets bit 7 of TMC1 to 1
Sets normal mode (CMD2 = 0)
INTC20 interrupt
CE21
CMD20
CRC210H
CR20n
Set PRM1 register
76543210
PRS23 ×
0
PRM1
Specifies count clock
(x/fCLK; where x = 16, 32, 64,
128, 256, 512,
or external clock)
PRS22 PRS21 PRS20 ××
76543210
100 0
×0
0
TMC1 ×
Normal mode
Overflow flag
Enables counting