
R01UH0336EJ0102 Rev.1.02
Page 513 of 1538
Jul 17, 2014
V850E2/PG4-L
Section 13 Timer Array Unit B (TAUB)
13.18.1
PWM Output Function
(1)
Overview
Summary
This function generates multiple PWM outputs by using a master and multiple
slave channels. It enables the pulse cycle (frequency) and the duty cycle of the
TAUBnTTOUTm to be set. The pulse cycle is set in the master channel. The
duty cycle is set in the slave channel.
Prerequisites
• Two channels
• The operating mode for the master channel should be set to interval timer
mode. (See Table 13-67, TAUBnCMORm Settings for Master Channels of
PWM Output Function
.
)
• The operating mode for the slave channels should be set to one count
mode. (See Table 13-70, TAUBnCMORm Settings for Slave Channels of
PWM Output Function
.
)
• TAUBnTTOUTm is not used with the master channel of this function.
• The channel output mode for the slave channels should be set to
Synchronous Channel Output Mode 1. (See Section 13.8, Channel Output
Modes
Description
The counter is enabled by setting the channel trigger bit
(TAUBnTS.TAUBnTSm) to 1. This sets TAUBnTE.TAUBnTEm = 1, enabling
count operation. The current value of TAUBnCDRm is loaded into TAUBmCNT,
and the counter starts counting down from the TAUBnCDRm value. If an
INTTAUBnlm occurs on the master channel and TAUBnTTOUTm (slave) is
set/reset, PWM output is made.
• Master channel:
When the master channel counter reaches 0000
H
and the pulse cycle time
has passed, INTTAUBnIm occurs. The counter loads TAUBnCDRm value
into TAUBnCNTm and counts down.
• Slave channels:
When INTTAUBnIm occurs on the master channel, the counter operation of
the slave channel is triggered. The current value of TAUBnCDRm (slave) is
loaded into TAUBnCNTm (slave) and the counter starts counting down from
the TAUBnCDRm value. TAUBnTTOUTm signal is set to the active level.
When the counter reaches to 0000
H
(duty time has elapsed), INTTAUBnIm
occurs and a TAUBnTTOUTm signal is set to an inactive level. The counter
is reset to FFFF
H
and waits for the next INTTAUBnlm (start of the next pulse
cycle) of the master channel.
The counter can stop operating by setting the TAUBnTT.TAUBnTTm of master
and slave channels to 1. This sets TAUBnTE.TAUBnTEm to 0. TAUBnCNTm
and TAUBnTTOUTm of master and slave channels stop but their values are
retained. The counter can be restarted by setting TAUBnTS.TAUBnTSm to 1.
Note
If a forced restart is executed during operation, the counter value becomes
invalid and the PWM output wave from TAUBnTTOUTm does not output
correct wave as PWM signal.
Conditions
Simultaneous rewrite can be used with this function. See Section 13.7,
Simultaneous Rewrite
.
Содержание V850 Series
Страница 1556: ...V850E2 PG4 L R01UH0336EJ0102 Back Cover ...