Time Base Timer
10
PRELIMINARY V1.8
- Eleven internal interrupt sources. The following peripheral blocks can generate
interrupt request: Watchdog Timer, Time Base Timer, Capture Timer 1, Capture Timer
2, SPI, TXFIFO, RXFIFO, Signaling Word, Signal/Noise Ratio, and Lock, LBD
8.
Time Base Timer
8.1.
Overview
The Time Base Timer (TB-Timer) is an 8-bit auto-reload timer. The TB-Timer is
composed of a input frequency select MUX, an 8-bit up-counter(TBCNT), a
Comparator, an 8-bit data register(TBDAT), and a control register(TBCR).
The TB-Timer has the 8 counting clocks that can be selected by TBFS[5:3]. Four of the
clocks come from the System Clock block, i.e. F
1SEC
, F
1MIN
, F
1HOUR
, and F
125mS
. If
the slow oscillator is stopped, these four clocks will stop too. These four clocks will be
very useful to generate a real time interval and to minimize the number of CPU wake-
ups. The period of the F
sys
/12 clock is one machine cycle or one fastest instruction
cycle. This clock will run during any power-saving mode except the StopAll mode.
During the FastAll or FastPeri mode, the F
sys
/12 clock is equal to F
fast
/12. During the
SlowAll or SlowPeri mode, the F
sys
/12 clock is equal to F
slow
/12. The F
fast
/2
4
, F
fast
/2
7
,
and F
fast
/2
10
can be used during the FastAll or FastPeri mode only.
After the TBEN bit is set to high, the TBCNT will start to count the negative edge of an
input clock. When the TBEN bit is low, the Match signal is never generated even
though the contents of the TBDAT and TBCNT are the same. The TBCNT is the 8-bit
up-counter that can be cleared by the TBCLR bit or the Match signal. The TBCNT is a
modulo-N counter (from 0 to N-1), N is the content of the TBDAT. The match signal
will always set the TBINT bit to high. The TBINT bit can be cleared by the TB-Timer
Interrupt Acknowledge or by software.