Unit 2 - 8051 Serial Communication
Unit 2 - 8051 Serial Communication
Communication
1
8051 - UART
2
network
SBUF (Serial BUFfer Register) 99H
3
clock pulse
During Reception:
data is sampled on every falling edge of clock pulse
and shifted to SBUF on every raising edge of clock
Used in high speed serial communication
Mode 1: Standard UART
8
During Transmission:
Data is transmitted as start bit first, eight data bits (LSB first)
sent.
Each bit time interval is inverse of baud rate frequency.
During Reception:
Data bits are shifted into the receiver at programmed baud rate,
and the data word will be loaded to SBUF if RI = 0, Implies that
program has read the previous data byte and ready to receive
the next byte
Of the original 10 bits, the start bit is discarded, the eight data
bits go to SBUF, and the stop bit is saved in RB8 of SCON.
Then RI is set to 1 indicating a new data byte has been received.
Mode1 : Baud rates
10
SMOD = 0 SMOD = 1
9 data bits
1 stop bit
The 9th data bit is copied from bit TB8 in SCON during
transmission and stored in bit RB8 of SCON when data
is received.
Baud rate is
Is SMOD = 1;
Mode 3: 9 – Bit UART with variable baud rate
13