Setting Procedure For Pulse Width Measurement; Interrupt Request Handling For Pulse Width Calculation - NEC PD78212 User Manual

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

Advertisement

µ PD78214 Sub-Series
7
INTM1
0
Fig. 7-34 Interrupt Request Handling for Pulse Width Calculation
134
(c) External interrupt mode register 1 (INTM1)
6
5
4
3
×
×
×
0
Fig. 7-33 Setting Procedure for Pulse Width Measurement
Set CRC0 register
Set INTM1 register and
MK0L register
Initialize buffer memory for capture value
Start counting
Enable interrupt
INTP3 interrupt
Calculation of pulse width
Yn = CR02 – Xn
Store captured value in memory
2
1
0
×
1
1
Specifies valid edge of INTP3 input
to be rising and falling edges
× : Don't care
Pulse width
measurement
CRC0←10H
←0
X
0
CE0←1
INTP3 interrupt
←CR02
X
n+1
RETI
; Specifies valid edge of
INTP3 input to be both
edges and unmasks interrupt
; Sets bit 3 of TMC0 to 1

Advertisement

Table of Contents
loading

Table of Contents