EasyManuals Logo

Intel MCS 51 User Manual

Intel MCS 51
334 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Page #124 background imageLoading...
Page #124 background image
i~.
HARDWAREDESCRIPTION OF THE 8051,8052 AND 80C51
UsingTimer
1 to Generate Baud Rates
mode(high nibbleof TMOD = OO1OB),In that ease,
the baud rate is givenby the formula
WhenTimer 1 is used as the baudrate generator, the
baud rates in Modes 1 and 3 are determin
ed by the
Modes1,3 2SMOD
~ OscillatorFrequency
Timer 1 overflowrate and the valueof SMOD as fol-
BaudRate = —
lows:
32 L%[256-
(THI)I
ModesL 3
2SMOD
One ean achieveverylowbaud
rateswithTimer 1 by
BaudRate = —
X (Timer1OverflowRate)
leavingthe Timer 1interrupt enabl~ and mntlguring
32
the Timer to run as a 16-bit timer (hish nibble of
TMOD = OOOIB),and usingthe TiM~ I_interruptto
TheTimer 1interrupt shouldbe disabledin this appli- do a lti-bit softwarereload.
cation. The Timer itself can be configuredfor either
ā€œtimerā€ or ā€œcormterā€ operation,and in any of its 3 Figure 15lists variouseommordyusedbaudrates and
runningmodes. In the most typioaiaprdication~it is
howthey can be obtsinedfrom Timer 1.
contl~ed for ā€œtimerā€ operati6n,inā€˜the auto-reload
I
Saud Rate
I
f~c
SMOD
ModeOMax:1MHZ 12MHZ
x
Mode2 Msx:375K 12 MHZ 1
Modes 1,3: 62.5K 12MHZ 1
19.2K 11.059MHZ 1
9.6K 11.059MHZ o
4.8K 11.059MHZ o
2.4K 11.059MHZ o
1.2K
11.059MHZ o
137.5
11.986MHZ o
110 6 MHZ o
110 12 MHZ o
Timer
Cfl
T
x
o
0
0
0
0
0
0
0
0
Mode
x
x
2
2
2
2
2
2
2
2
1
1
Reload
Value
x
x
FFH
FDH
FDH
FAH
F4H
E8H
lDH
72H
FEEBH
Figure 15.Timer 1 Ganerated Commonly Ueed Baud Rates
Using Timer 2 to Generate
SaudRates
11).Note then the baud rates for transmit and reoeive
can be simultaneouslydifferent.SettingRCLK and/or
In the 8052,Timer2 is selectedasthebaud rate genera- TCLK putsTimer2 into its baud rate generatormode,
tor bysettingTCLK rind/or RCLKin T2CON(Figure as shownin Figure 16.
piol?:lxcmm ls-
Svam’rlz
r+l
+2
r=
2!3?’
Inm Mm
-—
ā€œā€œ-=’
L.z.———
k.
ā€œ i
---amo
.,ā€ .W,
-- ---
.,’ mx-
. ,,
1 ā€œo-
------
+,’ ā€˜1’ XCLOCK
270252-14
Figure 16. Timer 2 in Saud RateGeneratorMode
3-16

Table of Contents

Questions and Answers:

Question and Answer IconNeed help?

Do you have a question about the Intel MCS 51 and is the answer not in the manual?

Intel MCS 51 Specifications

General IconGeneral
BrandIntel
ModelMCS 51
CategoryMicrocontrollers
LanguageEnglish

Related product manuals