XC886/888CLM
Timers
User’s Manual
13-4
V1.3, 2010-02
Timers, V 1.0
13.1.2.1
Mode 0
Putting either Timer 0 or Timer 1 into mode 0 configures it as an 8-bit timer/counter with
a divide-by-32 prescaler.
In this mode, the timer register is configured as a 13-bit register. As the count rolls over
from all 1s to all 0s, it sets the timer overflow flag TFx. The overflow flag TFx can then
be used to request an interrupt. The counted input is enabled for the timer when TRx = 1
and either GATEx = 0 or EXINTx = 1 (setting GATEx = 1 allows the timer to be controlled
by external input EXINTx to facilitate pulse width measurements). TRx is a control bit in
the register TCON; bit GATEx is in register TMOD..
The 13-bit register consists of all the 8 bits of THx and the lower 5 bits of TLx. The upper
3 bits of TLx are indeterminate and should be ignored. Setting the run flag (TRx) does
not clear the registers..
Mode 0 operation is the same for Timer 0 and Timer 1.
Figure 13-1
Timer 0, Mode 0: 13-Bit Timer/Counter
TL0
(5 Bits)
TF0
f
PCLK
/2
TH0
(8 Bits)
&
>1
=1
Timer0_Mode0
Interrupt
GATE0
Control
TR0
EXINT0
T0S = 0
T0
T0S = 1
*
Содержание XC886CLM
Страница 1: ...User s Manual V1 3 2010 02 Microcontrollers 8 Bit XC886 888CLM 8 Bit Single Chip Microcontroller...
Страница 3: ...User s Manual V1 3 2010 02 Microcontrollers 8 Bit XC886 888CLM 8 Bit Single Chip Microcontroller...
Страница 324: ...XC886 888CLM Serial Interfaces User s Manual 12 52 V1 3 2010 02 Serial Interfaces V 1 0...
Страница 663: ...w w w i n f i n e o n c o m Published by Infineon Technologies AG...