English
Language : 

C8051F02X Datasheet, PDF (225/272 Pages) Silicon Laboratories – 8K ISP FLASH MCU Family
C8051F020/1/2/3
22. TIMERS
The C8051F020/1/2/3 devices contain 5 counter/timers: three are 16-bit counter/timers compatible with those found
in the standard 8051, and two are 16-bit auto-reload timers for use with the ADCs, SMBus, UART1, or for general
purpose use. These 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 offers addi-
tional capabilities not available in Timers 0 and 1. Timer 3 is similar to Timer 2, but without the capture or Baud Rate
Generator modes. Timer 4 is identical to Timer 2, and can supply baud-rate generation capabilities to UART1.
Timer 0 and Timer 1:
13-bit counter/timer
16-bit counter/timer
8-bit counter/timer with
auto-reload
Two 8-bit counter/timers
(Timer 0 only)
Timer 2:
16-bit counter/timer with
auto-reload
16-bit counter/timer with
capture
Baud rate generator for
UART0
Timer 3:
16-bit timer with auto-
reload
Timer 4
16-bit counter/timer with
auto-reload
16-bit counter/timer with
capture
Baud rate generator for
UART1
When functioning as a timer, the counter/timer registers are incremented on each clock tick. Clock ticks are derived
from the system clock divided by either one or twelve as specified by the Timer Clock Select bits (T4M-T0M) in
CKCON, shown in Figure 22.1. The twelve-clocks-per-tick option provides compatibility with the older generation
of the 8051 family. Applications that require a faster timer can use the one-clock-per-tick option.
When functioning as a counter, a counter/timer register is incremented on each high-to-low transition at the selected
input pin. Events with a frequency of up to one-fourth the system clock's frequency can be counted. The input signal
need not be periodic, but it should be held at a given level for at least two full system clock cycles to ensure the level
is sampled.
Rev. 1.4
225