Datasheet

V850ES/JG3-H, V850ES/JH3-H CHAPTER 7 16-BIT TIMER/EVENT COUNTER AA (TAA)
R01UH0042EJ0500 Rev.5.00 Page 298 of 1513
Aug 12, 2011
(1/2)
Example when two capture registers are used (using overflow interrupt)
FFFFH
16-bit counter
0000H
TAAnCE bit
INTTAAnOV signal
TAAnOVF bit
TAAnOVF0 flag
Note
TIAAn0 pin input
TAAnCCR0 register
TAAnOVF1 flag
Note
TIAAn1 pin input
TAAnCCR1 register
D10
D11
D00
D01
D10
<1> <2> <5> <6><3> <4>
D00
D11
D01
Note The TAAnOVF0 and TAAnOVF1 flags are set on the internal RAM by software.
<1> Read the TAAnCCR0 register (setting of the default value of the TIAAn0 pin input).
<2> Read the TAAnCCR1 register (setting of the default value of the TIAAn1 pin input).
<3> An overflow occurs. Set the TAAnOVF0 and TAAnOVF1 flags to 1 in the overflow interrupt servicing,
and clear the overflow flag to 0.
<4> Read the TAAnCCR0 register.
Read the TAAnOVF0 flag. If the TAAnOVF0 flag is 1, clear it to 0.
Because the TAAnOVF0 flag is 1, the pulse width can be calculated by (10000H + D
01 D00).
<5> Read the TAAnCCR1 register.
Read the TAAnOVF1 flag. If the TAAnOVF1 flag is 1, clear it to 0 (the TAAnOVF0 flag is cleared in
<4>, and the TAAnOVF1 flag remains 1).
Because the TAAnOVF1 flag is 1, the pulse width can be calculated by (10000H + D
11 D10)
(correct).
<6> Same as <3>