Author :
Craig
Steiner
Source :
8052.com
Book :
The
8051/8052
Microcontroller:
Architecture,
Assembly
Language,
And
Hardware
Interfacing
(Paperback)
Setting
the
Serial
Port
Baud
Rate
Once the
Serial
Port
Mode has
been
configured,
as
explained
above,
the
program
must
configure
the
serial
port’s
baud
rate.
This
only
applies
to
Serial
Port
modes 1
and 3.
The Baud
Rate is
determined
based on
the
oscillator’s
frequency
when in
mode 0
and 2.
In mode
0, the
baud
rate is
always
the
oscillator
frequency
divided
by 12.
This
means if
you’re
crystal
is
11.059Mhz,
mode 0
baud
rate
will
always
be
921,583
baud. In
mode 2
the baud
rate is
always
the
oscillator
frequency
divided
by 64,
so a
11.059Mhz
crystal
speed
will
yield a
baud
rate of
172,797.
>>>
Enter
here for
detail
on
"Setting
the
Serial
Baud
Rate" <<<