194
µ
PD78214 Sub-Series
Fig. 7-102 Setting Procedure for Interval Timer Operation (2)
(3) Pulse width measurement operation
In pulse width measurement, the width of the high level or low level of an external pulse signal applied to the
INTP1 pin is measured.
A pulse signal applied to the INTP1 pin must have a pulse width of 12 system clock pulses (2
µ
s: f
CLK
= 6 MHz)
or more for both the high level and the low level. If the pulse width is less than this value, no valid edge can
be detected, thus resulting in a failure to perform capture operation.
As shown in Fig. 7-103, the value of 8-bit timer 2 (TM2) in count operation is loaded and held in the CR22
capture register on a valid edge (either a rising edge or falling edge) of a signal applied to the INTP1 pin. The
pulse width of the input signal is found by multiplying the count clock by the difference between the TM2 count
value (D
n
) loaded and held in the CR22 register on the n-th valid edge detected and the TM2 count value (D
n-
1
) loaded and held in the CR22 register on the (n – 1)-th valid edge detected.
Fig. 7-104 shows the setting of control registers, and Fig. 7-105 shows the setting procedure.
Interval timer
Set count value in CR21 register
Set CRC2 register
Set TMC1 register
; Sets bit 7 of TMC1 to 1
Sets normal mode (CMD2 = 0)
INTC21 interrupt
CE2
←
1
CMD2
←
0
CRC2
←
18H
CR21
←
n
Set PRM1 register
Содержание PD78212
Страница 11: ......
Страница 53: ...24 ...
Страница 61: ...32 µPD78214 Sub Series 9 VSS Ground 10 NC non connection Not connected inside the chip ...
Страница 65: ...36 ...
Страница 83: ...54 ...
Страница 135: ...106 ...
Страница 271: ...242 ...
Страница 405: ...376 ...
Страница 417: ...388 ...
Страница 423: ...394 ...
Страница 449: ...420 ...
Страница 457: ...428 ...
Страница 471: ...442 ...
Страница 487: ...458 ...