Skip to content
The Computer Science
TheCScience
  • Engineering Subjects
    • Human Values
    • Computer System Architecture
    • Microprocessor
    • Digital Communication
    • Internet of Things
  • NCERT Solutions
    • Class 12
    • Class 11
  • Solutions
    • HackerRank
      • C Solutions
      • C++ Solutions
      • Java Solutions
      • Python Solutions
      • Algorithms Solutions
      • Data Structures Solutions
    • HackerEarth Solutions
    • Leetcode Solutions
  • JEE 2027
The Computer Science
TheCScience

Serial Communication in 8051 Microcontroller

YASH PAL, April 13, 2026May 1, 2026

Serial Data Communication in 8051 Microcontroller – The 8051 microcontroller is able to support serial communication to make the system cost-effective for transmitting and receiving data bits serially. The 8051 microcontroller uses a register named SBUF to hold the data. This register comprises two registers. One is used to hold data to be sent out of the 8051 via a pin – TxD (P3.1).

The other holds received data from the external source via a pin – RxD(P3.0). Both registers have the same internal address 99H. Register SCON (Serial Port Control) is used to control the data communication. It is an 8-bit special function register as shown in Figure 1. The SCON register can choose four programmable modes for serial communication.

Table of Contents

  • 8051 Microcontroller Serial Data Communication
    • The Serial Port Control (SCON) Special Function Register
    • The Interrupt Enable (IE) Special Function Register

8051 Microcontroller Serial Data Communication

The 8051 microcontroller can be configured in one of the four modes for serial data communication. A programmer can select the mode by setting the mode bits SM0 and SM1 in the SCON register.

Data Transmission – The transmission of data bits starts serially when the data byte that is to be transmitted is stored in the SBUF register. When transmission is completed, the T1 flag of the SCON register is set to indicate that SBUF is empty. An interrupt signal may be generated if more data has to be transmitted.

Data Reception – The serial data reception is done on the pin RxD (P3.0). It starts when the REN bits of the SCON register are set for all operating modes. For mode 0, the R1 bit must be reset before reception starts. The R1 is set after receiving data in SBUF.

Data Interruption – Whenever data communication is over, the corresponding flag of SCON gets set. For data transmission, the T1 flag gets set, whereas for data reception, the R1 flag gets set. These flags are ORed together to produce an interrupt to the program. The program must read these flags to determine which caused the interrupt and then clear the flag.

The Serial Port Control (SCON) Special Function Register

The serial port control special function register
Figure 1: Serial port control (SCON) register Diagram
BitSymbolFunction
7SM0Serial port mode bit 0. Set/cleared by program to select mode.
6SM1Serial port mode bit 1. Set/cleared by program to select mode.
SM0 SM1 Mode Description
0 0 0 Shift register; baud = f/12
0 1 1 8-bit UART; baud = variable
1 0 2 9-bit UART; baud = f/32 or f/64
1 1 3 9-bit UART; baud = variable
5SM2Multiprocessor communications bit. Set/cleared by program to enable multiprocessor communications in modes 2 and 3. When set to 1, an interrupt is generated if bit 9 of the received data is 1; no interrupt is generated if bit 9 is 0. If set to 1 for mode 1, no interrupt will be generated unless a valid stop bit is received. Clear to 0 if mode 0 is in use.
4RENReceive enable bit. Set to 1 to enable reception; cleared to 0 to disable reception.
3TB8Transmitted bit 8. Set/cleared by program in modes 2 and 3.
2RB8Received bit 8. Bit 8 of received data in modes 2 and 3; stop bit in mode 1. Not used in mode 0;
1TITransmit interrupt flag. Set to one at the end of bit 7 time in mode 0, and at the beginning of the stop bit for other modes. Must be cleared by the program.
0RIReceive Interrupt flag. Set to one at the end of bit 7 time in mode 0, and halfway through the stop bit for other modes. Must be cleared by the program.

Bit addressable as SCON.0 TO SCON.7

To control the data rates, another special function register, PCON (Power Mode Control), is used. It is shown in Figure 2.

The Interrupt Enable (IE) Special Function Register

Power Mode Control (PCON) Register
Figure 2: Power Mode Control (PCON) Register Diagram
BitSymbolFunction
7EAEnable the interrupt bit. Cleared to 0 by the program to disable all interrupts; set to 1 to permit individual interrupts to be enabled by their enable bits.
6–Not implemented.
5ET2Reserved for future use.
4ESEnable serial port interrupt. Set to 1 by the program to enable the serial port interrupt; cleared to 0 to disable the serial port interrupt.
3ET1Enable timer 1 overflow interrupt. Set to 1 by the program to enable timer 1 overflow interrupt; cleared to 0 to disable timer 1 overflow interrupt.
2EX1Enable external interrupt 1. Set to 1 by the program to enable INT1 interrupt; cleared to 0 to disable INT1 interrupt.
1ET0Enable timer 0 overflow interrupt. Set to 1 by the program to enable timer 0 overflow interrupt; cleared to 0 to disable timer 0 overflow interrupt.
0EX0Enable external interrupt 0. Set to 1 by the program to enable the INT0 interrupt; cleared to 0 to disable the INT0 interrupt. Bit addressable as IE.0 to IE.7.

Microprocessor Subject Tutorials & Notes | Beginners Guide
engineering subjects Microprocessor microprocessor

Post navigation

Previous post
Next post

Introduction to Microprocessor
Generations of Computer
Microprocessor Types
Types of Computer Systems
Types of Programming Languages
Basic Computer Structure
Interfacing Logic Devices
Number System in Computer
Number System Arithmetic – Addition & Subtraction

Microprocessor as CPU
8085 Microprocessor Architecture
Pin Configuration of 8085 Microprocessor
Demultiplexing of Address and Data Bus in 8085 Microprocessor
Basic Operations of the 8085 Microprocessor
Memory Organization in 8085 Microprocessor

Microprocessor memory structure
Memory Interfacing with 8085 Microprocessor
Memory address decoding in a microprocessor
Input/Output Interfacing in Microprocessor

8085 Microprocessor Programming Model
8085 Assembly Language Programming
8085 Microprocessor Instructions
Microprocessor Programming Steps
Flowchart Design of a Program
8085 Microprocessor Data Transfer Instructions
8085 Microprocessor Arithmetic Instructions
8085 Microprocessor Logical Instructions
8085 Microprocessor Branch Instructions
8085 Microprocessor Machine-Processor Control Instructions
Basic Structure of an Assembly Language Program
Programming Techniques for Repeated Tasks
Debugging of a Microprocessor Program

8085 Microprocessor Timing Operations
Timing Diagram of 8085 Microprocessor
Time Delay in Microprocessor
Stack in 8085 Microprocessor
Subroutine in 8085 Microprocessor
MACRO in Microprocessor

Interrupts in 8085 Microprocessor
Digital to Analog Converter (DAC) in Microprocessor
Analog to Digital Converter (ADC) in Microprocessor

Programmable Peripheral Interface
8255 (PPI) Programmable Peripheral Interface
Programmable Interval Timer (PIT) 8253/8254
Programmable Interrupt Controller (PIC) 8259
Direct Memory Access (DMA) Controller 8257

8086 Microprocessor Architecture, Instructions, and Pin Diagram
Addressing Modes of the 8086 Microprocessor
Instruction Set of 8086 Microprocessor
8088 Microprocessor Architecture with Pin Diagram
Difference between 8085, 8086, and 8088 Microprocessors
80186 Microprocessor Architecture
80286 Microprocessor Architecture & Features
80386 Microprocessor Architecture & Features
80486 Microprocessor Architecture & Features
80586 (Pentium) Microprocessor Architecture & Features

8051 Microcontroller Architecture
8051 Microcontroller Memory Organization
8051 Microcontroller Pin Configuration & Programming Model
8051 Microcontroller Timers and Counters
Serial Communication in 8051 Microcontroller
Interrupts of the 8051 Microcontroller
Addressing Modes of the 8051 Microcontroller
Intel MMX Architecture
Dual Core Processor

LED & Multiplexed Display Interfacing with Microprocessor
Liquid Crystal Display (LCD) Pin Configuration & Interfacing
Matrix Keyboard Interfacing with Microprocessor
8279 Keyboard/Display Controller
Programmable Communication Interface (USART) 8251
Serial Communication Standards in Microprocessor
Computer System Standard Buses

TheCScience

At TheCScience.com, our mission is to make quality education accessible to everyone. We provide in-depth, easy-to-understand articles covering Secondary, Senior Secondary, and Graduation-level subjects.

Our content is designed to simplify complex concepts through clear explanations, diagrams, and structured learning—helping students build strong fundamentals and succeed academically without financial barriers.

Pages

About US

Contact US

Privacy Policy

DMCA

Our Tools

Hosting - get 20% off

Engineering Subjects

Internet of Things

Human Values

Digital Communication

Computer System Architecture

Microprocessor

Programming Tutorials

Data Structure and Algorithm

C

Java

NCERT

Class 12th

©2026 TheCScience | WordPress Theme by SuperbThemes