Setting Of Control Registers For Interval Timer Operation (1); Setting Procedure For Interval Timer Operation (1) - NEC PD78212 User Manual

8-bit single-chip microcomputer sub-series
Table of Contents

Advertisement

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

Advertisement

Table of Contents
loading

Table of Contents