Datasheet
V850ES/JG3-H, V850ES/JH3-H CHAPTER 9 16-BIT TIMER/EVENT COUNTER T (TMT)
R01UH0042EJ0500 Rev.5.00 Page 456 of 1513
Aug 12, 2011
(a) Function as compare register
The TT0CCR1 register can be rewritten even when the TT0CTL0.TT0CE bit = 1.
The set value of the TT0CCR1 register is transferred to the CCR1 buffer register. When the value of the 16-bit
counter matches the value of the CCR1 buffer register, a compare match interrupt request signal
(INTTT0CC01) is generated. If TOT01 pin output is enabled at this time, the output of the TOT01 pin is inverted.
The compare register is not cleared by setting the TT0CTL0.TT0CE bit to 0.
(b) Function as capture register
In the free-running timer mode (when the TT0CCR1 register is used as a capture register), the count value of
the 16-bit counter is stored in the TT0CCR1 register if the valid edge of the capture trigger input pin (TIT01 pin)
is detected. In the pulse width measurement mode, the count value of the 16-bit counter is stored in the
TT0CCR1 register and the 16-bit counter is cleared (0000H) if the valid edge of the capture trigger input pin
(TIT01 pin) is detected.
Even if the capture operation and reading the TT0CCR1 register conflict, the correct value of the TT0CCR1
register can be read.
The capture register is cleared by setting the TT0CTL0.TT0CE bit to 0.
The following table shows the functions of the capture/compare register in each mode, and how to write data to the
compare register.
Table 9-4. Function of Capture/Compare Register in Each Mode and How to Write Compare Register
Operation Mode TT0CCR1 Register How to Write Compare Register
Interval timer Compare register Anytime write
External event counter Compare register Anytime write
External trigger pulse output Compare register Batch write
Note
One-shot pulse output Compare register Anytime write
PWM output Compare register Batch write
Note
Free-running timer Capture/compare register Anytime write
Pulse width measurement Capture register None
Triangular-wave PWM output Compare register Batch write
Note
Encoder compare Compare register Anytime write
Note Writing to the TT0CCR1 register is the trigger.
Remark For anytime write and batch write, see 9.6 (2) Anytime write and batch write.