5. Two basic transmission modes:
-Asynchronous: transmitter and receiver
clocks are independent.
-Synchronous: transmitter and receiver
modes are synchronized.
6. Framing:
-Data word(octet) is encapsulated between
start bit
stop bit c
-receiver resynchronizes again at a start of each new word
or character received.
7.
8. Its an industry acronym which stands for
Universal Asynchronous Receiver
Transmitter.
It is the interface circuitry between the
microprocessor and the serial port.
It is responsible for breaking apart bytes of
data.
And transmitting it one bit at a time(i.e.
Serially)
9. It was designed by EIA(Electronics
Industries Association).
Voltage specifications:
-3V to -25V -- logic 1
+3V to +25V -- logic 2
Some specific signals
10.
11. SBUF: Serial Buffer Register
-data moved to SBUF is transmitted
serially.
-serial data Rx-ed is stored by 8051 in
SBUF.
Example:
SBUF=‘char’;
variable=SBUF;
SFR: special function register
12.
13.
14.
15.
16. This only applies to Serial Port modes 1 and 3.
The Baud Rate is determined based on the
oscillators frequency when in mode 0 and 2.
In mode 0, the baud rate is always the oscillator
frequency divided by 12.
This means if your 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.
18. The basic equation for a timer reload value
can be stated as:
TH1 = 256 – Crystal Frequency/384 (or 192 if SMOD = 1)
Baud Rate
Example:
To obtain a timer reload value for a 9600 baud
serial data rate with an 11.0592 MHz crystal:
=256 – 11.0592/384
9600
= 256 – 3
= 253 or FD (hexadecimal)
19. The equation can also be solved to derive
the baud rate or the crystal frequency from
the other information as follows:
Baud Rate = Crystal Frequency/384 (or 192 if SMOD = 1)
256 – TH1