Datasheet

78K0/Ix2 CHAPTER 6 16-BIT TIMERS X0 AND X1
R01UH0010EJ0500 Rev.5.00 218
Feb 28, 2012
Figure 6-28. PWM Output Timing (TMXn-only Operation, PWM output: TOXn0 pin)
FFFFH
16-bit timer counter Xn
0000H
16-bit timer Xn compare
register 0 (TXnCR0)
D0 D0'
D
0 D0'
D
1
D1
D1'
TOXn0 pin output
(TXnTOL0 = 0)
TOXn0 pin output
(TXnTOL0 = 1)
D
0
D1D1
D0
INTTMXn signal
D1'
D
0'
D1
D0
D1'
16-bit timer Xn compare
register 1 (TXnCR1)
16-bit timer Xn compare
buffer register 0
16-bit timer Xn compare
buffer register 1
D
0+1
D1+1
Remark n = 0, 1
(2) PWM output operation (TMXn-only mode, dual output)
PWM outputs are started when the count value of the inverted output of TOXn0 is set to TXnCR0 and TXnCR1, the
count value of the inverted output of TOXn1 and the count value of the cycle are set to TXnCR2 and TXnCR3, and 1
is set to bit 7 (TXnTMC) of TXnCTL0.
Pulse cycle and duty of TOXn0
Pulse cycle = (Set value of TXnCR3 + 1) Count clock cycle
Duty = (Set value of TXnCR1
Note 1
Set value of TXnCR0
Note 1
) / (Set value of TXnCR3 + 1)
Pulse cycle and duty of TOXn1
Pulse cycle = (Set value of TXnCR3 + 1) Count clock cycle
Duty = (Set value of TXnCR3
Note 1
Set value of TXnCR2
Note 1
) / (Set value of TXnCR3 + 1)
TXnCR0 to TXnCR3 can be rewritten while the timers are operating, and the duty and the pulse cycle can be changed.
When rewriting TXnCR0 to TXnCR3, be sure to rewrite TXnCR0 to TXnCR2 before rewriting TXnCR3. Registers
among TXnCR0 to TXnCR2 that are not to be changed do not have to be rewritten. If one of TXnCR0 to TXnCR2
needs to be changed but TXnCR3 does not need to be changed, be sure to write the same value to TXnCR3.
The output is changed when the INTTMXn interrupt is generated immediately after TXnCR3 is written. However, if
TXnCR3 is rewritten during the clock
Note 2
cycle in which the INTTMXn interrupt was generated, or during the previous
two clock
Note 2
cycles, the output will be changed when the INTTMXn interrupt subsequent to this INTTMXn interrupt
is generated. Note also that if TXnCR0 to TXnCR3 are written with a different value in the period between when
TXnCR3 is written and when the output changes, the output will be changed to this different value, not the originally
specified value.
<R>
<R>
<R>