Datasheet

V850ES/JG3 CHAPTRER 7 16-BIT TIMER/EVENT COUNTER P (TMP)
R01UH0015EJ0300 Rev.3.00 Page 260 of 870
Sep 30, 2010
(b) Pulse width measurement with capture register
When pulse width measurement is performed with the TPnCCRm register used as a capture register, software
processing is necessary for reading the capture register each time the INTTPnCCm signal has been detected
and for calculating an interval.
FFFFH
16-bit counter
0000H
TPnCE bit
TIPn0 pin input
TPnCCR0 register
INTTPnCC0 signal
TIPn1 pin input
TPnCCR1 register
INTTPnCC1 signal
INTTPnOV signal
TPnOVF bit
0000H D00 D01 D02 D03 D04
D10
D00
D11
D01
D12
D04
D13
D02
D03
D100000H D11 D12 D13
Pulse interval
(D
00
)
Pulse interval
(10000H +
D
01
D
00
)
Pulse interval
(D
02
D
01
)
Pulse interval
(10000H +
D
03
D
02
)
Pulse interval
(10000H +
D
04
D
03
)
Pulse interval
(D
10
)
Pulse interval
(10000H +
D
11
D
10
)
Pulse interval
(10000H +
D
12
D
11
)
Pulse interval
(10000H +
D
13
D
12
)
Cleared to 0 by
CLR instruction
Cleared to 0 by
CLR instruction
Cleared to 0 by
CLR instruction
When executing pulse width measurement in the free-running timer mode, two pulse widths can be measured
with one channel.
To measure a pulse width, the pulse width can be calculated by reading the value of the TPnCCRm register in
synchronization with the INTTPnCCm signal, and calculating the difference between the read value and the
previously read value.
Remark n = 0 to 5
m = 0, 1