
R01UH0336EJ0102 Rev.1.02
Page 543 of 1538
Jul 17, 2014
V850E2/PG4-L
Section 13 Timer Array Unit B (TAUB)
13.19.1
One-Shot Pulse Output Function
(1)
Overview
Summary
This function outputs a signal pulse with a specific pulse width and delay time
(both defined relative to an external input signal pulse) by using a master and a
slave channel. The delay time is specified using the master channel. The pulse
width is specified using the slave channel.
Prerequisites
• Two channels
• The operating mode for the master channel should be set to one-count
mode. (See Table 13-90, TAUBnCMORm Settings for Master Channels of
One-Shot Pulse Output Function
.)
• The operating mode for slave channels should be set to pulse one-count
mode. (See Table 13-93, TAUBnCMORm Settings for Slave Channels of
One-Shot Pulse Output Function
.)
• TAUBnTTOUTm is not used with the master channel of this function.
• The channel output mode for the slave channel should be set to
independent channel output mode 2. (See Section 13.8, Channel Output
Modes
• TAUBnTTINm (master) has to be detected while TAUBnCNTm (master) and
TAUBnCNTm (slave) await a trigger. Furthermore, the slave is only
triggered by an interrupt from the master channel and not by TAUBnTTINm
(slave).
Description
The counters are enabled by setting the channel trigger bits
(TAUBnTS.TAUBnTSm) to 1. This sets TAUBnTE.TAUBnTEm, enabling count
operation.
• Master channel:
When the next valid TAUBnTTINm input edge is detected, the current value
of TAUBnCDRm is loaded into TAUBnCNTm. The counter starts to count
down from this value. If TAUBnCMORm.MD0 = 0, a trigger (TAUBnTTINm)
which is detected within the delay time is ignored.
When the counter of master channel reaches 0000
H
, INTTAUBnIm is
generated. The counter is reset to FFFF
H
and waits for the next valid
TAUBnTTINm input edge.
• Slave channels:
INTTAUBnIm generated on master channel triggers the counter operation of
slave channel. The current value of TAUBnCDRm (slave) is loaded into
TAUBnCNTm (slave). The counter starts counting down from this value. An
interrupt occurs and the TAUBnTTOUTm signal is set.
When the counter reaches 0001
H
, INTTAUBnIm is generated and
TAUBnTTOUTm signal is reset. The counter stops at 0000
H
and waits for
the next INTTAUBnIm of master channel.
The counter can be stopped by setting 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.
Setting TAUBnTS.TAUBnTSm to 1 while counting allows the counter to restart
counting of master channel without making a stop (forced restart).