195
Chapter 7 Timer/Counter Units
7
Fig. 7-103 Timing of Pulse Width Measurement
Remark Dn: TM2 count value (n = 0, 1, 2, ...)
Fig. 7-104 Setting of Control Registers for Pulse Width Measurement
(a) Prescaler mode register 1 (PRM1)
(b) Capture/compare control register 2 (CRC2)
7
CRC2 00
6543210
01000 0
Disables clearing TM2
76543210
PRS23 ×
0
PRM1
Specifies count clock
(x/fCLK; where x = 16, 32, 64,
128, 256, 512,
or external clock)
PRS22 PRS21 PRS20 ××
OVF2
Capture register (CR22)
TM2
count value
0H
Captured Captured
(D1– D0) ×X/fCLK
Captured
Count starts
D0 D1 D2 D3
(D3– D2) ×X/fCLK
(100H– D1+
D2)×X/fCLK
D3
FFH FFH
INTP1
external input signal
INTP1
interrupt request
Cleared by software
Captured
D1
D0 D2