SlideShare a Scribd company logo
1 of 19
Download to read offline
1
Unit 5: 8051 Serial Port Programming
Part 1
Subject: Processor Architecture & Interfacing
(SPPU, Pune 2015 Course of Information Technology)
Class: SEIT Semester: II
Prepared By,
Ms. K. D. Patil, Assistant Professor
Department of Information Technology
(NBA accredited)
Sanjivani College of Engineering, Kopargaon-423603.
Maharashtra, India.
(An Autonomous Institute, Affiliated with SPPU, Pune.)
NAAC ‘A’ Grade Accredited, ISO 9001:2015 certified
Contents
Prepared By: Ms. K. D. Patil, Dept. of Information Technology, Sanjivani
COE, Kopargaon
2
 Part 1
 Basics of Communication
 Serial Vs Parallel communication
 Synchronous Vs Asynchronous communication
 Data Framing in Asynchronous Serial Communication
 Baud Rate
 Part 2
 Special Function Registers
 Operating modes of Serial Communication
 Doubling Baud Rate in 8051
 Part 3
 Importance of TI Flag
 Importance of RI Flag
 Examples
Learning Outcomes
Prepared By: Ms. K. D. Patil, Dept. of Information Technology, Sanjivani COE, Kopargaon
3
 Student will be able to
 Learn basics of 8051 serial communication
 Learn Special Function Registers and their
configurations
 Apply knowledge of 8051 assembly language to
write a code for 8051 serial port
Basics
 When a processor communicates
with outside world, it provides
the data in byte-sized chunks
 Two ways
 Serial
 To transfer to a device located
many meters away, the serial
method is used
 The data is sent one bit at a time
 Eg. Telephone Lines connecting
different cities
 Parallel
 often 8 or more lines (wire
conductors) are used to transfer
data to a device that is only a
few feet away
4
Prepared By: Ms. K. D. Patil, Dept. of Information Technology, Sanjivani
COE, Kopargaon
Basics
Prepared By: Ms. K. D. Patil, Dept. of Information Technology, Sanjivani
COE, Kopargaon
5
 At the transmitting end, the byte of data must be converted
to serial bits using parallel-in-serial-out (PISO) shift register
 At the receiving end, there is a serial-in-parallel-out (SIPO)
shift register to receive the serial data and pack them into
byte
 When the distance is short, the digital signal can be
transferred as it is on a simple wire and requires no
modulation
 If data is to be transferred on the telephone line, it must be
converted from 0s and 1s to audio tones
 This conversion is performed by a device called a modem,
“Modulator/demodulator”
Basics
Prepared By: Ms. K. D. Patil, Dept. of Information Technology, Sanjivani
COE, Kopargaon
6
 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
 It is possible to write software to use either of these
methods, but the programs can be tedious and long
 There are special IC chips made by many
manufacturers for serial communications
 UART (Universal Asynchronous Receiver Transmitter)
 USART (Universal Synchronous-Asynchronous Receiver-
Transmitter)
Summary
Prepared By: Ms. K. D. Patil, Dept. of Information Technology, Sanjivani
COE, Kopargaon
7
Parallel Data Transfer Serial Data Transfer
8 bits of data is transferred at a
time
One bit of data is transferred at
a time
8 lines required to be connected Only 2 lines required to be
connected
Data transfer is faster Data transfer is slow
Synchronous Data Transfer Asynchronous Data Transfer
Transfers BLOCK of character at a
time
Transfers ONE character at a time
No start & stop bit START & STOP bit is present
Simplex, Half and Full Duplex Transfer
Prepared By: Ms. K. D. Patil, Dept. of Information Technology, Sanjivani
COE, Kopargaon
8
Simplex, Half and Full Duplex Transfer
Prepared By: Ms. K. D. Patil, Dept. of Information Technology, Sanjivani
COE, Kopargaon
9
 Simplex
 Eg. Printer
 If data can be transmitted and received, it is a
duplex transmission
 If data transmitted one way a time, it is referred to as
half duplex
 If data can go both ways at a time, it is full duplex
 It requires two wire conductors for the data lines, one for
transmission and one for reception
Asynchronous Serial Communication
and Data Framing
Prepared By: Ms. K. D. Patil, Dept. of Information Technology, Sanjivani
COE, Kopargaon
10
 The data receiving is all 0s and 1s
 To make sense of the data, sender and receiver agree on a set of
rules called as Protocols
 how the data is packed
 how many bits/character
 when the data begins and ends
 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
 Block-oriented data transfers use the synchronous method
 The start bit is always one bit, but the stop bit can be one or two
bits
Asynchronous Serial Communication
and Data Framing11
 The start bit is always a 0 (low) and the stop bit(s) is
1 (high)
Data Transfer Rate
Prepared By: Ms. K. D. Patil, Dept. of Information Technology, Sanjivani
COE, Kopargaon
12
 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
 In Modem Technology, It is defined as the number of
signal changes per second
 Because In modems, there are occasions when a
single change of signal transfers several bits of
data
Data Transfer Rate
Prepared By: Ms. K. D. Patil, Dept. of Information Technology, Sanjivani
COE, Kopargaon
13
 The data transfer rate of given computer system depends on
communication ports incorporated into that system
 IBM PC/XT could transfer data at the rate of 100 to 9600 bps
 Pentium-based PCs transfer data at rates as high as 56K bps
 In asynchronous serial data communication, the baud rate is
limited to 100K bps
 To allow data transfer between the PC and an 8051 system
without any error, we must make sure that the baud rate of
8051 system matches the baud rate of the PC’s COM port
Data Transfer Rate/ Baud Rate in
8051
Prepared By: Ms. K. D. Patil, Dept. of Information Technology, Sanjivani
COE, Kopargaon
14
 baud rate in the 8051 is programmable
 done with the help of Timer 1
XTAL
oscillator ÷ 12 ÷ 32 by UART
11.0592 MHz
Machine Cycle Freq.
921.6KHz
28800 Hz
To Timer 1
to set
Baud Rate
Data Transfer Rate/ Baud Rate in
8051
Prepared By: Ms. K. D. Patil, Dept. of Information Technology, Sanjivani
COE, Kopargaon
15
 8051 divides the crystal frequency by 12 to get the
machine cycle frequency
 For XTAL = 11.0592 MHz, the machine cycle frequency
is 11.0592MHZ/12 = 921.6 kHz
 8051's UART divides the machine cycle frequency of
921.6 kHz by 32 once more before it is used by Timer
1 to set the baud rate
 So, 921.6 kHz divided by 32 gives 28,800 Hz is the
frequency provided by UART to Timer1 to set Baud
Rate
 Timer 1 must be programmed in mode 2, that is 8-bit,
auto-reload
Example
Prepared By: Ms. K. D. Patil, Dept. of Information Technology, Sanjivani
COE, Kopargaon
16
 With XTAL = 11.0592 MHz, find the TH1 value needed to have
the following baud rates. (a) 9600 (b) 2400 (c) 1200
Solution:
The machine cycle frequency of 8051 = 11.0592 / 12 = 921.6 kHz,
and 921.6 kHz / 32 = 28,800 Hz is frequency by UART to timer 1 to
set baud rate.
(a) 28,800 / 3 = 9600 where -3 = FD (hex) is loaded into TH1
(b) 28,800 / 12 = 2400 where -12 = F4 (hex) is loaded into TH1
(c) 28,800 / 24 = 1200 where -24 = E8 (hex) is loaded into TH1
Notice that dividing 1/12 of the crystal frequency by 32 is the
default value upon activation of the 8051 RESET pin.
Timer-1 TH1 Register Values for
Various Baud Rates
Prepared By: Ms. K. D. Patil, Dept. of Information Technology, Sanjivani
COE, Kopargaon
17
Baud Rate TH1 (Decimal) TH1 (Hex)
9600 -3 FD
4800 -6 FA
2400 -12 F4
1200 -24 E8
Note : Here XTAL = 11.0592 MHz
Reference
Prepared By: Ms. K. D. Patil, Dept. of Information Technology, Sanjivani
COE, Kopargaon
18
 “The 8051 Microcontroller and Embedded Systems
using Assembly and C” , Muhammad Ali Mazidi,
Janice Gillispie Mazidi, Rolin D. McKinlay, Second
Edition, Pearson publication
Prepared By: Ms. K. D. Patil, Dept. of Information Technology, Sanjivani
COE, Kopargaon
19

More Related Content

What's hot

Implementation of Universal Asynchronous Receiver and Transmitter
Implementation of Universal Asynchronous Receiver and TransmitterImplementation of Universal Asynchronous Receiver and Transmitter
Implementation of Universal Asynchronous Receiver and TransmitterIJERA Editor
 
Software Design of Digital Receiver using FPGA
Software Design of Digital Receiver using FPGASoftware Design of Digital Receiver using FPGA
Software Design of Digital Receiver using FPGAIRJET Journal
 
Adc lab
Adc labAdc lab
Adc labxyxz
 
IEEE_Peer_Reviewed_Paper_1
IEEE_Peer_Reviewed_Paper_1IEEE_Peer_Reviewed_Paper_1
IEEE_Peer_Reviewed_Paper_1Saad Mahboob
 
Identifying PCIe 3.0 Dynamic Equalization Problems
Identifying PCIe 3.0 Dynamic Equalization ProblemsIdentifying PCIe 3.0 Dynamic Equalization Problems
Identifying PCIe 3.0 Dynamic Equalization Problemsteledynelecroy
 
ADS Workshop on PCI Express(r)
ADS Workshop on PCI Express(r)ADS Workshop on PCI Express(r)
ADS Workshop on PCI Express(r)Colin Warwick
 
4 ijaems nov-2015-4-fsk demodulator- case study of pll application
4 ijaems nov-2015-4-fsk demodulator- case study of pll application4 ijaems nov-2015-4-fsk demodulator- case study of pll application
4 ijaems nov-2015-4-fsk demodulator- case study of pll applicationINFOGAIN PUBLICATION
 
IEEE 1588 Timing for Mobile Backhaul_Webinar
IEEE 1588 Timing for Mobile Backhaul_WebinarIEEE 1588 Timing for Mobile Backhaul_Webinar
IEEE 1588 Timing for Mobile Backhaul_WebinarSymmetricomSYMM
 
FPGA Implementation of BIST in OFDM Transceivers
FPGA Implementation of BIST in OFDM TransceiversFPGA Implementation of BIST in OFDM Transceivers
FPGA Implementation of BIST in OFDM TransceiversIRJET Journal
 
Implementation of gps signal acquisition and tracking in fpga
Implementation of gps signal acquisition and tracking in fpgaImplementation of gps signal acquisition and tracking in fpga
Implementation of gps signal acquisition and tracking in fpgaeSAT Publishing House
 
iaetsd Software defined am transmitter using vhdl
iaetsd Software defined am transmitter using vhdliaetsd Software defined am transmitter using vhdl
iaetsd Software defined am transmitter using vhdlIaetsd Iaetsd
 
Performance Evaluation of IEEE STD 802.16d Transceiver
Performance Evaluation of IEEE STD 802.16d TransceiverPerformance Evaluation of IEEE STD 802.16d Transceiver
Performance Evaluation of IEEE STD 802.16d TransceiverIOSR Journals
 
Design And Simulation of Modulation Schemes used for FPGA Based Software Defi...
Design And Simulation of Modulation Schemes used for FPGA Based Software Defi...Design And Simulation of Modulation Schemes used for FPGA Based Software Defi...
Design And Simulation of Modulation Schemes used for FPGA Based Software Defi...Sucharita Saha
 
Design of Adjustable Reconfigurable Wireless Single Core CORDIC based Rake Re...
Design of Adjustable Reconfigurable Wireless Single Core CORDIC based Rake Re...Design of Adjustable Reconfigurable Wireless Single Core CORDIC based Rake Re...
Design of Adjustable Reconfigurable Wireless Single Core CORDIC based Rake Re...IOSR Journals
 

What's hot (19)

Implementation of Universal Asynchronous Receiver and Transmitter
Implementation of Universal Asynchronous Receiver and TransmitterImplementation of Universal Asynchronous Receiver and Transmitter
Implementation of Universal Asynchronous Receiver and Transmitter
 
Software Design of Digital Receiver using FPGA
Software Design of Digital Receiver using FPGASoftware Design of Digital Receiver using FPGA
Software Design of Digital Receiver using FPGA
 
Adc lab
Adc labAdc lab
Adc lab
 
IEEE_Peer_Reviewed_Paper_1
IEEE_Peer_Reviewed_Paper_1IEEE_Peer_Reviewed_Paper_1
IEEE_Peer_Reviewed_Paper_1
 
Identifying PCIe 3.0 Dynamic Equalization Problems
Identifying PCIe 3.0 Dynamic Equalization ProblemsIdentifying PCIe 3.0 Dynamic Equalization Problems
Identifying PCIe 3.0 Dynamic Equalization Problems
 
Serial1
Serial1Serial1
Serial1
 
ADS Workshop on PCI Express(r)
ADS Workshop on PCI Express(r)ADS Workshop on PCI Express(r)
ADS Workshop on PCI Express(r)
 
4 ijaems nov-2015-4-fsk demodulator- case study of pll application
4 ijaems nov-2015-4-fsk demodulator- case study of pll application4 ijaems nov-2015-4-fsk demodulator- case study of pll application
4 ijaems nov-2015-4-fsk demodulator- case study of pll application
 
IEEE 1588 Timing for Mobile Backhaul_Webinar
IEEE 1588 Timing for Mobile Backhaul_WebinarIEEE 1588 Timing for Mobile Backhaul_Webinar
IEEE 1588 Timing for Mobile Backhaul_Webinar
 
Ff34970973
Ff34970973Ff34970973
Ff34970973
 
FPGA Implementation of BIST in OFDM Transceivers
FPGA Implementation of BIST in OFDM TransceiversFPGA Implementation of BIST in OFDM Transceivers
FPGA Implementation of BIST in OFDM Transceivers
 
An Effective Design and Verification Methodology for Digital PLL
An Effective Design and Verification Methodology for Digital PLLAn Effective Design and Verification Methodology for Digital PLL
An Effective Design and Verification Methodology for Digital PLL
 
Implementation of gps signal acquisition and tracking in fpga
Implementation of gps signal acquisition and tracking in fpgaImplementation of gps signal acquisition and tracking in fpga
Implementation of gps signal acquisition and tracking in fpga
 
iaetsd Software defined am transmitter using vhdl
iaetsd Software defined am transmitter using vhdliaetsd Software defined am transmitter using vhdl
iaetsd Software defined am transmitter using vhdl
 
Time Synchronisation
Time SynchronisationTime Synchronisation
Time Synchronisation
 
Performance Evaluation of IEEE STD 802.16d Transceiver
Performance Evaluation of IEEE STD 802.16d TransceiverPerformance Evaluation of IEEE STD 802.16d Transceiver
Performance Evaluation of IEEE STD 802.16d Transceiver
 
IoT in LTE
IoT in LTEIoT in LTE
IoT in LTE
 
Design And Simulation of Modulation Schemes used for FPGA Based Software Defi...
Design And Simulation of Modulation Schemes used for FPGA Based Software Defi...Design And Simulation of Modulation Schemes used for FPGA Based Software Defi...
Design And Simulation of Modulation Schemes used for FPGA Based Software Defi...
 
Design of Adjustable Reconfigurable Wireless Single Core CORDIC based Rake Re...
Design of Adjustable Reconfigurable Wireless Single Core CORDIC based Rake Re...Design of Adjustable Reconfigurable Wireless Single Core CORDIC based Rake Re...
Design of Adjustable Reconfigurable Wireless Single Core CORDIC based Rake Re...
 

Similar to SE PAI Unit 5_Serial Port Programming in 8051 microcontroller_Part 1

PTCL Internship Report
PTCL Internship ReportPTCL Internship Report
PTCL Internship ReportMalik Zawar
 
UART project report by Tarun Khaneja ( 09034406598 )
UART project report by Tarun Khaneja ( 09034406598 )UART project report by Tarun Khaneja ( 09034406598 )
UART project report by Tarun Khaneja ( 09034406598 )Tarun Khaneja
 
Implementation of SISO-OFDM Transmission using MATLAB on DSP Processor
Implementation of SISO-OFDM Transmission using MATLAB on DSP ProcessorImplementation of SISO-OFDM Transmission using MATLAB on DSP Processor
Implementation of SISO-OFDM Transmission using MATLAB on DSP Processormohan676910
 
serial-200505101453.pdf
serial-200505101453.pdfserial-200505101453.pdf
serial-200505101453.pdfKiranG731731
 
Design of Digital to Analog Voice Data Packet Conversion from Ethernet Protoc...
Design of Digital to Analog Voice Data Packet Conversion from Ethernet Protoc...Design of Digital to Analog Voice Data Packet Conversion from Ethernet Protoc...
Design of Digital to Analog Voice Data Packet Conversion from Ethernet Protoc...TELKOMNIKA JOURNAL
 
IRJET- A Novel Technique for the Transmission of Digital Data through Ban...
IRJET-  	  A Novel Technique for the Transmission of Digital Data through Ban...IRJET-  	  A Novel Technique for the Transmission of Digital Data through Ban...
IRJET- A Novel Technique for the Transmission of Digital Data through Ban...IRJET Journal
 
Synthesis & FPGA Implementation of UART IP Soft Core
Synthesis & FPGA Implementation of UART IP Soft CoreSynthesis & FPGA Implementation of UART IP Soft Core
Synthesis & FPGA Implementation of UART IP Soft Coreijsrd.com
 
IEEE Paper Implementation of Local Area Digital Audio Broadcasting System upo...
IEEE Paper Implementation of Local Area Digital Audio Broadcasting System upo...IEEE Paper Implementation of Local Area Digital Audio Broadcasting System upo...
IEEE Paper Implementation of Local Area Digital Audio Broadcasting System upo...Dweapons Art
 
Study and Emulation of 10G-EPON with Triple Play
Study and Emulation of 10G-EPON with Triple PlayStudy and Emulation of 10G-EPON with Triple Play
Study and Emulation of 10G-EPON with Triple PlaySatya Prakash Rout
 
digital and analog tarnsmission, network topologies.pptx
digital and analog tarnsmission, network topologies.pptxdigital and analog tarnsmission, network topologies.pptx
digital and analog tarnsmission, network topologies.pptxBhavikAneja1
 
IRJET- Power Line Carrier Communication
IRJET- Power Line Carrier CommunicationIRJET- Power Line Carrier Communication
IRJET- Power Line Carrier CommunicationIRJET Journal
 
Elet 4315 homework 2
Elet 4315 homework 2Elet 4315 homework 2
Elet 4315 homework 2Rever Wesley
 
BPSK modulation using CD 4016
BPSK modulation using CD 4016 BPSK modulation using CD 4016
BPSK modulation using CD 4016 MOHAMMAD HANNAN
 
Sdh basics hand_outs_of_sdh_basics
Sdh basics hand_outs_of_sdh_basicsSdh basics hand_outs_of_sdh_basics
Sdh basics hand_outs_of_sdh_basicsPaul Andrew
 
Universal Serial Communication Interface
Universal Serial Communication InterfaceUniversal Serial Communication Interface
Universal Serial Communication InterfaceSandesh Agrawal
 
Project Report on Optical Fiber Cables and Systems (MTNL Mumbai)
Project Report on Optical Fiber Cables and Systems (MTNL Mumbai)Project Report on Optical Fiber Cables and Systems (MTNL Mumbai)
Project Report on Optical Fiber Cables and Systems (MTNL Mumbai)Pradeep Singh
 
Transfer of ut information from fpga through ethernet interface
Transfer of ut information from fpga through ethernet interfaceTransfer of ut information from fpga through ethernet interface
Transfer of ut information from fpga through ethernet interfaceeSAT Publishing House
 

Similar to SE PAI Unit 5_Serial Port Programming in 8051 microcontroller_Part 1 (20)

PTCL Internship Report
PTCL Internship ReportPTCL Internship Report
PTCL Internship Report
 
UART project report by Tarun Khaneja ( 09034406598 )
UART project report by Tarun Khaneja ( 09034406598 )UART project report by Tarun Khaneja ( 09034406598 )
UART project report by Tarun Khaneja ( 09034406598 )
 
Implementation of SISO-OFDM Transmission using MATLAB on DSP Processor
Implementation of SISO-OFDM Transmission using MATLAB on DSP ProcessorImplementation of SISO-OFDM Transmission using MATLAB on DSP Processor
Implementation of SISO-OFDM Transmission using MATLAB on DSP Processor
 
serial-200505101453.pdf
serial-200505101453.pdfserial-200505101453.pdf
serial-200505101453.pdf
 
Design of Digital to Analog Voice Data Packet Conversion from Ethernet Protoc...
Design of Digital to Analog Voice Data Packet Conversion from Ethernet Protoc...Design of Digital to Analog Voice Data Packet Conversion from Ethernet Protoc...
Design of Digital to Analog Voice Data Packet Conversion from Ethernet Protoc...
 
IRJET- A Novel Technique for the Transmission of Digital Data through Ban...
IRJET-  	  A Novel Technique for the Transmission of Digital Data through Ban...IRJET-  	  A Novel Technique for the Transmission of Digital Data through Ban...
IRJET- A Novel Technique for the Transmission of Digital Data through Ban...
 
Synthesis & FPGA Implementation of UART IP Soft Core
Synthesis & FPGA Implementation of UART IP Soft CoreSynthesis & FPGA Implementation of UART IP Soft Core
Synthesis & FPGA Implementation of UART IP Soft Core
 
IEEE Paper Implementation of Local Area Digital Audio Broadcasting System upo...
IEEE Paper Implementation of Local Area Digital Audio Broadcasting System upo...IEEE Paper Implementation of Local Area Digital Audio Broadcasting System upo...
IEEE Paper Implementation of Local Area Digital Audio Broadcasting System upo...
 
Study and Emulation of 10G-EPON with Triple Play
Study and Emulation of 10G-EPON with Triple PlayStudy and Emulation of 10G-EPON with Triple Play
Study and Emulation of 10G-EPON with Triple Play
 
digital and analog tarnsmission, network topologies.pptx
digital and analog tarnsmission, network topologies.pptxdigital and analog tarnsmission, network topologies.pptx
digital and analog tarnsmission, network topologies.pptx
 
Presentation9
Presentation9Presentation9
Presentation9
 
Bluetooth technology
Bluetooth technologyBluetooth technology
Bluetooth technology
 
IRJET- Power Line Carrier Communication
IRJET- Power Line Carrier CommunicationIRJET- Power Line Carrier Communication
IRJET- Power Line Carrier Communication
 
Elet 4315 homework 2
Elet 4315 homework 2Elet 4315 homework 2
Elet 4315 homework 2
 
BPSK modulation using CD 4016
BPSK modulation using CD 4016 BPSK modulation using CD 4016
BPSK modulation using CD 4016
 
Sdh basics hand_outs_of_sdh_basics
Sdh basics hand_outs_of_sdh_basicsSdh basics hand_outs_of_sdh_basics
Sdh basics hand_outs_of_sdh_basics
 
Universal Serial Communication Interface
Universal Serial Communication InterfaceUniversal Serial Communication Interface
Universal Serial Communication Interface
 
Project Report on Optical Fiber Cables and Systems (MTNL Mumbai)
Project Report on Optical Fiber Cables and Systems (MTNL Mumbai)Project Report on Optical Fiber Cables and Systems (MTNL Mumbai)
Project Report on Optical Fiber Cables and Systems (MTNL Mumbai)
 
Transfer of ut information from fpga through ethernet interface
Transfer of ut information from fpga through ethernet interfaceTransfer of ut information from fpga through ethernet interface
Transfer of ut information from fpga through ethernet interface
 
bds project final documentation
bds project final documentation bds project final documentation
bds project final documentation
 

More from KanchanPatil34

Unit 2_2 Binary Tree as ADT_General Tree.pdf
Unit 2_2 Binary Tree as ADT_General Tree.pdfUnit 2_2 Binary Tree as ADT_General Tree.pdf
Unit 2_2 Binary Tree as ADT_General Tree.pdfKanchanPatil34
 
Unit 2_3 Binary Tree Traversals.pdf
Unit 2_3 Binary Tree Traversals.pdfUnit 2_3 Binary Tree Traversals.pdf
Unit 2_3 Binary Tree Traversals.pdfKanchanPatil34
 
Unit 1_SLL and DLL.pdf
Unit 1_SLL and DLL.pdfUnit 1_SLL and DLL.pdf
Unit 1_SLL and DLL.pdfKanchanPatil34
 
Unit 1_Stack and Queue using Linked Organization.pdf
Unit 1_Stack and Queue using Linked Organization.pdfUnit 1_Stack and Queue using Linked Organization.pdf
Unit 1_Stack and Queue using Linked Organization.pdfKanchanPatil34
 
PAI Unit 3 Paging in 80386 Microporcessor
PAI Unit 3 Paging in 80386 MicroporcessorPAI Unit 3 Paging in 80386 Microporcessor
PAI Unit 3 Paging in 80386 MicroporcessorKanchanPatil34
 
PAI Unit 3 Multitasking in 80386
PAI Unit 3 Multitasking in 80386PAI Unit 3 Multitasking in 80386
PAI Unit 3 Multitasking in 80386KanchanPatil34
 
PAI Unit 2 Segmentation in 80386 microprocessor
PAI Unit 2 Segmentation in 80386 microprocessorPAI Unit 2 Segmentation in 80386 microprocessor
PAI Unit 2 Segmentation in 80386 microprocessorKanchanPatil34
 
PAI Unit 2 Protection in 80386 segmentation
PAI Unit 2 Protection in 80386 segmentationPAI Unit 2 Protection in 80386 segmentation
PAI Unit 2 Protection in 80386 segmentationKanchanPatil34
 
SE PAI Unit 2_Data Structures in 80386 segmentation
SE PAI Unit 2_Data Structures in 80386 segmentationSE PAI Unit 2_Data Structures in 80386 segmentation
SE PAI Unit 2_Data Structures in 80386 segmentationKanchanPatil34
 
SE PAI Unit 5_Timer Programming in 8051 microcontroller_Part 1
SE PAI Unit 5_Timer Programming in 8051 microcontroller_Part 1SE PAI Unit 5_Timer Programming in 8051 microcontroller_Part 1
SE PAI Unit 5_Timer Programming in 8051 microcontroller_Part 1KanchanPatil34
 
SE PAI Unit 5_Timer Programming in 8051 microcontroller_Part 2
SE PAI Unit 5_Timer Programming in 8051 microcontroller_Part 2SE PAI Unit 5_Timer Programming in 8051 microcontroller_Part 2
SE PAI Unit 5_Timer Programming in 8051 microcontroller_Part 2KanchanPatil34
 
SE PAI Unit 5_Serial Port Programming in 8051 micro controller_Part 3
SE PAI Unit 5_Serial Port Programming in 8051 micro controller_Part 3SE PAI Unit 5_Serial Port Programming in 8051 micro controller_Part 3
SE PAI Unit 5_Serial Port Programming in 8051 micro controller_Part 3KanchanPatil34
 
SE PAI Unit 5_IO programming in 8051
SE PAI Unit 5_IO programming in 8051SE PAI Unit 5_IO programming in 8051
SE PAI Unit 5_IO programming in 8051KanchanPatil34
 
Unit 5_Interrupt programming in 8051 micro controller - part 2
Unit 5_Interrupt programming in 8051 micro controller - part 2Unit 5_Interrupt programming in 8051 micro controller - part 2
Unit 5_Interrupt programming in 8051 micro controller - part 2KanchanPatil34
 
Unit 5_interrupt programming_Part 1
Unit 5_interrupt programming_Part 1Unit 5_interrupt programming_Part 1
Unit 5_interrupt programming_Part 1KanchanPatil34
 
Unit 3 se pai_ivt and idt
Unit 3 se pai_ivt and idtUnit 3 se pai_ivt and idt
Unit 3 se pai_ivt and idtKanchanPatil34
 
Unit 2 se pai_registers in 80386
Unit 2 se pai_registers in 80386Unit 2 se pai_registers in 80386
Unit 2 se pai_registers in 80386KanchanPatil34
 
Unit i se pai_dos function calls
Unit i se pai_dos function callsUnit i se pai_dos function calls
Unit i se pai_dos function callsKanchanPatil34
 

More from KanchanPatil34 (20)

Unit 2_2 Binary Tree as ADT_General Tree.pdf
Unit 2_2 Binary Tree as ADT_General Tree.pdfUnit 2_2 Binary Tree as ADT_General Tree.pdf
Unit 2_2 Binary Tree as ADT_General Tree.pdf
 
Unit 2_1 Tree.pdf
Unit 2_1 Tree.pdfUnit 2_1 Tree.pdf
Unit 2_1 Tree.pdf
 
Unit 2_3 Binary Tree Traversals.pdf
Unit 2_3 Binary Tree Traversals.pdfUnit 2_3 Binary Tree Traversals.pdf
Unit 2_3 Binary Tree Traversals.pdf
 
Unit 1_SLL and DLL.pdf
Unit 1_SLL and DLL.pdfUnit 1_SLL and DLL.pdf
Unit 1_SLL and DLL.pdf
 
Unit 1_Stack and Queue using Linked Organization.pdf
Unit 1_Stack and Queue using Linked Organization.pdfUnit 1_Stack and Queue using Linked Organization.pdf
Unit 1_Stack and Queue using Linked Organization.pdf
 
PAI Unit 3 Paging in 80386 Microporcessor
PAI Unit 3 Paging in 80386 MicroporcessorPAI Unit 3 Paging in 80386 Microporcessor
PAI Unit 3 Paging in 80386 Microporcessor
 
PAI Unit 3 Multitasking in 80386
PAI Unit 3 Multitasking in 80386PAI Unit 3 Multitasking in 80386
PAI Unit 3 Multitasking in 80386
 
PAI Unit 2 Segmentation in 80386 microprocessor
PAI Unit 2 Segmentation in 80386 microprocessorPAI Unit 2 Segmentation in 80386 microprocessor
PAI Unit 2 Segmentation in 80386 microprocessor
 
PAI Unit 2 Protection in 80386 segmentation
PAI Unit 2 Protection in 80386 segmentationPAI Unit 2 Protection in 80386 segmentation
PAI Unit 2 Protection in 80386 segmentation
 
SE PAI Unit 2_Data Structures in 80386 segmentation
SE PAI Unit 2_Data Structures in 80386 segmentationSE PAI Unit 2_Data Structures in 80386 segmentation
SE PAI Unit 2_Data Structures in 80386 segmentation
 
SE PAI Unit 5_Timer Programming in 8051 microcontroller_Part 1
SE PAI Unit 5_Timer Programming in 8051 microcontroller_Part 1SE PAI Unit 5_Timer Programming in 8051 microcontroller_Part 1
SE PAI Unit 5_Timer Programming in 8051 microcontroller_Part 1
 
SE PAI Unit 5_Timer Programming in 8051 microcontroller_Part 2
SE PAI Unit 5_Timer Programming in 8051 microcontroller_Part 2SE PAI Unit 5_Timer Programming in 8051 microcontroller_Part 2
SE PAI Unit 5_Timer Programming in 8051 microcontroller_Part 2
 
SE PAI Unit 5_Serial Port Programming in 8051 micro controller_Part 3
SE PAI Unit 5_Serial Port Programming in 8051 micro controller_Part 3SE PAI Unit 5_Serial Port Programming in 8051 micro controller_Part 3
SE PAI Unit 5_Serial Port Programming in 8051 micro controller_Part 3
 
SE PAI Unit 5_IO programming in 8051
SE PAI Unit 5_IO programming in 8051SE PAI Unit 5_IO programming in 8051
SE PAI Unit 5_IO programming in 8051
 
Unit 5_Interrupt programming in 8051 micro controller - part 2
Unit 5_Interrupt programming in 8051 micro controller - part 2Unit 5_Interrupt programming in 8051 micro controller - part 2
Unit 5_Interrupt programming in 8051 micro controller - part 2
 
Unit 5_interrupt programming_Part 1
Unit 5_interrupt programming_Part 1Unit 5_interrupt programming_Part 1
Unit 5_interrupt programming_Part 1
 
8051 interfacing
8051 interfacing8051 interfacing
8051 interfacing
 
Unit 3 se pai_ivt and idt
Unit 3 se pai_ivt and idtUnit 3 se pai_ivt and idt
Unit 3 se pai_ivt and idt
 
Unit 2 se pai_registers in 80386
Unit 2 se pai_registers in 80386Unit 2 se pai_registers in 80386
Unit 2 se pai_registers in 80386
 
Unit i se pai_dos function calls
Unit i se pai_dos function callsUnit i se pai_dos function calls
Unit i se pai_dos function calls
 

Recently uploaded

Software and Systems Engineering Standards: Verification and Validation of Sy...
Software and Systems Engineering Standards: Verification and Validation of Sy...Software and Systems Engineering Standards: Verification and Validation of Sy...
Software and Systems Engineering Standards: Verification and Validation of Sy...VICTOR MAESTRE RAMIREZ
 
Sachpazis Costas: Geotechnical Engineering: A student's Perspective Introduction
Sachpazis Costas: Geotechnical Engineering: A student's Perspective IntroductionSachpazis Costas: Geotechnical Engineering: A student's Perspective Introduction
Sachpazis Costas: Geotechnical Engineering: A student's Perspective IntroductionDr.Costas Sachpazis
 
Heart Disease Prediction using machine learning.pptx
Heart Disease Prediction using machine learning.pptxHeart Disease Prediction using machine learning.pptx
Heart Disease Prediction using machine learning.pptxPoojaBan
 
APPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICS
APPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICSAPPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICS
APPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICSKurinjimalarL3
 
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
 
(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...ranjana rawat
 
Gurgaon ✡️9711147426✨Call In girls Gurgaon Sector 51 escort service
Gurgaon ✡️9711147426✨Call In girls Gurgaon Sector 51 escort serviceGurgaon ✡️9711147426✨Call In girls Gurgaon Sector 51 escort service
Gurgaon ✡️9711147426✨Call In girls Gurgaon Sector 51 escort servicejennyeacort
 
Current Transformer Drawing and GTP for MSETCL
Current Transformer Drawing and GTP for MSETCLCurrent Transformer Drawing and GTP for MSETCL
Current Transformer Drawing and GTP for MSETCLDeelipZope
 
OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...
OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...
OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...Soham Mondal
 
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
 
VICTOR MAESTRE RAMIREZ - Planetary Defender on NASA's Double Asteroid Redirec...
VICTOR MAESTRE RAMIREZ - Planetary Defender on NASA's Double Asteroid Redirec...VICTOR MAESTRE RAMIREZ - Planetary Defender on NASA's Double Asteroid Redirec...
VICTOR MAESTRE RAMIREZ - Planetary Defender on NASA's Double Asteroid Redirec...VICTOR MAESTRE RAMIREZ
 
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
 
VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130
VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130
VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130Suhani Kapoor
 
Study on Air-Water & Water-Water Heat Exchange in a Finned Tube Exchanger
Study on Air-Water & Water-Water Heat Exchange in a Finned Tube ExchangerStudy on Air-Water & Water-Water Heat Exchange in a Finned Tube Exchanger
Study on Air-Water & Water-Water Heat Exchange in a Finned Tube ExchangerAnamika Sarkar
 
Application of Residue Theorem to evaluate real integrations.pptx
Application of Residue Theorem to evaluate real integrations.pptxApplication of Residue Theorem to evaluate real integrations.pptx
Application of Residue Theorem to evaluate real integrations.pptx959SahilShah
 
microprocessor 8085 and its interfacing
microprocessor 8085  and its interfacingmicroprocessor 8085  and its interfacing
microprocessor 8085 and its interfacingjaychoudhary37
 
chaitra-1.pptx fake news detection using machine learning
chaitra-1.pptx  fake news detection using machine learningchaitra-1.pptx  fake news detection using machine learning
chaitra-1.pptx fake news detection using machine learningmisbanausheenparvam
 

Recently uploaded (20)

Software and Systems Engineering Standards: Verification and Validation of Sy...
Software and Systems Engineering Standards: Verification and Validation of Sy...Software and Systems Engineering Standards: Verification and Validation of Sy...
Software and Systems Engineering Standards: Verification and Validation of Sy...
 
Sachpazis Costas: Geotechnical Engineering: A student's Perspective Introduction
Sachpazis Costas: Geotechnical Engineering: A student's Perspective IntroductionSachpazis Costas: Geotechnical Engineering: A student's Perspective Introduction
Sachpazis Costas: Geotechnical Engineering: A student's Perspective Introduction
 
Heart Disease Prediction using machine learning.pptx
Heart Disease Prediction using machine learning.pptxHeart Disease Prediction using machine learning.pptx
Heart Disease Prediction using machine learning.pptx
 
APPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICS
APPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICSAPPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICS
APPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICS
 
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 )
 
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
 
(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
 
Gurgaon ✡️9711147426✨Call In girls Gurgaon Sector 51 escort service
Gurgaon ✡️9711147426✨Call In girls Gurgaon Sector 51 escort serviceGurgaon ✡️9711147426✨Call In girls Gurgaon Sector 51 escort service
Gurgaon ✡️9711147426✨Call In girls Gurgaon Sector 51 escort service
 
🔝9953056974🔝!!-YOUNG call girls in Rajendra Nagar Escort rvice Shot 2000 nigh...
🔝9953056974🔝!!-YOUNG call girls in Rajendra Nagar Escort rvice Shot 2000 nigh...🔝9953056974🔝!!-YOUNG call girls in Rajendra Nagar Escort rvice Shot 2000 nigh...
🔝9953056974🔝!!-YOUNG call girls in Rajendra Nagar Escort rvice Shot 2000 nigh...
 
Current Transformer Drawing and GTP for MSETCL
Current Transformer Drawing and GTP for MSETCLCurrent Transformer Drawing and GTP for MSETCL
Current Transformer Drawing and GTP for MSETCL
 
OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...
OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...
OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...
 
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...
 
VICTOR MAESTRE RAMIREZ - Planetary Defender on NASA's Double Asteroid Redirec...
VICTOR MAESTRE RAMIREZ - Planetary Defender on NASA's Double Asteroid Redirec...VICTOR MAESTRE RAMIREZ - Planetary Defender on NASA's Double Asteroid Redirec...
VICTOR MAESTRE RAMIREZ - Planetary Defender on NASA's Double Asteroid Redirec...
 
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
 
VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130
VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130
VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130
 
Study on Air-Water & Water-Water Heat Exchange in a Finned Tube Exchanger
Study on Air-Water & Water-Water Heat Exchange in a Finned Tube ExchangerStudy on Air-Water & Water-Water Heat Exchange in a Finned Tube Exchanger
Study on Air-Water & Water-Water Heat Exchange in a Finned Tube Exchanger
 
9953056974 Call Girls In South Ex, Escorts (Delhi) NCR.pdf
9953056974 Call Girls In South Ex, Escorts (Delhi) NCR.pdf9953056974 Call Girls In South Ex, Escorts (Delhi) NCR.pdf
9953056974 Call Girls In South Ex, Escorts (Delhi) NCR.pdf
 
Application of Residue Theorem to evaluate real integrations.pptx
Application of Residue Theorem to evaluate real integrations.pptxApplication of Residue Theorem to evaluate real integrations.pptx
Application of Residue Theorem to evaluate real integrations.pptx
 
microprocessor 8085 and its interfacing
microprocessor 8085  and its interfacingmicroprocessor 8085  and its interfacing
microprocessor 8085 and its interfacing
 
chaitra-1.pptx fake news detection using machine learning
chaitra-1.pptx  fake news detection using machine learningchaitra-1.pptx  fake news detection using machine learning
chaitra-1.pptx fake news detection using machine learning
 

SE PAI Unit 5_Serial Port Programming in 8051 microcontroller_Part 1

  • 1. 1 Unit 5: 8051 Serial Port Programming Part 1 Subject: Processor Architecture & Interfacing (SPPU, Pune 2015 Course of Information Technology) Class: SEIT Semester: II Prepared By, Ms. K. D. Patil, Assistant Professor Department of Information Technology (NBA accredited) Sanjivani College of Engineering, Kopargaon-423603. Maharashtra, India. (An Autonomous Institute, Affiliated with SPPU, Pune.) NAAC ‘A’ Grade Accredited, ISO 9001:2015 certified
  • 2. Contents Prepared By: Ms. K. D. Patil, Dept. of Information Technology, Sanjivani COE, Kopargaon 2  Part 1  Basics of Communication  Serial Vs Parallel communication  Synchronous Vs Asynchronous communication  Data Framing in Asynchronous Serial Communication  Baud Rate  Part 2  Special Function Registers  Operating modes of Serial Communication  Doubling Baud Rate in 8051  Part 3  Importance of TI Flag  Importance of RI Flag  Examples
  • 3. Learning Outcomes Prepared By: Ms. K. D. Patil, Dept. of Information Technology, Sanjivani COE, Kopargaon 3  Student will be able to  Learn basics of 8051 serial communication  Learn Special Function Registers and their configurations  Apply knowledge of 8051 assembly language to write a code for 8051 serial port
  • 4. Basics  When a processor communicates with outside world, it provides the data in byte-sized chunks  Two ways  Serial  To transfer to a device located many meters away, the serial method is used  The data is sent one bit at a time  Eg. Telephone Lines connecting different cities  Parallel  often 8 or more lines (wire conductors) are used to transfer data to a device that is only a few feet away 4 Prepared By: Ms. K. D. Patil, Dept. of Information Technology, Sanjivani COE, Kopargaon
  • 5. Basics Prepared By: Ms. K. D. Patil, Dept. of Information Technology, Sanjivani COE, Kopargaon 5  At the transmitting end, the byte of data must be converted to serial bits using parallel-in-serial-out (PISO) shift register  At the receiving end, there is a serial-in-parallel-out (SIPO) shift register to receive the serial data and pack them into byte  When the distance is short, the digital signal can be transferred as it is on a simple wire and requires no modulation  If data is to be transferred on the telephone line, it must be converted from 0s and 1s to audio tones  This conversion is performed by a device called a modem, “Modulator/demodulator”
  • 6. Basics Prepared By: Ms. K. D. Patil, Dept. of Information Technology, Sanjivani COE, Kopargaon 6  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  It is possible to write software to use either of these methods, but the programs can be tedious and long  There are special IC chips made by many manufacturers for serial communications  UART (Universal Asynchronous Receiver Transmitter)  USART (Universal Synchronous-Asynchronous Receiver- Transmitter)
  • 7. Summary Prepared By: Ms. K. D. Patil, Dept. of Information Technology, Sanjivani COE, Kopargaon 7 Parallel Data Transfer Serial Data Transfer 8 bits of data is transferred at a time One bit of data is transferred at a time 8 lines required to be connected Only 2 lines required to be connected Data transfer is faster Data transfer is slow Synchronous Data Transfer Asynchronous Data Transfer Transfers BLOCK of character at a time Transfers ONE character at a time No start & stop bit START & STOP bit is present
  • 8. Simplex, Half and Full Duplex Transfer Prepared By: Ms. K. D. Patil, Dept. of Information Technology, Sanjivani COE, Kopargaon 8
  • 9. Simplex, Half and Full Duplex Transfer Prepared By: Ms. K. D. Patil, Dept. of Information Technology, Sanjivani COE, Kopargaon 9  Simplex  Eg. Printer  If data can be transmitted and received, it is a duplex transmission  If data transmitted one way a time, it is referred to as half duplex  If data can go both ways at a time, it is full duplex  It requires two wire conductors for the data lines, one for transmission and one for reception
  • 10. Asynchronous Serial Communication and Data Framing Prepared By: Ms. K. D. Patil, Dept. of Information Technology, Sanjivani COE, Kopargaon 10  The data receiving is all 0s and 1s  To make sense of the data, sender and receiver agree on a set of rules called as Protocols  how the data is packed  how many bits/character  when the data begins and ends  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  Block-oriented data transfers use the synchronous method  The start bit is always one bit, but the stop bit can be one or two bits
  • 11. Asynchronous Serial Communication and Data Framing11  The start bit is always a 0 (low) and the stop bit(s) is 1 (high)
  • 12. Data Transfer Rate Prepared By: Ms. K. D. Patil, Dept. of Information Technology, Sanjivani COE, Kopargaon 12  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  In Modem Technology, It is defined as the number of signal changes per second  Because In modems, there are occasions when a single change of signal transfers several bits of data
  • 13. Data Transfer Rate Prepared By: Ms. K. D. Patil, Dept. of Information Technology, Sanjivani COE, Kopargaon 13  The data transfer rate of given computer system depends on communication ports incorporated into that system  IBM PC/XT could transfer data at the rate of 100 to 9600 bps  Pentium-based PCs transfer data at rates as high as 56K bps  In asynchronous serial data communication, the baud rate is limited to 100K bps  To allow data transfer between the PC and an 8051 system without any error, we must make sure that the baud rate of 8051 system matches the baud rate of the PC’s COM port
  • 14. Data Transfer Rate/ Baud Rate in 8051 Prepared By: Ms. K. D. Patil, Dept. of Information Technology, Sanjivani COE, Kopargaon 14  baud rate in the 8051 is programmable  done with the help of Timer 1 XTAL oscillator ÷ 12 ÷ 32 by UART 11.0592 MHz Machine Cycle Freq. 921.6KHz 28800 Hz To Timer 1 to set Baud Rate
  • 15. Data Transfer Rate/ Baud Rate in 8051 Prepared By: Ms. K. D. Patil, Dept. of Information Technology, Sanjivani COE, Kopargaon 15  8051 divides the crystal frequency by 12 to get the machine cycle frequency  For XTAL = 11.0592 MHz, the machine cycle frequency is 11.0592MHZ/12 = 921.6 kHz  8051's UART divides the machine cycle frequency of 921.6 kHz by 32 once more before it is used by Timer 1 to set the baud rate  So, 921.6 kHz divided by 32 gives 28,800 Hz is the frequency provided by UART to Timer1 to set Baud Rate  Timer 1 must be programmed in mode 2, that is 8-bit, auto-reload
  • 16. Example Prepared By: Ms. K. D. Patil, Dept. of Information Technology, Sanjivani COE, Kopargaon 16  With XTAL = 11.0592 MHz, find the TH1 value needed to have the following baud rates. (a) 9600 (b) 2400 (c) 1200 Solution: The machine cycle frequency of 8051 = 11.0592 / 12 = 921.6 kHz, and 921.6 kHz / 32 = 28,800 Hz is frequency by UART to timer 1 to set baud rate. (a) 28,800 / 3 = 9600 where -3 = FD (hex) is loaded into TH1 (b) 28,800 / 12 = 2400 where -12 = F4 (hex) is loaded into TH1 (c) 28,800 / 24 = 1200 where -24 = E8 (hex) is loaded into TH1 Notice that dividing 1/12 of the crystal frequency by 32 is the default value upon activation of the 8051 RESET pin.
  • 17. Timer-1 TH1 Register Values for Various Baud Rates Prepared By: Ms. K. D. Patil, Dept. of Information Technology, Sanjivani COE, Kopargaon 17 Baud Rate TH1 (Decimal) TH1 (Hex) 9600 -3 FD 4800 -6 FA 2400 -12 F4 1200 -24 E8 Note : Here XTAL = 11.0592 MHz
  • 18. Reference Prepared By: Ms. K. D. Patil, Dept. of Information Technology, Sanjivani COE, Kopargaon 18  “The 8051 Microcontroller and Embedded Systems using Assembly and C” , Muhammad Ali Mazidi, Janice Gillispie Mazidi, Rolin D. McKinlay, Second Edition, Pearson publication
  • 19. Prepared By: Ms. K. D. Patil, Dept. of Information Technology, Sanjivani COE, Kopargaon 19