MB89190/190A series
Chapter 5 Time-base Timer
5-9
5.
5 Explanation ofTime-base TimerOperation
The time-base timer functions as the interval timer and as the clock supply to
some resources.
T Operation of interval timer (time-base timer)
The setting shown in
Figure 5.5a is required for the time-base timer function as the interval timer
function.
Fig. 5.5a Setting of Interval Timer Function
The counter of the time-base timer continues incrementing in synchronization with the internal count clock
(original oscillation divided by 2) while the clock is oscillating.
When the counter is cleared (TBR = 0), it increments starting with 0, and when the bit for the interval
timer overflows, the overflow interrupt request flag bit (TBOF) is set to 1. In other words, the interrupt
request occurs at the selected interval times with respect to the cleared time.
T Operation of clock supply
The time-base timer is also used as a timer to generate the oscillation stabilization wait time. At transition
to the stop mode (STBC: STP = 1) or power-on reset (option), the time-base timer counter is cleared.
The oscillation stabilization wait time is the duration from when the counter starts counting at 0 until an
overflow occurs at the bit for the oscillation stabilization wait time. The bit for the oscillation stabilization
wait time can be selected from the four different options. The time-base timer supplies the clocks to the
watchdog timer, the A/D converter and buzzer output. When the time-base timer counter is cleared, the
watchdog timer counter is cleared simultaneously. Also, the buzzer output and A/D converter continuous-
starting cycle are affected by the operation.
T Operation of time-base timer
The operation of the following states is shown in
Figure 5.5b:
At a power-on reset
When control transits to sleep mode during operation of the interval timer function
When control transits to the stop mode
When a counter clear request occurs
At transition to the stop mode, the time-base timer is cleared and stops operating. At the return from the
stop mode, the oscillation stabilization wait time is counted using the time-base timer.
Bit 7
Bit 6
Bit 5
Bit 4
Bit 3
Bit 2
Bit 1
Bit 0
TBTC
—
TBIE
TBOF
TBR
TBC1
TBC0
10
0
qq
q
: Bit used
1: 1 set
0: 0 set