160
9.2
Timer A
9.2.1
Overview
Timer A is an 8-bit timer with interval timing and real-time clock time-base functions. The clock
time-base function is available when a 32.768-kHz crystal oscillator is connected. A clock signal
divided from 32.768 kHz or from the system clock can be output at the TMOW pin.
Features: Features of timer A are given below.
•
Choice of eight internal clock sources (ø/8192, ø/4096, ø/2048, ø/512, ø/256, ø/128, ø/32, ø/8).
•
Choice of four overflow periods (1 s, 0.5 s, 0.25 s, 31.25 ms) when timer A is used as a clock
time base (using a 32.768 kHz crystal oscillator).
•
An interrupt is requested when the counter overflows.
•
Any of eight clock signals can be output from pin TMOW: 32.768 kHz divided by 32, 16, 8, or
4 (1 kHz, 2 kHz, 4 kHz, 8 kHz), or the system clock divided by 32, 16, 8, or 4.
Block Diagram: Figure 9.1 shows a block diagram of timer A.
ø
PSW
Internal data bus
PSS
Legend:
TMOW
1/4
TMA
TCA
ø /32
ø /16
ø /8
ø /4
W
W
W
W
ø/32
ø/16
ø/8
ø/4
ø /128
W
ø/8192, ø/4096, ø/2048,
ø/512, ø/256, ø/128,
ø/32, ø/8
IRRTA
8
64
128
256
*
*
*
*
ø /4
W
TMA:
TCA:
IRRTA:
PSW:
PSS:
Note: Can be selected only when the prescaler W output (ø /128) is used as the TCA input clock.
Timer mode register A
Timer counter A
Timer A overflow interrupt request flag
Prescaler W
Prescaler S
W
W
÷
÷
÷
÷
ø
Figure 9.1 Block Diagram of Timer A