Specifications
Counter/Timers
Mode Register
The 8-bit Mode register is programmed to control the operation of the
counter/timers.
Clock Select and
Divisor
The difference between a timer and a counter is the clock source. The
clock source for a timer is periodic, while the clock source for a
counter is usually not periodic. A timer is used to reduce the
frequency of a periodic signal; a counter is used to monitor the
occurrence of asynchronous events. The Clock Select module defines
the clock source for each counter/timer based on the value
programmed into the TCKS V40 configuration register.
Clock source choices are either the V40 internal clock or the TCLK
signal available on an external V40 pin. The internal clock is useful
for counter/timers used in applications needing baud rate generation
for the V40 serial port, accurate timing loops, timed interrupts, or
periodic interrupts. The TCLK selection is useful for applications
needing to count external events.
The Divisor, which operates on the counter/timers using the V40
internal clock as the clock source, is programmed through the TCKS
V40 configuration register to divide the V40 clock by two, four, eight,
or 16 before input to the counter/timer occurs.
Counter/Timers 0, 1, and
2
The functional block diagram shown in Figure 7-1 illustrates the
internal blocks of counter/timer 2. These internal blocks are the same
as for counter/timer 0 and counter/timer 1. Each counter/timer is
based on a 16-bit synchronous Down Counter, which can be preset to
an initial number of counts and programmed for either binary or BCD
(Binary-Coded-Decimal) operation.
7-5