beautypg.com

NEC PD78214 User Manual

Page 187

background image

158

µ

PD78214 Sub-Series

Fig. 7-64 Setting Procedure for Pulse Width Measurement

Fig. 7-65 Interrupt Request Handling for Pulse Width Calculation

Set CRC1 register

Set INTM0 register and
MK0L register

CRC1

←04H

X

0

←0

CE1

←1

Initialize buffer memory for capture value

Start counting

; Sets bit 3 of TMC1 to 1

Enable interrupt

INTP0 interrupt

; Specifies valid edge of
INTP0 input to be both
edges and unmasks interrupt

Pulse width

measurement

Set PRM1 register

INTP0 interrupt

Calculation of pulse width

Store captured value in memory

RETI

X

n+1

←CR11

Yn=CR11 – Xn

This manual is related to the following products: