Setting Procedure For Pulse Width Measurement - NEC PD78212 User Manual

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

Advertisement

µ PD78214 Sub-Series
196
(c) Timer control register 1 (TMC1)
7
6
5
TMC1
1
0
0
(d) External interrupt mode register 0 (INTM0)
7
6
5
×
×
INTM0
1
Fig. 7-105 Setting Procedure for Pulse Width Measurement
Set INTM0 register and
MK0L register
Initialize buffer memory for capture value
4
3
2
1
×
×
0
0
4
3
2
1
×
×
1
0
Pulse width
measurement
Set CRC1 register
CRC2←10H
←0
X
0
Set TMC1 register
CE2←1
CMD2←0
Enable interrupt
INTP1 interrupt
0
0
Normal mode
Overflow flag
Enables counting
0
×
Specifies valid edge of INTP1 input
to be rising and falling edges
; Specifies valid edge of
INTP1 input to be both
edges and unmasks interrupt
; Sets bit 7 of TMC1 to 1
Sets normal mode (CMD2 = 0)

Advertisement

Table of Contents
loading

Table of Contents