
CHAPTER 7 INVERTER CONTROL FUNCTIONS
User’s Manual U19678EJ1V1UD
406
7.5.4 Operation as triangular wave PWM output function
Multiple channels can be used in combination to output a triangular wave modulation PWM for motor control.
The period is set by the master channel and a triangular wave modulation PWM is output by the slave channel.
When multiple triangular wave modulation PWMs are output for a period, the triangular wave modulation PWM output
can be added by adding a slave channel.
The output pulse period and duty factor can be calculated by the following expression.
Pulse period (down/up) = {Set value of TDR00 (master) + 1}
× 2 × Count clock period
Duty factor [%] = {Set value of TDR00 (master) + 1
Set value of TDRm (slave)}/{Set value of TDR00
(master) + 1}
× 100
0% output:
Set value of TDRm (slave)
≥ {Set value of TDR00 (master) + 1}
100% output: Set value of TDRm (slave) = 0000H
Remark
Although the duty factor exceeds 0% if the set value of TDRm (slave)
> {set value of TDR00 (master)
+ 1}, it is summarized into 0% output.
The master channel operates in the interval timer mode and counts the periods.
TCR00 loads the value of TDR00 at the first count clock, after the channel start trigger bit (TS00) is set to 1.
Afterward, TCR00 counts down along with the count clock.
When TCR00 has become 0000H, INTTM00 is output and TO00 is toggled upon the next count clock. TCR00
loads the value of TDR00 again at the same timing. Similar operation is continued hereafter.
A carrier period is generated in two periods of the master channel count.
The count operation of the slave channel is controlled by defining the first period of the master channel as a down
status of the slave channel and the second period as an up status of the slave channel.
TO00 of the master channel outputs up and down statuses.
TO00 of the TO0 register must be manipulated while TOE00 of the TOE0 register is 0 and the default level must be
set, because up and down statuses are output.
TO00 of TO0 is set to 1 when MD000 of the TMR00 register is 0, and TO00 is set to 0 when MD000 is 1.
By setting the default level, a high level is output from TO00 during a down status and a low level is output during
an up status.
TCRm of the slave channel operates in the up and down count mode, and counts the duty.
TCRm loads the value of TDRm at the first count clock, after the channel start trigger bit (TSm) is set to 1.
Hereafter, counting up and counting down is switched in accordance with the operation of the master channel.
INTTMm is output when TCRm becomes 0000H.
The TOm output becomes an active level when TCRm generates INTTMm while counting down, and it becomes
an inactive level when TCRm generates INTTMm while counting up.
TCRm loads the value of TDRm again when INTTM00 is generated in an up status (crest of a triangular wave) of
the master channel. Similar operation is continued hereafter.
Remark
m = 02 to 07