ADuC814
TIME INTERVAL COUNTER (TIC)
A time interval counter is provided on-chip for counting longer
intervals than the standard 8051 compatible timers are capable
of. The TIC is capable of time-out intervals ranging from 1/128th
second to 255 hours. Furthermore, this counter is clocked by the
crystal oscillator rather than by the PLL and thus has the ability
to remain active in power-down mode and to time long power-
down intervals. This has obvious applications for remote battery-
powered sensors where regular, widely spaced readings are
required.
Six SFRs are associated with the time interval counter, TIMECON
being its control register. Depending on the configuration of the
IT0 and IT1 bits in TIMECON, the selected time counter register
overflow clocks the interval counter. When this counter is equal
to the time interval value loaded in the INTVAL SFR, the TII bit
(TIMECON.2) is set and generates an interrupt if enabled. (See
IEIP2 SFR description under the Interrupt System section.) If
the ADuC814 is in power-down mode, again with TIC interrupt
enabled, the TII bit wakes up the device and resumes code execu-
tion by vectoring directly to the TIC interrupt service vector
address at 0053H. The TIC-related SFRs are described in
Table 14. Note that the time based SFRs can be written initially
with the current time; the TIC can then be controlled and
accessed by the user software. In effect, this facilitates the
implementation of a real-time clock. A block diagram of the
TIC is shown in Figure 43.
TCEN 32.768kHz EXTERNAL CRYSTAL
8-BIT
PRESCALER
ITS0, 1
HUNDREDTHS COUNTER
HTHSEC
SECOND COUNTER
SEC
INTERVAL
TIMEBASE
SELECTION
MUX
TIEN
MINUTE COUNTER
MIN
HOUR COUNTER
HOUR
8-BIT
INTERVAL COUNTER
INTERVAL TIMEOUT
TIME INTERVAL COUNTER INTERRUPT
COMPARE
COUNT = INTVAL
TIMER INTVAL
INTVAL
Figure 43. Time Interval Counter, Simplified Block Diagram
Rev. A | Page 38 of 72