English
Language : 

W78E054D Datasheet, PDF (50/89 Pages) List of Unclassifed Manufacturers – 8-bit microcontroller
W78E054D/W78E052D Data Sheet
Fosc
T0=P3.4
(T1=P3.5)
TR0=TCON.4
(TR1=TCON.6)
GATE=TMOD.3
(GATE=TMOD.7)
INT0=P3.2
(INT1=P3.3)
1/12
C/T=TMOD.2
(C/T=TMOD.6)
0
1
M1, M0=TMOD.1, TMOD.0
(M1, M0=TMOD.5, TMOD.4)
0
4
7
TL0
(TL1)
00
0
7
01
TH0
(TH1)
TFx
TF0
(TF1)
Interrupt
Timer/Counter Mode0,1
Figure 14–1 Timer/Counters 0 & 1 in Mode 0, 1
14.2.3 Mode 2
In Mode 2, the timer/counter is in the Auto Reload Mode. In this mode, TLx acts as an 8-bit count reg-
ister, while THx holds the reload value. When the TLx register overflows from FFh to 00h, the TFx bit
in TCON is set and TLx is reloaded with the contents of THx, and the counting process continues from
here. The reload operation leaves the contents of the THx register unchanged. Counting is enabled by
the TRx bit and proper setting of GATE and INTx pins. As in the other two modes 0 and 1 mode 2 al-
lows counting of clock/12 or pulses on pin Tn.
Fosc
1/12
C/T=TMOD.2
(C/T=TMOD.6)
0
TL0
(TL1)
T0=P3.4
(T1=P3.5)
0
7
TFx
Interrupt
1
TF0
(TF1)
TR0=TCON.4
(TR1=TCON.6)
GATE=TMOD.3
(GATE=TMOD.7)
INT0=P3.2
(INT1=P3.3)
0
7
TH0
(TH1)
Timer/Counter Mode2
Figure 14–2 Timer/Counter 0 & 1 in Mode 2
14.2.4 Mode 3
Mode 3 has different operating methods for the two timer/counters. For timer/counter 1, mode 3 simply
freezes the counter. Timer/Counter 0, however, configures TL0 and TH0 as two separate 8 bit count
registers in this mode. The logic for this mode is shown in the figure. TL0 uses the Timer/Counter 0
control bits C/ T , GATE, TR0, INT0 and TF0. The TL0 can be used to count clock cycles (clock/12) or
1-to-0 transitions on pin T0 as determined by C/T (TMOD.2). TH0 is forced as a clock cycle counter
(clock/12) and takes over the use of TR1 and TF1 from Timer/Counter 1. Mode 3 is used in cases
where an extra 8 bit timer is needed. With Timer 0 in Mode 3, Timer 1 can still be used in Modes 0, 1
- 50 -
Publication Release Date: Jun 9, 2015
Revision A13