155
Chapter 7 Timer/Counter Units
7
Fig. 7-61 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
external interrupt request (INTP0) input pin is measured.
A pulse signal applied to the INTP0 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-62, the value of 8-bit timer 1 (TM1) in count operation is loaded and held in the CR11 capture/
compare register specified as a capture register on a valid edge (either a rising edge or falling edge) of a signal
applied to the INTP0 pin. The pulse width of the input signal is found by multiplying the count clock (X/f
CLK
:
X = 16, 32, 64, 128, 256, 512) by the difference between the TM1 count value (D
n
) loaded and held in the CR11
register on the n-th valid edge detected and the TM1 count value (D
n-1
) loaded and held in the CR11 register
on the (n – 1)-th valid edge detected.
Fig. 7-63 shows the setting of control registers, and Fig. 7-64 shows the setting procedure.
Interval timer (2)
Set count value in CR11 register
Set CRC1 register
Start counting
; Sets bit 3 of TMC1 to 1
INTC11 interrupt
CE1
←
1
CRC1
←
08H
CR11
←
n
Set PRM1 register
Summary of Contents for PD78212
Page 11: ......
Page 53: ...24 ...
Page 61: ...32 µPD78214 Sub Series 9 VSS Ground 10 NC non connection Not connected inside the chip ...
Page 65: ...36 ...
Page 83: ...54 ...
Page 135: ...106 ...
Page 271: ...242 ...
Page 405: ...376 ...
Page 417: ...388 ...
Page 423: ...394 ...
Page 449: ...420 ...
Page 457: ...428 ...
Page 471: ...442 ...
Page 487: ...458 ...