i~.
HARDWARE DESCRIPTION OF THE 8051,8052 AND 80C51
Osc
[A
I
'
ICOJTROL'
'J:L'H
'F'
k
INTERRUPT
270252-9
Figure 7. Timer/Counter 1 Mode O:13-Bit Counter
(MSB]
(LSB)
[
TFl
TRl
TFo
TRO
IE1
IT1
IEO
ITO
symbol
POaltlon
Nelnesnds@meanm
TF1
TCON.7
llner 1 overflowFlag. Set by
hardware on Tw/Counter
overflow.
Cleared byherdwerewtten proc-
veetorsto intemupt routine.
TR1
TmN.6
l%ner 1 Run eontml biLSet/cleared
by sottwsreto tum Tkn6f/Counte?WI
off.
TFo
TCON.5
Timer Oovsrfiow Flag.Set by
herdwsreon Timef/Camter overflow.
Cleared byhsrdware whan pmmee.or
veetorsto intemuptmutine.
TRO
TCON.4
Timer ORuncontml ML SatJcleared
byeoftwareto tum Timer/Counter on/
off,
-1
Posltlon
Neme mdslgnlffcenm
IE1
Tc%+J.3
Interrupt1 Edgs flsg. Sstbyhardwsre
when external intenupt~ge
deteeted. Cfesmdwhen interrupt
prmeesed.
IT1
TCON.2
Intenupt 1 Type mntrd bk Set/
elearadbyaofttnr etoapecifyfsiiing
sdgdbw level biggwadesternel
interrupts.
IEO
TU)N.1
lntenuptOEdgsfleg. Set byhsrdwsre
when external intsfruptedge
detected. Cleared *
interrupt
~.
ITO
TCON.O
InterruptOTyPSmntrol biLSet/
cleared by sdtwereto speeifyfslling
ed@k3wlevel tr@geredexternsl
interrupt
Figure 8.TCON: Timer/Counter Control Register
MODE 2
Timer O in Mode 3 establieheaTLOand THOas two
separate counters.The logicfor Mode 3 on Timer Ois
Mode2 configures theTimerregister a san 8-bitCoun-
sh_own inFigure10.TLO&estheTimerOcontrol b its:
ter
('TLl)with
automatic
reload,
as
shownin Figure 9.
Cfi, GATE,TRO,INTO,and TFO.THOis lockedinto
OverfiowfromTL1 not only sets TFl, but also reloads
a timer function
(counting
machine
cycles)and takes
TL1 with the contentsof THl, which is preset by aoft-
over the useof TR1 and TFl fromTimer 1.Thus THO
ware. The reload leav~ THI unchanged.
now controlsthe "Timer 1" interrupt.
Mode 2 operationis the same for Timer/Counter O.
Mode 3 is providedfor applicationsrequiringan extra
8-bit timer or counter. With Timer o in Mode 3, gIL
MODE 3
8051ean
looklike it has three Timer/Counte~ and an
8052, like it has four. When Timer O is in Mode 3.
Timer 1in Mode3 simplyholds its count.The effeetis
Tim~ 1 een be tinned on and off by switchingit out of
the ssrne as setting TRl = O.
and into its own Mode 3, or esn still be used by the
serial DOrtae s baud rate mnerstor, or in fact, in
any
appli~tion not requiring& iaterru~t.
3-11
Need help?
Do you have a question about the MCS 51 and is the answer not in the manual?