
R01UH0336EJ0102 Rev.1.02
Page 557 of 1538
Jul 17, 2014
V850E2/PG4-L
Section 13 Timer Array Unit B (TAUB)
13.20.1
Triangle PWM Output Function
(1)
Overview
Summary
This function generates multiple triangle PWM outputs by using a master and
one or more slave channels. It enables the pulse cycle (frequency) and the
duty cycle of TAUBnTTOUTm to be set using the master and slave channels
respectively.
The master channel generates a carrier cycle. The first cycle of master
channel controls the down status and the second cycle controls the up status
of the slave counter.
Prerequisites
• Two channels
• The operating mode for master channels should be set to interval timer
mode. (See Table 13-98, TAUBnCMORm Settings for Master Channels of
Triangle PWM Output Function
.)
• The operating mode for slave channels should be set up/down count mode.
(See Table 13-102, TAUBnCMORm Settings for Slave Channels of Triangle
PWM Output Function
.)
• The channel output mode for master channels should be set to independent
channel output mode 1. (See Section 13.8, Channel Output Modes
.
)
• The channel output mode for slave channels should be set to synchronous
channel output mode 2. (See Section 13.8, Channel Output Modes
.
)
• The following settings allows TAUBnTTOUTm to be at high level during the
down status of a carrier cycle.
– If TAUBnCMORm.TAUBnMD0 (master) bit is set to 0,
TAUBnTO.TAUBnTOm should be set to 1 while
TAUBnTOE.TAUBnTOEm is set to 0 (recommended setting).
– If TAUBnCMORm.TAUBnMD0 (master) bit is set to 1,
TAUBnTO.TAUBnTOm should be set to 0 while
TAUBnTOE.TAUBnTOEm is set to 0 (recommended setting).
Description
The counters are started by setting the channel trigger bit
(TAUBnTS.TAUBnTSm) to 1 for every channel. This in turn sets
TAUBnTE.TAUBnTEm, enabling count operation.
The current values of TAUBnCDRm (master and slave) are loaded into
TAUBnCNTm (master and slave) and the counters start counting down from
these values. When the TAUBnCMORm.TAUBnMD0 bit of master channel is
set to 1, an interrupt is generated and TAUBnTTOUTm signal of master
toggles.
• Master channels:
When the counter of master channel reaches 0000
H
(pulse cycle time
has elapsed), INTTAUBnIm is generated and the TAUBnTTOUTm signal
toggles. TAUBnCNTm then reloads the TAUBnCDRm value and counts
down.