English
Language : 

C508_01 Datasheet, PDF (85/267 Pages) Infineon Technologies AG – 8-Bit CMOS Microcontroller
C508
On-Chip Peripheral Components
6.2.1.2 Mode 0
Putting either Timer/counter 0 or Timer/counter 1 into mode 0 configures it as an 8-bit
timer/counter with a divide-by-32 prescaler. Figure 6-9 shows the mode 0 operation.
In this mode, the timer register is configured as a 13-bit register. As the count rolls over
from all ‘1’s to all ‘0’s, it sets the timer overflow flag TF0. The overflow flag TF0 then can
be used to request an interrupt. The counted input is enabled to the timer when TR0 = 1
and either Gate = 0 or INT0 = 1 (setting Gate = 1 allows the timer to be controlled by
external input INT0, to facilitate pulse width measurements). TR0 is a control bit in the
special function register TCON; Gate is in TMOD.
The 13-bit register consists of all eight bits of TH0 and the lower 5 bits of TL0. The upper
three bits of TL0 are indeterminate and should be ignored. Setting the run flag (TR0)
does not clear the registers.
Mode 0 operation is the same for Timer 0 as for Timer 1. Substitute TR0, TF0, TH0, TL0
and INT0 for the corresponding Timer 1 signals in Figure 6-9. There are two different
gate bits, one for Timer 1 (TMOD.7) and one for Timer 0 (TMOD.3).
OSC ÷3
P3.4/T0 Pin
=1
Gate
C/T = 0
C/T = 1
TR0
&
≥1
TL0 TH0
(5 Bits) (8 Bits)
Control
TF0
Interrupt
P3.2/INT0 Pin
Figure 6-9 Timer/Counter 0, Mode 0: 13-Bit Timer/Counter
MCS04050
User’s Manual
6-20
2001-05