Chapter 7 timer/counter units – NEC PD78214 User Manual
Page 220

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)
7
6
5
4
3
2
1
0
0
0
0
0
0
1
CRC0
0
0
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
CE2
←1
CMD2
←0
CRC2
←10H
CR20
←n
Set PRM1 register
7
6
5
4
3
2
1
0
PRS23
×
0
PRM1
Specifies count clock
(x/f
CLK
; where x = 16, 32, 64,
128, 256, 512,
or external clock)
PRS22 PRS21 PRS20
Ч
Ч
7
6
5
4
3
2
1
0
1
0
0
0
Ч
0
0
TMC1
×
Normal mode
Overflow flag
Enables counting