Rev. 1.0, 02/00, page 252 of 1141
11.3
Operation
Timer A is an 8-bit interval timer. It can be used as a clock timer when connected to a 32.768 kHz
crystal oscillator.
11.3.1
Operation as the Interval Timer
When the TMA3 bit of the TMA is cleared to 0, timer A works as an 8-bit interval timer.
After reset, the TCA is cleared to H'00 and as the TMA3 bit is cleared to 0, the Timer A continues
counting up as the interval counter without interrupts right after resetting.
As the operation clock for timer A, selection can be made from eight different types of internal
clocks being output from the PSS by the TMA2 to TMA0 bits of the TMA.
When the clock signal is input after the reading of the TCA reaches H'FF, timer A overflows and
the TMAOV bit of the TMA will be set to 1. An interrupt occurs when the TMAIE bit of the
TMA is 1.
When overflowing occurs, the reading of the TCA returns to H'00 before resuming counting up.
Consequently, it works as the interval timer to produce overflow outputs periodically at every 256
input clocks.
11.3.2
Operation as Clock Timer
When the TMA3 bit of the TMA is set to 1, timer A works as a time base for the clock.
As the overflow cycles for timer A, selection can be made from four different types by counting
the clock being output from the PSW by the TMA1 bit and TMA0 bit of the TMA.
11.3.3
Initializing the Counts
When the TMA3 and TMA2 bits are set to 11, the PSW and TCA will be cleared to H'00 to come
to a stop.
At this state, writing 10 to the TMA3 bit and TMA2 bit makes timer A start counting from H'00 in
the time base mode for clocks.
After clearing the PSW and TCA using the TMA3 and TMA2 bits, writing 00 or 01 to the TMA3
bit and TMA2 bit to make timer A start counting from H'00 in the interval timer mode. However,
the period to the first count is not constant, since the PSS is not cleared.