English
Language : 

C8051F970-A-GM Datasheet, PDF (389/454 Pages) Silicon Laboratories – Low Power Capacitive Sensing MCU with up to 32 kB of Flash
C8051F97x
32. Timers (Timer0, Timer1, Timer2, and Timer3)
Each MCU in the C8051F97x family includes four counter/timers: two are 16-bit counter/timers compatible with
those found in the standard 8051, and two are 16-bit auto-reload timers for timing peripherals or for general
purpose use. These timers can be used to measure time intervals, count external events and generate periodic
interrupt requests. Timer 0 and Timer 1 are nearly identical and have four primary modes of operation. Timer 2 and
Timer 3 are also identical and offer both 16-bit and split 8-bit timer functionality with auto-reload capabilities.
Timer 2 and Timer 3 both offer a capture function, but are different in their system-level connections. Timer 2 is
capable of performing a capture function on an external signal input routed through the crossbar, while the Timer 3
capture is dedicated to the low-frequency oscillator output. Table 32.1 summarizes the modes available to each
timer.
Table 32.1. Timer Modes
Timer 0 and Timer 1 Modes
Timer 2 Modes
Timer 3 Modes
13-bit counter/timer
16-bit counter/timer
8-bit counter/timer with auto-reload
Two 8-bit counter/timers
(Timer 0 only)
16-bit timer with auto-reload
Two 8-bit timers with auto-reload
16-bit timer with auto-reload
Two 8-bit timers with auto-reload
Timers 0 and 1 may be clocked by one of five sources, determined by the Timer Mode Select bits (T1M–T0M) and
the Clock Scale bits (SCA1–SCA0). The Clock Scale bits define a prescaled clock from which Timer 0 and/or
Timer 1 may be clocked.
Timer 0/1 may then be configured to use this prescaled clock signal or the system clock. Timer 2 and Timer 3 may
be clocked by the system clock, the system clock divided by 12, or the external oscillator clock source divided by 8.
Timer 0 and Timer 1 may also be operated as counters. When functioning as a counter, a counter/timer register is
incremented on each high-to-low transition at the selected input pin (T0 or T1). Events with a frequency of up to
one-fourth the system clock frequency can be counted. The input signal need not be periodic, but it must be held at
a given level for at least two full system clock cycles to ensure the level is properly sampled.
All four timers are capable of clocking other peripherals and triggering events in the system. The individual
peripherals select which timer to use for their respective functions. Table 32.2 summarizes the peripheral
connections for each timer. Note that the Timer 2 and Timer 3 high overflows apply to the full timer when operating
in 16-bit mode or the high-byte timer when operating in 8-bit split mode.
Table 32.2. Timer Peripheral Clocking / Event Triggering
Function
T0
Overflow
T1
Overflow
T2 High
Overflow
T2 Low
Overflow
T3 High
Overflow
T3 Low
Overflow
UART0 Baud Rate
X
SMBus0 Clock Rate
X
X
X
X
SMBus0 SCL Low Timeout
X
PCA0 Clock
X
ADC0 Conversion Start
X
X*
X*
X*
X*
*Note: The high-side overflow is used when the timer is in16-bit mode. The low-side overflow is used in 8-bit mode.
390
Rev 1.0