8051 Serial Communication
8051 Serial Communication
COMMUNICATION
8051
INTRODUCTION
• Serial data transmission is very commonly used for
digital data communication.
• Its main advantage is that the number of wires
needed is reduced as compared to that in parallel
communication.
• 8051 supports a full duplex serial port. Full duplex
means, it can transmit and receive a byte
simultaneously.
CONTINUED…
• 8051 has TXD and RXD pins for transmission and
reception of serial data respectively.
• The 8051 serial communication is supported by
RS232 standard. The term "RS" stands for
Recommended Standard.
• Communication between two microcontrollers and
multiprocessor communication is also possible.
Basics of Serial Communication
• Serial data communication uses two methods
• The start bit is always one bit, but the stop bit can be
(high)
CONTINUED…
• In serial transmission, baud rate is one important
factor.
• The baud rate is the reciprocal of the time to send
1 bit.
• The basic mechanism of serial transmission is
that a data byte in parallel form is converted into
serial data stream. Along with some more bits like
start, stop and parity bits, a serial data frame is
sent over a line.
CONTINUED…
• There are four modes of serial data transmission
in 8051.
• In each of these modes, it is important to decide
the baud rate, the way in which serial data frame
is sent and any other information, etc.
BAUD RATE
• The 8051 transfers and receives data serially at
many different baud rates. The baud rate in the
8051 is programmable.
• For this purpose, Timer 1 is used and it must be
programmed in mode
• 2 (8 bit auto reload)
REGISTERS USED
• 8051 requires the following registers to perform
the serial communication
• SBUF (Serial Buffer)