
R01UH0336EJ0102 Rev.1.02
Page 433 of 1538
Jul 17, 2014
V850E2/PG4-L
Section 13 Timer Array Unit B (TAUB)
13.13.1
Interval Timer Function
(1)
Overview
Summary
This function is used as a reference timer for generating timer interrupts
(INTTAUBnIm) at regular intervals. When an interrupt is generated, the
TAUBnTTOUTm signal toggles, resulting in a square wave.
Prerequisites
• The operating mode should be set to Interval timer mode. (See Table 13-12,
TAUBnCMORm Settings for Interval Timer Function
.
)
• The channel output mode should be set to independent channel output
mode 1. (See Section 13.8, Channel Output Modes
)
Description
The counter is started by setting the channel trigger bit
(TAUBnTS.TAUBnTSm) to 1. This in turn sets TAUBnTE.TAUBnTEm = 1,
enabling count operation. The current value of TAUBnCDRm is loaded into
TAUBnCNTm and the counter starts to count down from this value.
When the counter reaches 0000
H
, INTTAUBnIm is generated and the
TAUBnTTOUTm signal toggles. The TAUBnCDRm value is loaded in
TAUBnCNTm and subsequently operation continues.
The value of TAUBnCDRm can be rewritten at any time, and the changed
value of TAUBnCDRm is applied the next time the counter starts to count
down.
The counter can be stopped by setting TAUBnTT.TAUBnTTm to 1. This sets
TAUBnTE.TAUBnTEm to 0. TAUBnCNTm and TAUBnTTOUTm stop but retain
their values. The counter can be restarted by setting TAUBnTS.TAUBnTSm to
1. The counter can also be forcibly restarted (without stopping it first) by setting
TAUBnTS.TAUBnTSm to 1 during operation.
Conditions
If the TAUBnCMORm.TAUBnMD0 bit is set to 0, the first interrupt after a start
or restart is not generated, and therefore TAUBnTTOUTm does not toggle.
This results in an inverted TAUBnTTOUTm signal compared to when
TAUBnCMORm.TAUBnMD0 is set to 1. For details, see Section 13.10,
TAUBnTTOUTm Output and INTTAUBnIm Generation when Counter Starts or
Restarts (TAUBnMD0 bit)
.
(2)
Equations
INTTAUBnIm cycle = count clock cycle × (TAU 1)
TAUBnTTOUTm square wave cycle = count clock cycle ×
(TAU 1) × 2