Datasheet

V850ES/JG3-H, V850ES/JH3-H CHAPTER 9 16-BIT TIMER/EVENT COUNTER T (TMT)
R01UH0042EJ0500 Rev.5.00 Page 528 of 1513
Aug 12, 2011
(b) Pulse width measurement with capture register
When pulse width measurement is performed with the TT0CCRn register used as a capture register, software
processing is necessary for reading the capture register each time the INTTT0CCn signal has been detected
and for calculating an interval.
0000H D
00
D
01
D
02
D
03
D
04
D
10
D
00
D
11
D
01
D
12
D
04
D
13
D
02
D
03
D
10
0000H D
11
D
12
D
13
FFFFH
16-bit counter
0000H
TT0CE bit
TIT00 pin input
TT0CCR0 register
INTTT0CC0 signal
TIT01 pin input
TT0CCR1 register
INTTT0CC1 signal
INTTT0OV signal
TT0OVF bit
Pulse interval
(D
00)
Pulse interval
(10000H +
D
01 - D00)
Pulse interval
(D
02 D01)
Pulse interval
(10000H +
D
03 D02)
Pulse interval
(10000H +
D04 D03)
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 TT0CCRn register in
synchronization with the INTTT0CCn signal, and calculating the difference between the read value and the
previously read value.