English
Language : 

C868_02 Datasheet, PDF (53/244 Pages) Infineon Technologies AG – 8 - Bit CMOS Microcontroller
C868
On-Chip Peripheral Components
4.5
Timers/Counters
The C868 contains three 16-bit timers/counters, timer 0, timer 1 and timer/counter 2,
which are useful in many applications for timing and counting.
The timer register is incremented every machine cycle. Thus one can think of it as
counting machine cycles. Since a machine cycle consists of 12 periods, the counter rate
is 1/12 of the system frequency.
4.5.1 Timer 0 and 1
Timer 0 and 1 of the C868 are fully compatible with timer 0 and 1 can be used in the same
four operating modes:
Mode 0:8-bit timer with a divide-by-32 prescaler
Mode 1:16-bit timer
Mode 2:8-bit timer with 8-bit auto-reload
Mode 3:Timer 0 is configured as two 8-bit timers. Timer 1 in this mode holds its count.
The effect is the same as setting TR1 = 0.
External inputs INT0 and INT1 can be programmed to function as a gate for timer 0 and
1 to facilitate pulse width measurements.
Each timer consists of two 8-bit registers (TH0 and TL0 for timer 0, TH1 and TL1 for timer
1) which may be combined to one timer configuration depending on the mode that is
established. The functions of the timers are controlled by two special function registers
TCON and TMOD.
In the following descriptions the symbols TH0 and TL0 are used to specify the high-byte
and the low-byte of timer 0 (TH1 and TL1 for timer 1, respectively). The operating modes
are described and shown for timer 0. If not explicity noted, this applies also to timer 1.
User’s Manual
4-9
V 0.4, 2002-01