158
µ
PD78214 Sub-Series
Fig. 7-64 Setting Procedure for Pulse Width MeasurementFig. 7-65 Interrupt Request Handling for Pulse Width Calculation
Set CRC1 register
Set INTM0 register and
MK0L register
CRC104H
X00
CE11
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
Xn+1CR11
Yn=CR11 Xn