Datasheet

Table Of Contents
Section 14 16-Bit Timer Pulse Unit (TPU)
Rev. 2.00 Jul. 04, 2007 Page 300 of 692
REJ09B0309-0200
14.5.4 PWM Modes
In PWM mode, PWM waveforms are output from the output pins. The output level can be selected
as 0, 1, or toggle output in response to a compare match of each TGR.
Designating TGR compare match as the counter clearing source enables the period to be set in that
register. All channels can be designated for PWM mode independently. Synchronous operation is
also possible.
There are two PWM modes, as described below.
(1) PWM Mode 1
PWM output is generated from the TIOCA pin by pairing TGRA with TGRB. The level specified
by bits IOA0 to IOA3 in TIOR is output from the TIOCA pin at compare match A, and the level
specified by bits IOB0 to IOB3 in TIOR is output at compare match B. The initial output value is
the value set in TGRA. If the set values of paired TGRs are identical, the output value does not
change even if a compare match occurs.
In PWM mode 1, PWM output is enabled up to 2 phases.
(2) PWM Mode 2
PWM output is generated using one TGR as the cycle register and the others as duty registers. The
output specified in TIOR is performed by means of compare matches. Upon counter clearing by a
synchronization register compare match, the output value of each pin is the initial value set in
TIOR. If the set values of the cycle and duty registers are identical, the output value does not
change even if a compare match occurs.
In PWM mode 2, PWM output is enabled up to 3 phases.
The correspondence between PWM output pins and registers is shown in table 14.12.