
Rev. 1.00
137 of ���
�an�a�� 1�� �01�
Standard 8051 8-Bit Flash MCU
HT85F2260/HT85F2270/HT85F2280
Timer/Event Counters 0, 1, 3
Timer/Event Counters 0, 1, 3
Mode 3 – Two 8-Bit Timers/Counters Mode Operation – Timer 0 Only
To select this mode, bits T0M1 and T0M0, should be set to “11” respectively. This mode is only
available for Timer 0. For Timer 1 and Timer 3, this mode is not available and if selected will stop
the timer function. The two 8-bit Timer/Counter function is implemented by the two individual 8-bit
TL0 and TH0 registers. TL0 can have both Timer and Counter functions while TH0 can only have
a Timer function. The C/T0 bit is used to select the timer or counter function for TL0. The TL0
Run or Stop is controlled by the TR0 bit. If the Counter function is selected, the TR0 and GATE0
bits can be used to manage the external INT0 input to count external edge transitions or to measure
input pulse widths. If the TL0 counter overflows, an interrupt will be generated and the interrupt
request flag, TF0, will be set high. The timer/counter clock source is decided by the T0PRE0 and
T0PRE1 bits in the TMPRE register.
In addition to TL0, the other 8-bit timer, TH0, can use the TR1 bit to enable the Timer. If the TH0
counter overflows, an interrupt will be generated and the interrupt request flag, TF1, will be set
high. The timer clock source is decided by the T0PRE0 and T0PRE1 bits in the TMPRE register.
The following block illustrates the two 8-bit Timer/Counters basic operational blocks.
f
SYS
T0
TR0
GATE0
INT0
TL0
TH0
TR1
P
�e
sc
ale
�
f
SYS
/4
f
SYS
f
SYS
/6
f
SYS
/1�
/
T0PRE[1:0]
C/T0=0
C/T0=1
MUX
Inte���pt TF1 flag
Inte���pt TF0 flag
Mode 3 Block Diagram – Timer 0