SlideShare a Scribd company logo
1 of 33
8051- SERIAL COMMUNICATION
Basics of Serial Communication
• Computers transfer data in two ways:
Types of Serial communications
Asynchronous vs. Synchronous Transmission Modes
• Serial data communication uses two methods
– Synchronous method transfers a block of data at a
time
– Asynchronous method transfers a single byte at a
time
Asynchronous – Start & Stop Bit
• Asynchronous serial data communication is
widely used for character-oriented transmissions
– Each character is placed in between start and stop
bits, this is called framing.
• The start bit is always one bit, but the stop bit
can be one or two bits
• The start bit is always a 0 (low) and the stop
bit(s) is 1 (high)
Asynchronous serial communication synchronous serial communication
transmitter and receiver are not
synchronized by clock.
transmitter and receiver are synchronized
by clock.
Character may arrive at any rate at
receiver.
Character is received at constant rate.
Data transfer is character oriented Data transfer takes place in blocks.
Start and stop bits are required to
establish communication of each
character.
Start and stop bits are not required to
establish communication of each
character, however ,synchronization bits
are required to transfer the data block.
Used in low-speed transmissions Used in high-speed transmissions
• There are special IC’s made by many
manufacturers for serial communications.
– UART (universal asynchronous Receiver
transmitter)
– USART (universal synchronous-asynchronous
Receiver-transmitter)
Data Transfer Rate
• The rate of data transfer in serial data
communication is stated in bps (bits per second).
• Another widely used terminology for bps is baud
rate.
• Serial port of 8051 is full duplex, means it can
transmit and receive simultaneously.
8051 Registers related to Serial
Communication
1. SBUF Register -- to hold data
2. SCON Register -- controls data communication
3. PCON Register -- controls data rates
SBUF Register
• SBUF is an 8-bit register used for serial communication.
• For a byte data to be transferred via the TxD line, it must be
placed in the SBUF register.
• The moment a byte is written into SBUF, it is framed with the
start and stop bits and transferred serially via the TxD line.
• SBUF holds the byte of data when it is received by 8051 RxD
line.
• When the bits are received serially via RxD, the 8051 deframes
it by eliminating the stop and start bits, making a byte out of
the data received, and then placing it in SBUF.
NOTE: SBUF is physically two registers . one
is write only and is used to hold data to be
transmitted out of the 8051 via TXD. The
other is read only and holds received data
from external sources via RXD. Both mutually
exclusive registers use address 99h.
Serial Port Control (SCON) Register
SM0 SM1 SM2 REN TB8 RB8 TI RI
Enable Multiprocessor
Communication Mode
Set to Enable
Serial Data
reception
9th Data Bit
transmitted in
Modes 2,3
9th Data Bit
Received in Mode 2,3
Set when Stop bit Txed
Set when a Cha-
ractor received
SM0 , SM1
8051 Serial Port – Mode 0
The Serial Port in Mode-0 has the following
features:
1. Serial data enters and exits through RXD
2. TXD outputs the clock
3. 8 bits are transmitted / received
4. The baud rate is fixed at (1/12) of the oscillator frequency
8051 Serial Port – Mode 1
The Serial Port in Mode-1 has the following
features:
1. Serial data enters through RXD
2. Serial data exits through TXD
3. On receive, the stop bit goes into RB8 in SCON
4. 10 bits are transmitted / received
1. Start bit
2. Data bits (8)
3. Stop Bit
5. Baud rate is determined by the Timer 1 over flow rate.
Standard UART data word under mode-1
8051 Serial Port – Mode 2
The Serial Port in Mode-2 has the following
features:
1. Serial data enters through RXD
2. Serial data exits through TXD
3. 9th data bit (TB8) can be assign value 0 or 1
4. On receive, the 9th data bit goes into RB8 in SCON
5. 11 bits are transmitted / received
1.Start bit
2.Data bits (9)
3.Stop Bit
6. Baud rate is programmable
8051 Serial Port – Mode 3
The Serial Port in Mode-3 has the following
features:
1. Serial data enters through RXD
2. Serial data exits through TXD
3. 9th data bit (TB8) can be assign value 0 or 1
4. On receive, the 9th data bit goes into RB8 in SCON
5. 11 bits are transmitted / received
1.Start bit
2.Data bits (9)
3.Stop Bit
6. Baud rate is determined by Timer 1 overflow rate.
• REN (Receive Enable) also referred as SCON.4.
When it is high,it allows the 8051 to receive
data on the RxD pin. So to receive and transfer
data REN must be set to 1.When REN=0,the
receiver is disabled
• TB8 & RB8 are used in mode 2 ,3
• TI (Transmit interrupt)
When 8051 finishes the transfer of 8-bit
character, it raises the TI flag to indicate that it is
ready to transfer another byte. The TI bit is raised at
the beginning of the stop bit.
• RI (Receive interrupt)
When the 8051 receives data serially ,via
RxD, it gets rid of the start and stop bits and places
the byte in the SBUF register.Then it raises the RI flag
bit to indicate that a byte has been received and
should be picked up before it is lost.RI is raised
halfway through the stop bit.
Doubling Baud Rate
• There are two ways to increase the baud rate
of data transfer
1. By using a higher frequency crystal
2. By changing a bit in the PCON register
Power Mode Control (PCON) Register
• PCON register is an 8-bit SFR.
• it is byte addressable register.
SMOD: double baud rate bit. When 8051 is powered up, SMOD bit is
at zero value. To double the baud rate SMOD to be set to 1.
• PD: power down bit . Setting this bit high
activates power down mode known also sleep
mode. In this mode, the CPU puts the whole
chip to sleep by turning off the oscillator.
under this mode power consumption
becomes minimum.
• IDL : idle mode, setting this mode bit high
activates idle mode. In this mode, the
oscillator continues to provide clock to the
peripherals, but no clock is provided to the
CPU, as the CPU is under sleep state.
Note: if PD and IDL are set to high at the same
time, PD takes precedence.

More Related Content

What's hot

Keypad Interfacing with 8051 Microcontroller
Keypad Interfacing with 8051 MicrocontrollerKeypad Interfacing with 8051 Microcontroller
Keypad Interfacing with 8051 MicrocontrollerSudhanshu Janwadkar
 
Serial peripheral Interface - Embedded System Protocol
Serial peripheral Interface - Embedded System ProtocolSerial peripheral Interface - Embedded System Protocol
Serial peripheral Interface - Embedded System ProtocolAditya Porwal
 
Addressing modes of 8086
Addressing modes of 8086Addressing modes of 8086
Addressing modes of 8086Dr. AISHWARYA N
 
Serial Communication
Serial CommunicationSerial Communication
Serial CommunicationUshaRani289
 
DAC Interfacing with 8051.pdf
DAC Interfacing with 8051.pdfDAC Interfacing with 8051.pdf
DAC Interfacing with 8051.pdfSrikrishna Thota
 
Architecture of 8086 Microprocessor
Architecture of 8086 Microprocessor  Architecture of 8086 Microprocessor
Architecture of 8086 Microprocessor Mustapha Fatty
 
8085 MICROPROCESSOR ARCHITECTURE AND ITS OPERATIONS
8085 MICROPROCESSOR ARCHITECTURE AND ITS OPERATIONS8085 MICROPROCESSOR ARCHITECTURE AND ITS OPERATIONS
8085 MICROPROCESSOR ARCHITECTURE AND ITS OPERATIONSRamaPrabha24
 
8051 Microcontroller I/O ports
8051 Microcontroller I/O ports8051 Microcontroller I/O ports
8051 Microcontroller I/O portsanishgoel
 
Addressing modes of 8086
Addressing modes of 8086Addressing modes of 8086
Addressing modes of 8086saurav kumar
 
Memory & I/O interfacing
Memory & I/O  interfacingMemory & I/O  interfacing
Memory & I/O interfacingdeval patel
 
8051 Addressing Modes
8051 Addressing Modes8051 Addressing Modes
8051 Addressing ModesSenthil Kumar
 
Error detection and correction
Error detection and correctionError detection and correction
Error detection and correctionMaria Akther
 
8086 pin details
8086 pin details8086 pin details
8086 pin detailsAJAL A J
 
Arm organization and implementation
Arm organization and implementationArm organization and implementation
Arm organization and implementationShubham Singh
 

What's hot (20)

Keypad Interfacing with 8051 Microcontroller
Keypad Interfacing with 8051 MicrocontrollerKeypad Interfacing with 8051 Microcontroller
Keypad Interfacing with 8051 Microcontroller
 
Interrupts in 8051
Interrupts in 8051Interrupts in 8051
Interrupts in 8051
 
Serial peripheral Interface - Embedded System Protocol
Serial peripheral Interface - Embedded System ProtocolSerial peripheral Interface - Embedded System Protocol
Serial peripheral Interface - Embedded System Protocol
 
Addressing modes of 8086
Addressing modes of 8086Addressing modes of 8086
Addressing modes of 8086
 
Serial Communication
Serial CommunicationSerial Communication
Serial Communication
 
DAC Interfacing with 8051.pdf
DAC Interfacing with 8051.pdfDAC Interfacing with 8051.pdf
DAC Interfacing with 8051.pdf
 
ARM Processors
ARM ProcessorsARM Processors
ARM Processors
 
Architecture of 8086 Microprocessor
Architecture of 8086 Microprocessor  Architecture of 8086 Microprocessor
Architecture of 8086 Microprocessor
 
UART
UARTUART
UART
 
8085 MICROPROCESSOR ARCHITECTURE AND ITS OPERATIONS
8085 MICROPROCESSOR ARCHITECTURE AND ITS OPERATIONS8085 MICROPROCESSOR ARCHITECTURE AND ITS OPERATIONS
8085 MICROPROCESSOR ARCHITECTURE AND ITS OPERATIONS
 
8051 Microcontroller I/O ports
8051 Microcontroller I/O ports8051 Microcontroller I/O ports
8051 Microcontroller I/O ports
 
Addressing modes of 8086
Addressing modes of 8086Addressing modes of 8086
Addressing modes of 8086
 
Memory & I/O interfacing
Memory & I/O  interfacingMemory & I/O  interfacing
Memory & I/O interfacing
 
I2C BUS PROTOCOL
I2C BUS PROTOCOLI2C BUS PROTOCOL
I2C BUS PROTOCOL
 
8051 Addressing Modes
8051 Addressing Modes8051 Addressing Modes
8051 Addressing Modes
 
Error detection and correction
Error detection and correctionError detection and correction
Error detection and correction
 
I2C Protocol
I2C ProtocolI2C Protocol
I2C Protocol
 
8086 pin details
8086 pin details8086 pin details
8086 pin details
 
MICROPROCESSOR & MICROCONTROLLER 8086,8051 Notes
MICROPROCESSOR & MICROCONTROLLER 8086,8051 NotesMICROPROCESSOR & MICROCONTROLLER 8086,8051 Notes
MICROPROCESSOR & MICROCONTROLLER 8086,8051 Notes
 
Arm organization and implementation
Arm organization and implementationArm organization and implementation
Arm organization and implementation
 

Viewers also liked

8051 serial communication
8051 serial communication8051 serial communication
8051 serial communicationasteriskbimal
 
Asynchronous serial data transfer, UART and CAN controller
Asynchronous serial data transfer, UART and CAN controllerAsynchronous serial data transfer, UART and CAN controller
Asynchronous serial data transfer, UART and CAN controllerJovan Vlajic
 
See Your OpenStack Network Like Never Before
See Your OpenStack Network Like Never BeforeSee Your OpenStack Network Like Never Before
See Your OpenStack Network Like Never BeforePLUMgrid
 
How to grow a vegetable garden
How to grow a vegetable gardenHow to grow a vegetable garden
How to grow a vegetable gardennatalie_0302
 
Testing the limits of cloud networks
Testing the limits of cloud networksTesting the limits of cloud networks
Testing the limits of cloud networksPLUMgrid
 
Q1 - evaluation
Q1 - evaluationQ1 - evaluation
Q1 - evaluationjjsmaje
 
Capstone Presentation _ NND
Capstone Presentation _ NNDCapstone Presentation _ NND
Capstone Presentation _ NNDNisel Desai
 
Método de proyecto para la educación en tecnología
Método de proyecto para la educación en tecnologíaMétodo de proyecto para la educación en tecnología
Método de proyecto para la educación en tecnologíaDavid Ruiz
 
Building a Scalable Federated Hybrid Cloud
Building a Scalable Federated Hybrid CloudBuilding a Scalable Federated Hybrid Cloud
Building a Scalable Federated Hybrid CloudPLUMgrid
 
You Can Build Your OpenStack and Consume it Too
You Can Build Your OpenStack and Consume it TooYou Can Build Your OpenStack and Consume it Too
You Can Build Your OpenStack and Consume it TooPLUMgrid
 
How to Quickly Implement a Secure Cloud for Government and Military | Webinar
How to Quickly Implement a Secure Cloud for Government and Military | WebinarHow to Quickly Implement a Secure Cloud for Government and Military | Webinar
How to Quickly Implement a Secure Cloud for Government and Military | WebinarPLUMgrid
 
Communicable disease
Communicable diseaseCommunicable disease
Communicable diseasefrattelo
 
Monitoring Security Policies for Container and OpenStack Clouds
Monitoring Security Policies for Container and OpenStack CloudsMonitoring Security Policies for Container and OpenStack Clouds
Monitoring Security Policies for Container and OpenStack CloudsPLUMgrid
 
You Can Build Your OpenStack and Consume it Too
You Can Build Your OpenStack and Consume it TooYou Can Build Your OpenStack and Consume it Too
You Can Build Your OpenStack and Consume it TooPLUMgrid
 
OpenStack and Application Delivery: Joy and Pain of an Intricate Relationship
OpenStack and Application Delivery: Joy and Pain of an Intricate RelationshipOpenStack and Application Delivery: Joy and Pain of an Intricate Relationship
OpenStack and Application Delivery: Joy and Pain of an Intricate RelationshipPLUMgrid
 
Federation manager demo
Federation manager demoFederation manager demo
Federation manager demoPLUMgrid
 
Managing Multi-hypervisor OpenStack Cloud with Single Virtual Network
Managing Multi-hypervisor OpenStack Cloud with Single Virtual NetworkManaging Multi-hypervisor OpenStack Cloud with Single Virtual Network
Managing Multi-hypervisor OpenStack Cloud with Single Virtual NetworkPLUMgrid
 

Viewers also liked (20)

8051 serial communication
8051 serial communication8051 serial communication
8051 serial communication
 
Asynchronous serial data transfer, UART and CAN controller
Asynchronous serial data transfer, UART and CAN controllerAsynchronous serial data transfer, UART and CAN controller
Asynchronous serial data transfer, UART and CAN controller
 
Serial1
Serial1Serial1
Serial1
 
See Your OpenStack Network Like Never Before
See Your OpenStack Network Like Never BeforeSee Your OpenStack Network Like Never Before
See Your OpenStack Network Like Never Before
 
How to grow a vegetable garden
How to grow a vegetable gardenHow to grow a vegetable garden
How to grow a vegetable garden
 
Testing the limits of cloud networks
Testing the limits of cloud networksTesting the limits of cloud networks
Testing the limits of cloud networks
 
Q1 - evaluation
Q1 - evaluationQ1 - evaluation
Q1 - evaluation
 
Capstone Presentation _ NND
Capstone Presentation _ NNDCapstone Presentation _ NND
Capstone Presentation _ NND
 
Método de proyecto para la educación en tecnología
Método de proyecto para la educación en tecnologíaMétodo de proyecto para la educación en tecnología
Método de proyecto para la educación en tecnología
 
Building a Scalable Federated Hybrid Cloud
Building a Scalable Federated Hybrid CloudBuilding a Scalable Federated Hybrid Cloud
Building a Scalable Federated Hybrid Cloud
 
ERA_Overview
ERA_OverviewERA_Overview
ERA_Overview
 
You Can Build Your OpenStack and Consume it Too
You Can Build Your OpenStack and Consume it TooYou Can Build Your OpenStack and Consume it Too
You Can Build Your OpenStack and Consume it Too
 
How to Quickly Implement a Secure Cloud for Government and Military | Webinar
How to Quickly Implement a Secure Cloud for Government and Military | WebinarHow to Quickly Implement a Secure Cloud for Government and Military | Webinar
How to Quickly Implement a Secure Cloud for Government and Military | Webinar
 
Tiffanie Pierce Vitae
Tiffanie Pierce VitaeTiffanie Pierce Vitae
Tiffanie Pierce Vitae
 
Communicable disease
Communicable diseaseCommunicable disease
Communicable disease
 
Monitoring Security Policies for Container and OpenStack Clouds
Monitoring Security Policies for Container and OpenStack CloudsMonitoring Security Policies for Container and OpenStack Clouds
Monitoring Security Policies for Container and OpenStack Clouds
 
You Can Build Your OpenStack and Consume it Too
You Can Build Your OpenStack and Consume it TooYou Can Build Your OpenStack and Consume it Too
You Can Build Your OpenStack and Consume it Too
 
OpenStack and Application Delivery: Joy and Pain of an Intricate Relationship
OpenStack and Application Delivery: Joy and Pain of an Intricate RelationshipOpenStack and Application Delivery: Joy and Pain of an Intricate Relationship
OpenStack and Application Delivery: Joy and Pain of an Intricate Relationship
 
Federation manager demo
Federation manager demoFederation manager demo
Federation manager demo
 
Managing Multi-hypervisor OpenStack Cloud with Single Virtual Network
Managing Multi-hypervisor OpenStack Cloud with Single Virtual NetworkManaging Multi-hypervisor OpenStack Cloud with Single Virtual Network
Managing Multi-hypervisor OpenStack Cloud with Single Virtual Network
 

Similar to 8051 serialp port

Microcontrollers and microprocessors in electrical communication engineering....
Microcontrollers and microprocessors in electrical communication engineering....Microcontrollers and microprocessors in electrical communication engineering....
Microcontrollers and microprocessors in electrical communication engineering....ANKUSH445845
 
8051 SERIAL PORTS.pptx
8051 SERIAL PORTS.pptx8051 SERIAL PORTS.pptx
8051 SERIAL PORTS.pptxmaheswariM7
 
Seminar on serial communication
Seminar on serial communicationSeminar on serial communication
Seminar on serial communicationSamarth Patel
 
serial-200505101453.pdf
serial-200505101453.pdfserial-200505101453.pdf
serial-200505101453.pdfKiranG731731
 
8051 serial communication1
8051 serial communication1 8051 serial communication1
8051 serial communication1 vijaydeepakg
 
Lecture 10 (serial communication)
Lecture 10 (serial communication)Lecture 10 (serial communication)
Lecture 10 (serial communication)cairo university
 
Serial communication
Serial communicationSerial communication
Serial communicationVikas Dongre
 
USART - 8251 / usart-8251A Pallav Shukla
USART - 8251 / usart-8251A Pallav ShuklaUSART - 8251 / usart-8251A Pallav Shukla
USART - 8251 / usart-8251A Pallav ShuklaPallav Shukla
 
I2 c and mpu6050 basics
I2 c and mpu6050 basicsI2 c and mpu6050 basics
I2 c and mpu6050 basicsironstein1994
 
8051 microcontroller notes continuous
8051 microcontroller notes continuous 8051 microcontroller notes continuous
8051 microcontroller notes continuous THANDAIAH PRABU
 
Micro c lab8(serial communication)
Micro c lab8(serial communication)Micro c lab8(serial communication)
Micro c lab8(serial communication)Mashood
 
I2C protocol and DS1307 RTC interfacing
I2C protocol and DS1307 RTC interfacingI2C protocol and DS1307 RTC interfacing
I2C protocol and DS1307 RTC interfacingBhargav Kakadiya
 

Similar to 8051 serialp port (20)

Microcontrollers and microprocessors in electrical communication engineering....
Microcontrollers and microprocessors in electrical communication engineering....Microcontrollers and microprocessors in electrical communication engineering....
Microcontrollers and microprocessors in electrical communication engineering....
 
8051 SERIAL PORTS.pptx
8051 SERIAL PORTS.pptx8051 SERIAL PORTS.pptx
8051 SERIAL PORTS.pptx
 
Seminar on serial communication
Seminar on serial communicationSeminar on serial communication
Seminar on serial communication
 
DATA TRANSFER SCHEMES OF 8085
DATA TRANSFER SCHEMES OF 8085DATA TRANSFER SCHEMES OF 8085
DATA TRANSFER SCHEMES OF 8085
 
Presentation (1)-3.pptx
Presentation (1)-3.pptxPresentation (1)-3.pptx
Presentation (1)-3.pptx
 
12 mt06ped019
12 mt06ped019 12 mt06ped019
12 mt06ped019
 
Serial Communication in 8051
Serial Communication in 8051Serial Communication in 8051
Serial Communication in 8051
 
Serial data transfer
Serial data transferSerial data transfer
Serial data transfer
 
serial-200505101453.pdf
serial-200505101453.pdfserial-200505101453.pdf
serial-200505101453.pdf
 
8251 USART.pptx
8251 USART.pptx8251 USART.pptx
8251 USART.pptx
 
8251 USART
8251 USART8251 USART
8251 USART
 
8051 serial communication1
8051 serial communication1 8051 serial communication1
8051 serial communication1
 
Lecture 10 (serial communication)
Lecture 10 (serial communication)Lecture 10 (serial communication)
Lecture 10 (serial communication)
 
Serial communication
Serial communicationSerial communication
Serial communication
 
8251 a basic
8251 a basic8251 a basic
8251 a basic
 
USART - 8251 / usart-8251A Pallav Shukla
USART - 8251 / usart-8251A Pallav ShuklaUSART - 8251 / usart-8251A Pallav Shukla
USART - 8251 / usart-8251A Pallav Shukla
 
I2 c and mpu6050 basics
I2 c and mpu6050 basicsI2 c and mpu6050 basics
I2 c and mpu6050 basics
 
8051 microcontroller notes continuous
8051 microcontroller notes continuous 8051 microcontroller notes continuous
8051 microcontroller notes continuous
 
Micro c lab8(serial communication)
Micro c lab8(serial communication)Micro c lab8(serial communication)
Micro c lab8(serial communication)
 
I2C protocol and DS1307 RTC interfacing
I2C protocol and DS1307 RTC interfacingI2C protocol and DS1307 RTC interfacing
I2C protocol and DS1307 RTC interfacing
 

Recently uploaded

APPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICS
APPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICSAPPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICS
APPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICSKurinjimalarL3
 
Call Girls Delhi {Jodhpur} 9711199012 high profile service
Call Girls Delhi {Jodhpur} 9711199012 high profile serviceCall Girls Delhi {Jodhpur} 9711199012 high profile service
Call Girls Delhi {Jodhpur} 9711199012 high profile servicerehmti665
 
(RIA) Call Girls Bhosari ( 7001035870 ) HI-Fi Pune Escorts Service
(RIA) Call Girls Bhosari ( 7001035870 ) HI-Fi Pune Escorts Service(RIA) Call Girls Bhosari ( 7001035870 ) HI-Fi Pune Escorts Service
(RIA) Call Girls Bhosari ( 7001035870 ) HI-Fi Pune Escorts Serviceranjana rawat
 
Introduction to IEEE STANDARDS and its different types.pptx
Introduction to IEEE STANDARDS and its different types.pptxIntroduction to IEEE STANDARDS and its different types.pptx
Introduction to IEEE STANDARDS and its different types.pptxupamatechverse
 
SPICE PARK APR2024 ( 6,793 SPICE Models )
SPICE PARK APR2024 ( 6,793 SPICE Models )SPICE PARK APR2024 ( 6,793 SPICE Models )
SPICE PARK APR2024 ( 6,793 SPICE Models )Tsuyoshi Horigome
 
MANUFACTURING PROCESS-II UNIT-5 NC MACHINE TOOLS
MANUFACTURING PROCESS-II UNIT-5 NC MACHINE TOOLSMANUFACTURING PROCESS-II UNIT-5 NC MACHINE TOOLS
MANUFACTURING PROCESS-II UNIT-5 NC MACHINE TOOLSSIVASHANKAR N
 
Analog to Digital and Digital to Analog Converter
Analog to Digital and Digital to Analog ConverterAnalog to Digital and Digital to Analog Converter
Analog to Digital and Digital to Analog ConverterAbhinavSharma374939
 
GDSC ASEB Gen AI study jams presentation
GDSC ASEB Gen AI study jams presentationGDSC ASEB Gen AI study jams presentation
GDSC ASEB Gen AI study jams presentationGDSCAESB
 
Introduction and different types of Ethernet.pptx
Introduction and different types of Ethernet.pptxIntroduction and different types of Ethernet.pptx
Introduction and different types of Ethernet.pptxupamatechverse
 
Extrusion Processes and Their Limitations
Extrusion Processes and Their LimitationsExtrusion Processes and Their Limitations
Extrusion Processes and Their Limitations120cr0395
 
Processing & Properties of Floor and Wall Tiles.pptx
Processing & Properties of Floor and Wall Tiles.pptxProcessing & Properties of Floor and Wall Tiles.pptx
Processing & Properties of Floor and Wall Tiles.pptxpranjaldaimarysona
 
(MEERA) Dapodi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Escorts
(MEERA) Dapodi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Escorts(MEERA) Dapodi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Escorts
(MEERA) Dapodi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Escortsranjana rawat
 
Gfe Mayur Vihar Call Girls Service WhatsApp -> 9999965857 Available 24x7 ^ De...
Gfe Mayur Vihar Call Girls Service WhatsApp -> 9999965857 Available 24x7 ^ De...Gfe Mayur Vihar Call Girls Service WhatsApp -> 9999965857 Available 24x7 ^ De...
Gfe Mayur Vihar Call Girls Service WhatsApp -> 9999965857 Available 24x7 ^ De...srsj9000
 
Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...
Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...
Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...Dr.Costas Sachpazis
 
Introduction to Multiple Access Protocol.pptx
Introduction to Multiple Access Protocol.pptxIntroduction to Multiple Access Protocol.pptx
Introduction to Multiple Access Protocol.pptxupamatechverse
 
High Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur EscortsHigh Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur Escortsranjana rawat
 
VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130
VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130
VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130Suhani Kapoor
 
Porous Ceramics seminar and technical writing
Porous Ceramics seminar and technical writingPorous Ceramics seminar and technical writing
Porous Ceramics seminar and technical writingrakeshbaidya232001
 

Recently uploaded (20)

APPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICS
APPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICSAPPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICS
APPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICS
 
Call Girls Delhi {Jodhpur} 9711199012 high profile service
Call Girls Delhi {Jodhpur} 9711199012 high profile serviceCall Girls Delhi {Jodhpur} 9711199012 high profile service
Call Girls Delhi {Jodhpur} 9711199012 high profile service
 
(RIA) Call Girls Bhosari ( 7001035870 ) HI-Fi Pune Escorts Service
(RIA) Call Girls Bhosari ( 7001035870 ) HI-Fi Pune Escorts Service(RIA) Call Girls Bhosari ( 7001035870 ) HI-Fi Pune Escorts Service
(RIA) Call Girls Bhosari ( 7001035870 ) HI-Fi Pune Escorts Service
 
Introduction to IEEE STANDARDS and its different types.pptx
Introduction to IEEE STANDARDS and its different types.pptxIntroduction to IEEE STANDARDS and its different types.pptx
Introduction to IEEE STANDARDS and its different types.pptx
 
SPICE PARK APR2024 ( 6,793 SPICE Models )
SPICE PARK APR2024 ( 6,793 SPICE Models )SPICE PARK APR2024 ( 6,793 SPICE Models )
SPICE PARK APR2024 ( 6,793 SPICE Models )
 
MANUFACTURING PROCESS-II UNIT-5 NC MACHINE TOOLS
MANUFACTURING PROCESS-II UNIT-5 NC MACHINE TOOLSMANUFACTURING PROCESS-II UNIT-5 NC MACHINE TOOLS
MANUFACTURING PROCESS-II UNIT-5 NC MACHINE TOOLS
 
Analog to Digital and Digital to Analog Converter
Analog to Digital and Digital to Analog ConverterAnalog to Digital and Digital to Analog Converter
Analog to Digital and Digital to Analog Converter
 
GDSC ASEB Gen AI study jams presentation
GDSC ASEB Gen AI study jams presentationGDSC ASEB Gen AI study jams presentation
GDSC ASEB Gen AI study jams presentation
 
Introduction and different types of Ethernet.pptx
Introduction and different types of Ethernet.pptxIntroduction and different types of Ethernet.pptx
Introduction and different types of Ethernet.pptx
 
Extrusion Processes and Their Limitations
Extrusion Processes and Their LimitationsExtrusion Processes and Their Limitations
Extrusion Processes and Their Limitations
 
Processing & Properties of Floor and Wall Tiles.pptx
Processing & Properties of Floor and Wall Tiles.pptxProcessing & Properties of Floor and Wall Tiles.pptx
Processing & Properties of Floor and Wall Tiles.pptx
 
Roadmap to Membership of RICS - Pathways and Routes
Roadmap to Membership of RICS - Pathways and RoutesRoadmap to Membership of RICS - Pathways and Routes
Roadmap to Membership of RICS - Pathways and Routes
 
(MEERA) Dapodi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Escorts
(MEERA) Dapodi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Escorts(MEERA) Dapodi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Escorts
(MEERA) Dapodi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Escorts
 
Exploring_Network_Security_with_JA3_by_Rakesh Seal.pptx
Exploring_Network_Security_with_JA3_by_Rakesh Seal.pptxExploring_Network_Security_with_JA3_by_Rakesh Seal.pptx
Exploring_Network_Security_with_JA3_by_Rakesh Seal.pptx
 
Gfe Mayur Vihar Call Girls Service WhatsApp -> 9999965857 Available 24x7 ^ De...
Gfe Mayur Vihar Call Girls Service WhatsApp -> 9999965857 Available 24x7 ^ De...Gfe Mayur Vihar Call Girls Service WhatsApp -> 9999965857 Available 24x7 ^ De...
Gfe Mayur Vihar Call Girls Service WhatsApp -> 9999965857 Available 24x7 ^ De...
 
Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...
Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...
Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...
 
Introduction to Multiple Access Protocol.pptx
Introduction to Multiple Access Protocol.pptxIntroduction to Multiple Access Protocol.pptx
Introduction to Multiple Access Protocol.pptx
 
High Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur EscortsHigh Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur Escorts
 
VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130
VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130
VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130
 
Porous Ceramics seminar and technical writing
Porous Ceramics seminar and technical writingPorous Ceramics seminar and technical writing
Porous Ceramics seminar and technical writing
 

8051 serialp port

  • 2. Basics of Serial Communication • Computers transfer data in two ways:
  • 3.
  • 4.
  • 5. Types of Serial communications
  • 6. Asynchronous vs. Synchronous Transmission Modes • Serial data communication uses two methods – Synchronous method transfers a block of data at a time
  • 7. – Asynchronous method transfers a single byte at a time
  • 8. Asynchronous – Start & Stop Bit • Asynchronous serial data communication is widely used for character-oriented transmissions – Each character is placed in between start and stop bits, this is called framing. • The start bit is always one bit, but the stop bit can be one or two bits • The start bit is always a 0 (low) and the stop bit(s) is 1 (high)
  • 9. Asynchronous serial communication synchronous serial communication transmitter and receiver are not synchronized by clock. transmitter and receiver are synchronized by clock. Character may arrive at any rate at receiver. Character is received at constant rate. Data transfer is character oriented Data transfer takes place in blocks. Start and stop bits are required to establish communication of each character. Start and stop bits are not required to establish communication of each character, however ,synchronization bits are required to transfer the data block. Used in low-speed transmissions Used in high-speed transmissions
  • 10. • There are special IC’s made by many manufacturers for serial communications. – UART (universal asynchronous Receiver transmitter) – USART (universal synchronous-asynchronous Receiver-transmitter)
  • 11. Data Transfer Rate • The rate of data transfer in serial data communication is stated in bps (bits per second). • Another widely used terminology for bps is baud rate.
  • 12. • Serial port of 8051 is full duplex, means it can transmit and receive simultaneously.
  • 13. 8051 Registers related to Serial Communication 1. SBUF Register -- to hold data 2. SCON Register -- controls data communication 3. PCON Register -- controls data rates
  • 14. SBUF Register • SBUF is an 8-bit register used for serial communication. • For a byte data to be transferred via the TxD line, it must be placed in the SBUF register. • The moment a byte is written into SBUF, it is framed with the start and stop bits and transferred serially via the TxD line. • SBUF holds the byte of data when it is received by 8051 RxD line. • When the bits are received serially via RxD, the 8051 deframes it by eliminating the stop and start bits, making a byte out of the data received, and then placing it in SBUF.
  • 15. NOTE: SBUF is physically two registers . one is write only and is used to hold data to be transmitted out of the 8051 via TXD. The other is read only and holds received data from external sources via RXD. Both mutually exclusive registers use address 99h.
  • 16. Serial Port Control (SCON) Register SM0 SM1 SM2 REN TB8 RB8 TI RI Enable Multiprocessor Communication Mode Set to Enable Serial Data reception 9th Data Bit transmitted in Modes 2,3 9th Data Bit Received in Mode 2,3 Set when Stop bit Txed Set when a Cha- ractor received
  • 18. 8051 Serial Port – Mode 0 The Serial Port in Mode-0 has the following features: 1. Serial data enters and exits through RXD 2. TXD outputs the clock 3. 8 bits are transmitted / received 4. The baud rate is fixed at (1/12) of the oscillator frequency
  • 19. 8051 Serial Port – Mode 1 The Serial Port in Mode-1 has the following features: 1. Serial data enters through RXD 2. Serial data exits through TXD 3. On receive, the stop bit goes into RB8 in SCON 4. 10 bits are transmitted / received 1. Start bit 2. Data bits (8) 3. Stop Bit 5. Baud rate is determined by the Timer 1 over flow rate.
  • 20. Standard UART data word under mode-1
  • 21. 8051 Serial Port – Mode 2 The Serial Port in Mode-2 has the following features: 1. Serial data enters through RXD 2. Serial data exits through TXD 3. 9th data bit (TB8) can be assign value 0 or 1 4. On receive, the 9th data bit goes into RB8 in SCON 5. 11 bits are transmitted / received 1.Start bit 2.Data bits (9) 3.Stop Bit 6. Baud rate is programmable
  • 22.
  • 23. 8051 Serial Port – Mode 3 The Serial Port in Mode-3 has the following features: 1. Serial data enters through RXD 2. Serial data exits through TXD 3. 9th data bit (TB8) can be assign value 0 or 1 4. On receive, the 9th data bit goes into RB8 in SCON 5. 11 bits are transmitted / received 1.Start bit 2.Data bits (9) 3.Stop Bit 6. Baud rate is determined by Timer 1 overflow rate.
  • 24.
  • 25.
  • 26. • REN (Receive Enable) also referred as SCON.4. When it is high,it allows the 8051 to receive data on the RxD pin. So to receive and transfer data REN must be set to 1.When REN=0,the receiver is disabled
  • 27. • TB8 & RB8 are used in mode 2 ,3
  • 28. • TI (Transmit interrupt) When 8051 finishes the transfer of 8-bit character, it raises the TI flag to indicate that it is ready to transfer another byte. The TI bit is raised at the beginning of the stop bit. • RI (Receive interrupt) When the 8051 receives data serially ,via RxD, it gets rid of the start and stop bits and places the byte in the SBUF register.Then it raises the RI flag bit to indicate that a byte has been received and should be picked up before it is lost.RI is raised halfway through the stop bit.
  • 29. Doubling Baud Rate • There are two ways to increase the baud rate of data transfer 1. By using a higher frequency crystal 2. By changing a bit in the PCON register
  • 30. Power Mode Control (PCON) Register • PCON register is an 8-bit SFR. • it is byte addressable register. SMOD: double baud rate bit. When 8051 is powered up, SMOD bit is at zero value. To double the baud rate SMOD to be set to 1.
  • 31.
  • 32. • PD: power down bit . Setting this bit high activates power down mode known also sleep mode. In this mode, the CPU puts the whole chip to sleep by turning off the oscillator. under this mode power consumption becomes minimum.
  • 33. • IDL : idle mode, setting this mode bit high activates idle mode. In this mode, the oscillator continues to provide clock to the peripherals, but no clock is provided to the CPU, as the CPU is under sleep state. Note: if PD and IDL are set to high at the same time, PD takes precedence.