Datasheet

V850ES/JG3-H, V850ES/JH3-H CHAPTER 9 16-BIT TIMER/EVENT COUNTER T (TMT)
R01UH0042EJ0500 Rev.5.00 Page 490 of 1513
Aug 12, 2011
Figure 9-22. Basic Timing in External Trigger Pulse Output Mode
D1
D0
D0
D1 D1 D1 D1
D0 D0 D0
FFFFH
16-bit counter
0000H
TT0CE bit
TT0CCR0 register
INTTT0CC0 signal
TOT00 pin output
TT0CCR1 register
INTTT0CC1 signal
TOT01 pin output
External trigger input
(EVTT0 pin input)
Wait
for
trigger
Active level
width (D
1)
Cycle (D
0 + 1) Cycle (D0 + 1) Cycle (D0 + 1)
Active level
width (D
1)
Active level
width (D1)
16-bit timer/event counter T waits for a trigger when the TT0CE bit is set to 1. When the trigger is generated, the 16-bit
counter is cleared from FFFFH to 0000H, starts counting at the same time, and outputs a PWM waveform from the TOT01
pin. If the trigger is generated again while the counter is operating, the counter is cleared to 0000H and restarted. (The
output of the TOT00 pin is inverted. The TOT01 pin outputs a high level regardless of the status (high/low) when a trigger
occurs.)
The active level width, cycle, and duty factor of the PWM waveform can be calculated as follows.
Active level width = (Set value of TT0CCR1 register) × Count clock cycle
Cycle = (Set value of TT0CCR0 register + 1) × Count clock cycle
Duty factor = (Set value of TT0CCR1 register)/(Set value of TT0CCR0 register + 1)
The compare match request signal (INTTT0CC0) is generated the next time the 16-bit counter counts after its count
value matches the value of the CCR0 buffer register, and the 16-bit counter is cleared to 0000H. The compare match
interrupt request signal (INTTT0CC1) is generated when the count value of the 16-bit counter matches the value of the
CCR1 buffer register.
The value set to the TT0CCRn register is transferred to the CCRn buffer register when the count value of the 16-bit
counter matches the value of the CCRn buffer register and the 16-bit counter is cleared to 0000H.
The valid edge of an external trigger input (EVTT0), or setting the software trigger (TT0CTL1.TT0EST bit) to 1 is used
as the trigger (n = 0, 1).