SlideShare a Scribd company logo
1 of 27
www.techvilla.org.in
1
TECHVILL
A
www.techvilla.org.in
www.techvilla.org.in
Serial communication
www.techvilla.org.in
Basics of serial communication
Serial versus Parallel Data Transfer
www.techvilla.org.in
UART
• RS232 standard and
application, e.g.
4
3
RS232 port
(UART)
RS232 port
(UART)
RS232 standard
3 wires
+10 V=‘0’=SPACE
-10V=‘1’=MARK
Pin2
Pin3
pin5
Pin3
Pin2
pin5
www.techvilla.org.in
U Universal A Asynchronous R Receiver T Transmitter
UART for data communication
• Serial data transmission means sending data bits one by one using one
wire.
• Asynchronous transmission means a data (including one start bit , 8-
bit data, and stop bits) can be sent at any time.
5
4
www.techvilla.org.in
Universal asynchronous receiver transmitter : UART
• RS232 is a serial communication standard
• Since it is asynchronous, no external clock is needed, only 3 wires are
required for the simplest RS232 connection {GND, tx(transmit),
rx(receive)}
6
5
+10V=Logic 0=space
-10V= Logic 1=mark
Exercise: Sketch Bit Patterns for character A and B
Start 0 1 2 3 4 5 6 7 stop
Bit 0 to 7 (least sig. bit first )
time
www.techvilla.org.inCEG2400 Ch6. Serial Interface -- UART V4b
ASCII table
7
6
www.techvilla.org.inCEG2400 Ch6. Serial Interface -- UART V4b
EXAMPLES
• Sending ASCII
• ‘5’=0x35=0011 0101b
8
7
Start bit=0
10101100(stop bit=1)
Least Sign. Bit first
What is this code ?
The whole ASCII serial character has 10 bits
(1 start+8 data + 1 stop bit)
Stop bit=1
Oscilloscope
Probe
T=bit period
=1/baud rate
www.techvilla.org.inCEG2400 Ch6. Serial Interface -- UART V4b
If the baud rate is 57600 bits per second
Define ‘bit period’ :the amount of time to transmit a logic 1 or 0. (bit period= 1/57600
seconds)
• Each bit lasts for (1/Baud rate) seconds
9
8
bit period =
1/baud rate =(1 / 57600) seconds=17.4 us
Exercise: What is the “bit period” in seconds if baud rate is 2400?
www.techvilla.org.in
Asynchronous Serial Communication
• With asynchronous communication, the transmitter and
receiver do not share a common clock
Transmitter Receiver+
1 byte-wide Data
Data
–
1 byte-wide Data
The Receiver
φ Extracts the data using its own
clock
φ Converts the serial data back
to the parallel form after
stripping off the start, stop and
parity bits
The Transmitter
φ Shifts the parallel data onto
the serial line using its own
clock
φ Also adds the start, stop and
parity check bits
Add: Start, Stop, Parity Bits Remove: Start, Stop, Parity Bits
www.techvilla.org.in
Asynchronous Serial Communication
• Start bit—indicates the beginning of the data word
• Stop bit—indicates the end of the data word
• Parity bit—added for error detection (optional)
• Data bits—the actual data to be transmitted
• Baud rate—the bit rate of the serial port
• Throughput—actual data transmitted per sec (total bits transmitted—overhead)
• Example: 115200 baud = 115200 bits/sec
• If using 8-bit data, 1 start, 1 stop, and no parity bits, the effective
throughput is: 115200 * 8 / 10 = 92160 bits/sec
www.techvilla.org.in
Asynchronous Serial Communication
• Asynchronous transmission is easy to implement but less
efficient as it requires an extra 2-3 control bits for every 8
data bits
• This method is usually used for low volume transmission
www.techvilla.org.in
Synchronous Serial Communication
• In the synchronous mode, the transmitter and receiver share a common clock
• The transmitter typically provides the clock as a separate signal in addition to the serial
data
Transmitter Receiver
Data
Clock
The Receiver
φ Extracts the data using
the clock provided by the
transmitter
φ Converts the serial data
back to the parallel form
The Transmitter
φ Shifts the data onto the serial
line using its own clock
φ Provides the clock as a
separate signal
φ No start, stop, or parity bits
added to data
1 byte-wide Data 1 byte-wide Data
www.techvilla.org.in
Avr uart
www.techvilla.org.in
Serial connection using rs232 protocol
www.techvilla.org.in
RS232
• For asynchronous communication.
• between two data serial links on a network Between a data─
communication equipment and data terminal equipment.
• RS232C a standard protocol used in IBM PC COM ports, keyboard,─
computer-mice and
• For the data serial link network in UART bit format
www.techvilla.org.in
DB 9 connector
www.techvilla.org.in
Max 232 ic
www.techvilla.org.in
Avr connection
www.techvilla.org.in
How to set-up avr UART
• The first step is to set the baud rate in both, the master and the
slave. The baud rate has to be the same for both – master and slave.
• Set the number of data bits, which needs to be sent.
• Get the buffer ready! In case of transmission (from AVR to some other
device), load it up with the data to be sent, whereas in case of
reception, save the previous data so that the new received data can
be overwritten onto it.
• Then enable the transmitter/receiver according to the desired usage.
www.techvilla.org.in
• in UART, there is no master or slave since master is defined by the
MicroController, which is responsible for clock pulse generation.
• Master and Slave terms occur only in the case of USART.
• Master µC is the one which is responsible for Clock pulse generation
on the Bus.
www.techvilla.org.in
Baud rate generation
• The baud rate of UART/USART is set using the 16-bit wide UBRR
register.
www.techvilla.org.in
UBRR register
• he 16-bit UBRR register is comprised of two 8-bit registers – UBRRH
(high) and UBRRL (low).
• The USART Baud Rate Register (UBRR) and the down-counter
connected to it functions as a programmable prescaler or baud rate
generator.
• The down-counter, running at system clock (FOSC), is loaded with the
UBRR value each time the counter has counted down to zero or when
the UBRRL Register is written.
• A clock is generated each time the counter reaches zero.
www.techvilla.org.in
Calculating baud rate and UBRR value
www.techvilla.org.in
•BAUD = Baud Rate in Bits/Second (bps)
•Bps = Bytes/Second, whereas bps = Bits/Second)
•FOSC
= System Clock Frequency (1MHz) (or as per use in case of external oscillator)
•UBRR = Contents of UBRRL and UBRRH registers
www.techvilla.org.in
Uart data Frame
www.techvilla.org.in
FRAME STRUCTURE
• USART communication uses special protocol to transmit data reliable.
It consists of several parts:
• 1 start bit;
• 5,6,7,8 or 9 data bits;
• no, even, or odd parity bit;
• 1 or 2 stop bits.

More Related Content

What's hot

PIC MICROCONTROLLERS -CLASS NOTES
PIC MICROCONTROLLERS -CLASS NOTESPIC MICROCONTROLLERS -CLASS NOTES
PIC MICROCONTROLLERS -CLASS NOTESDr.YNM
 
Memory & I/O interfacing
Memory & I/O  interfacingMemory & I/O  interfacing
Memory & I/O interfacingdeval patel
 
8086 pin details
8086 pin details8086 pin details
8086 pin detailsAJAL A J
 
Rf power amplifier design
Rf power amplifier designRf power amplifier design
Rf power amplifier designvenkateshp100
 
Pic microcontroller architecture
Pic microcontroller architecturePic microcontroller architecture
Pic microcontroller architectureDominicHendry
 
Superhetrodyne receiver
Superhetrodyne receiverSuperhetrodyne receiver
Superhetrodyne receiverlrsst
 
Double Side band Suppressed carrier (DSB-SC) Modulation and Demodulation.
 Double Side band Suppressed carrier (DSB-SC) Modulation and Demodulation. Double Side band Suppressed carrier (DSB-SC) Modulation and Demodulation.
Double Side band Suppressed carrier (DSB-SC) Modulation and Demodulation.SAiFul IslAm
 
8086 microprocessor-architecture
8086 microprocessor-architecture8086 microprocessor-architecture
8086 microprocessor-architectureprasadpawaskar
 
Microprocessor and microcontrollers
Microprocessor and microcontrollersMicroprocessor and microcontrollers
Microprocessor and microcontrollersHiran Gabriel
 
Contamination delay
Contamination delayContamination delay
Contamination delayNima Afraz
 
Chapter 8 Embedded Hardware Design and Development (third portion)
Chapter 8 Embedded Hardware Design and Development (third portion)Chapter 8 Embedded Hardware Design and Development (third portion)
Chapter 8 Embedded Hardware Design and Development (third portion)Moe Moe Myint
 
Interconnect timing model
Interconnect  timing modelInterconnect  timing model
Interconnect timing modelPrachi Pandey
 

What's hot (20)

PIC MICROCONTROLLERS -CLASS NOTES
PIC MICROCONTROLLERS -CLASS NOTESPIC MICROCONTROLLERS -CLASS NOTES
PIC MICROCONTROLLERS -CLASS NOTES
 
I/O Ports
I/O Ports I/O Ports
I/O Ports
 
Memory & I/O interfacing
Memory & I/O  interfacingMemory & I/O  interfacing
Memory & I/O interfacing
 
8086 pin details
8086 pin details8086 pin details
8086 pin details
 
AVRTIMER.pptx
AVRTIMER.pptxAVRTIMER.pptx
AVRTIMER.pptx
 
Verilog hdl
Verilog hdlVerilog hdl
Verilog hdl
 
Generation of fm
Generation of fmGeneration of fm
Generation of fm
 
8051 MICROCONTROLLER
8051 MICROCONTROLLER 8051 MICROCONTROLLER
8051 MICROCONTROLLER
 
Embedded C - Lecture 1
Embedded C - Lecture 1Embedded C - Lecture 1
Embedded C - Lecture 1
 
Rf power amplifier design
Rf power amplifier designRf power amplifier design
Rf power amplifier design
 
Pic microcontroller architecture
Pic microcontroller architecturePic microcontroller architecture
Pic microcontroller architecture
 
Superhetrodyne receiver
Superhetrodyne receiverSuperhetrodyne receiver
Superhetrodyne receiver
 
Double Side band Suppressed carrier (DSB-SC) Modulation and Demodulation.
 Double Side band Suppressed carrier (DSB-SC) Modulation and Demodulation. Double Side band Suppressed carrier (DSB-SC) Modulation and Demodulation.
Double Side band Suppressed carrier (DSB-SC) Modulation and Demodulation.
 
8086 microprocessor-architecture
8086 microprocessor-architecture8086 microprocessor-architecture
8086 microprocessor-architecture
 
PLDs
PLDsPLDs
PLDs
 
UART
UARTUART
UART
 
Microprocessor and microcontrollers
Microprocessor and microcontrollersMicroprocessor and microcontrollers
Microprocessor and microcontrollers
 
Contamination delay
Contamination delayContamination delay
Contamination delay
 
Chapter 8 Embedded Hardware Design and Development (third portion)
Chapter 8 Embedded Hardware Design and Development (third portion)Chapter 8 Embedded Hardware Design and Development (third portion)
Chapter 8 Embedded Hardware Design and Development (third portion)
 
Interconnect timing model
Interconnect  timing modelInterconnect  timing model
Interconnect timing model
 

Similar to Serial Communication Part-16

Serial Communication In Atmega 16
Serial Communication In Atmega 16Serial Communication In Atmega 16
Serial Communication In Atmega 16Suren Kumar
 
UART(universal asynchronous receiver transmitter ) PPT
UART(universal asynchronous receiver transmitter ) PPTUART(universal asynchronous receiver transmitter ) PPT
UART(universal asynchronous receiver transmitter ) PPTSai_praneeth
 
Lecture 10 (serial communication)
Lecture 10 (serial communication)Lecture 10 (serial communication)
Lecture 10 (serial communication)cairo university
 
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
 
The presentation is about USART and serial communication
The presentation is about USART and serial communicationThe presentation is about USART and serial communication
The presentation is about USART and serial communicationsinaankhalil
 
Universal Asynchronous Receive and transmit IP core
Universal Asynchronous Receive and transmit IP coreUniversal Asynchronous Receive and transmit IP core
Universal Asynchronous Receive and transmit IP coreAneesh Raveendran
 
Bluetooth Home Automation
Bluetooth Home AutomationBluetooth Home Automation
Bluetooth Home AutomationApoorv Gupta
 
Peripherals and interfacing
Peripherals  and interfacingPeripherals  and interfacing
Peripherals and interfacingRAMPRAKASHT1
 
UART_Tx_Rx_Conroller_Design_in_Verilog__1674535724.pdf
UART_Tx_Rx_Conroller_Design_in_Verilog__1674535724.pdfUART_Tx_Rx_Conroller_Design_in_Verilog__1674535724.pdf
UART_Tx_Rx_Conroller_Design_in_Verilog__1674535724.pdfSumanishSharma
 

Similar to Serial Communication Part-16 (20)

ES UNIT3.pptx
ES UNIT3.pptxES UNIT3.pptx
ES UNIT3.pptx
 
Tutorial
TutorialTutorial
Tutorial
 
Serial Communication In Atmega 16
Serial Communication In Atmega 16Serial Communication In Atmega 16
Serial Communication In Atmega 16
 
8251 USART
8251 USART8251 USART
8251 USART
 
8251 USART.pptx
8251 USART.pptx8251 USART.pptx
8251 USART.pptx
 
Uart
UartUart
Uart
 
8251 a basic
8251 a basic8251 a basic
8251 a basic
 
Class 4 I/O Ports
Class 4 I/O PortsClass 4 I/O Ports
Class 4 I/O Ports
 
UART(universal asynchronous receiver transmitter ) PPT
UART(universal asynchronous receiver transmitter ) PPTUART(universal asynchronous receiver transmitter ) PPT
UART(universal asynchronous receiver transmitter ) PPT
 
Lecture 10 (serial communication)
Lecture 10 (serial communication)Lecture 10 (serial communication)
Lecture 10 (serial communication)
 
Lecture 10 _serial_communication
Lecture 10 _serial_communicationLecture 10 _serial_communication
Lecture 10 _serial_communication
 
Chapter 3 esy
Chapter 3 esy Chapter 3 esy
Chapter 3 esy
 
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
 
The presentation is about USART and serial communication
The presentation is about USART and serial communicationThe presentation is about USART and serial communication
The presentation is about USART and serial communication
 
Universal Asynchronous Receive and transmit IP core
Universal Asynchronous Receive and transmit IP coreUniversal Asynchronous Receive and transmit IP core
Universal Asynchronous Receive and transmit IP core
 
Bluetooth Home Automation
Bluetooth Home AutomationBluetooth Home Automation
Bluetooth Home Automation
 
Peripherals and interfacing
Peripherals  and interfacingPeripherals  and interfacing
Peripherals and interfacing
 
UART.pptx
UART.pptxUART.pptx
UART.pptx
 
UART_Tx_Rx_Conroller_Design_in_Verilog__1674535724.pdf
UART_Tx_Rx_Conroller_Design_in_Verilog__1674535724.pdfUART_Tx_Rx_Conroller_Design_in_Verilog__1674535724.pdf
UART_Tx_Rx_Conroller_Design_in_Verilog__1674535724.pdf
 
Serial Communication in 8051
Serial Communication in 8051Serial Communication in 8051
Serial Communication in 8051
 

More from Techvilla

Raspberry pi Part 26
Raspberry pi Part 26Raspberry pi Part 26
Raspberry pi Part 26Techvilla
 
Raspberry pi Part 25
Raspberry pi Part 25Raspberry pi Part 25
Raspberry pi Part 25Techvilla
 
Raspberry pi Part 24
Raspberry pi Part 24Raspberry pi Part 24
Raspberry pi Part 24Techvilla
 
Raspberry pi Part 23
Raspberry pi Part 23Raspberry pi Part 23
Raspberry pi Part 23Techvilla
 
Raspberry pi Part 22
Raspberry pi Part 22Raspberry pi Part 22
Raspberry pi Part 22Techvilla
 
Raspberry pi Part 21
Raspberry pi Part 21Raspberry pi Part 21
Raspberry pi Part 21Techvilla
 
Raspberry pi Part 20
Raspberry pi Part 20Raspberry pi Part 20
Raspberry pi Part 20Techvilla
 
Raspberry pi Part 19
Raspberry pi Part 19Raspberry pi Part 19
Raspberry pi Part 19Techvilla
 
Raspberry pi Part 18
Raspberry pi Part 18Raspberry pi Part 18
Raspberry pi Part 18Techvilla
 
Raspberry pi Part 17
Raspberry pi Part 17Raspberry pi Part 17
Raspberry pi Part 17Techvilla
 
Raspberry pi Part 16
Raspberry pi Part 16Raspberry pi Part 16
Raspberry pi Part 16Techvilla
 
Rasperry pi Part 15
Rasperry pi Part 15Rasperry pi Part 15
Rasperry pi Part 15Techvilla
 
Rasperry pi Part 13
Rasperry pi Part 13Rasperry pi Part 13
Rasperry pi Part 13Techvilla
 
Rasperry pi Part 12
Rasperry pi Part 12Rasperry pi Part 12
Rasperry pi Part 12Techvilla
 
Rasperry pi Part 10
Rasperry pi Part 10Rasperry pi Part 10
Rasperry pi Part 10Techvilla
 
Rasperry pi Part 9
Rasperry pi Part 9Rasperry pi Part 9
Rasperry pi Part 9Techvilla
 
Rasperry pi Part 8
Rasperry pi Part 8Rasperry pi Part 8
Rasperry pi Part 8Techvilla
 
Rasperry pi Part 7
Rasperry pi Part 7Rasperry pi Part 7
Rasperry pi Part 7Techvilla
 
Raspberry pi Part 6
Raspberry pi Part 6Raspberry pi Part 6
Raspberry pi Part 6Techvilla
 
Raspberry pi Part 5
Raspberry pi Part 5Raspberry pi Part 5
Raspberry pi Part 5Techvilla
 

More from Techvilla (20)

Raspberry pi Part 26
Raspberry pi Part 26Raspberry pi Part 26
Raspberry pi Part 26
 
Raspberry pi Part 25
Raspberry pi Part 25Raspberry pi Part 25
Raspberry pi Part 25
 
Raspberry pi Part 24
Raspberry pi Part 24Raspberry pi Part 24
Raspberry pi Part 24
 
Raspberry pi Part 23
Raspberry pi Part 23Raspberry pi Part 23
Raspberry pi Part 23
 
Raspberry pi Part 22
Raspberry pi Part 22Raspberry pi Part 22
Raspberry pi Part 22
 
Raspberry pi Part 21
Raspberry pi Part 21Raspberry pi Part 21
Raspberry pi Part 21
 
Raspberry pi Part 20
Raspberry pi Part 20Raspberry pi Part 20
Raspberry pi Part 20
 
Raspberry pi Part 19
Raspberry pi Part 19Raspberry pi Part 19
Raspberry pi Part 19
 
Raspberry pi Part 18
Raspberry pi Part 18Raspberry pi Part 18
Raspberry pi Part 18
 
Raspberry pi Part 17
Raspberry pi Part 17Raspberry pi Part 17
Raspberry pi Part 17
 
Raspberry pi Part 16
Raspberry pi Part 16Raspberry pi Part 16
Raspberry pi Part 16
 
Rasperry pi Part 15
Rasperry pi Part 15Rasperry pi Part 15
Rasperry pi Part 15
 
Rasperry pi Part 13
Rasperry pi Part 13Rasperry pi Part 13
Rasperry pi Part 13
 
Rasperry pi Part 12
Rasperry pi Part 12Rasperry pi Part 12
Rasperry pi Part 12
 
Rasperry pi Part 10
Rasperry pi Part 10Rasperry pi Part 10
Rasperry pi Part 10
 
Rasperry pi Part 9
Rasperry pi Part 9Rasperry pi Part 9
Rasperry pi Part 9
 
Rasperry pi Part 8
Rasperry pi Part 8Rasperry pi Part 8
Rasperry pi Part 8
 
Rasperry pi Part 7
Rasperry pi Part 7Rasperry pi Part 7
Rasperry pi Part 7
 
Raspberry pi Part 6
Raspberry pi Part 6Raspberry pi Part 6
Raspberry pi Part 6
 
Raspberry pi Part 5
Raspberry pi Part 5Raspberry pi Part 5
Raspberry pi Part 5
 

Recently uploaded

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
 
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
 
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
 
(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
 
High Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur EscortsHigh Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur EscortsCall Girls in Nagpur High Profile
 
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
 
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
 
Introduction to Multiple Access Protocol.pptx
Introduction to Multiple Access Protocol.pptxIntroduction to Multiple Access Protocol.pptx
Introduction to Multiple Access Protocol.pptxupamatechverse
 
Porous Ceramics seminar and technical writing
Porous Ceramics seminar and technical writingPorous Ceramics seminar and technical writing
Porous Ceramics seminar and technical writingrakeshbaidya232001
 
MANUFACTURING PROCESS-II UNIT-2 LATHE MACHINE
MANUFACTURING PROCESS-II UNIT-2 LATHE MACHINEMANUFACTURING PROCESS-II UNIT-2 LATHE MACHINE
MANUFACTURING PROCESS-II UNIT-2 LATHE MACHINESIVASHANKAR N
 
Call Girls Service Nagpur Tanvi Call 7001035870 Meet With Nagpur Escorts
Call Girls Service Nagpur Tanvi Call 7001035870 Meet With Nagpur EscortsCall Girls Service Nagpur Tanvi Call 7001035870 Meet With Nagpur Escorts
Call Girls Service Nagpur Tanvi Call 7001035870 Meet With Nagpur EscortsCall Girls in Nagpur High Profile
 
(ANJALI) Dange Chowk Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(ANJALI) Dange Chowk Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...(ANJALI) Dange Chowk Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(ANJALI) Dange Chowk Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...ranjana rawat
 
HARMONY IN THE NATURE AND EXISTENCE - Unit-IV
HARMONY IN THE NATURE AND EXISTENCE - Unit-IVHARMONY IN THE NATURE AND EXISTENCE - Unit-IV
HARMONY IN THE NATURE AND EXISTENCE - Unit-IVRajaP95
 
Architect Hassan Khalil Portfolio for 2024
Architect Hassan Khalil Portfolio for 2024Architect Hassan Khalil Portfolio for 2024
Architect Hassan Khalil Portfolio for 2024hassan khalil
 
Microscopic Analysis of Ceramic Materials.pptx
Microscopic Analysis of Ceramic Materials.pptxMicroscopic Analysis of Ceramic Materials.pptx
Microscopic Analysis of Ceramic Materials.pptxpurnimasatapathy1234
 
Call Girls in Nagpur Suman Call 7001035870 Meet With Nagpur Escorts
Call Girls in Nagpur Suman Call 7001035870 Meet With Nagpur EscortsCall Girls in Nagpur Suman Call 7001035870 Meet With Nagpur Escorts
Call Girls in Nagpur Suman Call 7001035870 Meet With Nagpur EscortsCall Girls in Nagpur High Profile
 
Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...
Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...
Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...Christo Ananth
 
College Call Girls Nashik Nehal 7001305949 Independent Escort Service Nashik
College Call Girls Nashik Nehal 7001305949 Independent Escort Service NashikCollege Call Girls Nashik Nehal 7001305949 Independent Escort Service Nashik
College Call Girls Nashik Nehal 7001305949 Independent Escort Service NashikCall Girls in Nagpur High Profile
 

Recently uploaded (20)

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
 
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
 
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
 
DJARUM4D - SLOT GACOR ONLINE | SLOT DEMO ONLINE
DJARUM4D - SLOT GACOR ONLINE | SLOT DEMO ONLINEDJARUM4D - SLOT GACOR ONLINE | SLOT DEMO ONLINE
DJARUM4D - SLOT GACOR ONLINE | SLOT DEMO ONLINE
 
(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
 
High Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur EscortsHigh Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur Escorts
 
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
 
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
 
Introduction to Multiple Access Protocol.pptx
Introduction to Multiple Access Protocol.pptxIntroduction to Multiple Access Protocol.pptx
Introduction to Multiple Access Protocol.pptx
 
Porous Ceramics seminar and technical writing
Porous Ceramics seminar and technical writingPorous Ceramics seminar and technical writing
Porous Ceramics seminar and technical writing
 
MANUFACTURING PROCESS-II UNIT-2 LATHE MACHINE
MANUFACTURING PROCESS-II UNIT-2 LATHE MACHINEMANUFACTURING PROCESS-II UNIT-2 LATHE MACHINE
MANUFACTURING PROCESS-II UNIT-2 LATHE MACHINE
 
Call Girls Service Nagpur Tanvi Call 7001035870 Meet With Nagpur Escorts
Call Girls Service Nagpur Tanvi Call 7001035870 Meet With Nagpur EscortsCall Girls Service Nagpur Tanvi Call 7001035870 Meet With Nagpur Escorts
Call Girls Service Nagpur Tanvi Call 7001035870 Meet With Nagpur Escorts
 
(ANJALI) Dange Chowk Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(ANJALI) Dange Chowk Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...(ANJALI) Dange Chowk Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(ANJALI) Dange Chowk Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
 
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
 
HARMONY IN THE NATURE AND EXISTENCE - Unit-IV
HARMONY IN THE NATURE AND EXISTENCE - Unit-IVHARMONY IN THE NATURE AND EXISTENCE - Unit-IV
HARMONY IN THE NATURE AND EXISTENCE - Unit-IV
 
Architect Hassan Khalil Portfolio for 2024
Architect Hassan Khalil Portfolio for 2024Architect Hassan Khalil Portfolio for 2024
Architect Hassan Khalil Portfolio for 2024
 
Microscopic Analysis of Ceramic Materials.pptx
Microscopic Analysis of Ceramic Materials.pptxMicroscopic Analysis of Ceramic Materials.pptx
Microscopic Analysis of Ceramic Materials.pptx
 
Call Girls in Nagpur Suman Call 7001035870 Meet With Nagpur Escorts
Call Girls in Nagpur Suman Call 7001035870 Meet With Nagpur EscortsCall Girls in Nagpur Suman Call 7001035870 Meet With Nagpur Escorts
Call Girls in Nagpur Suman Call 7001035870 Meet With Nagpur Escorts
 
Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...
Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...
Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...
 
College Call Girls Nashik Nehal 7001305949 Independent Escort Service Nashik
College Call Girls Nashik Nehal 7001305949 Independent Escort Service NashikCollege Call Girls Nashik Nehal 7001305949 Independent Escort Service Nashik
College Call Girls Nashik Nehal 7001305949 Independent Escort Service Nashik
 

Serial Communication Part-16

  • 3. www.techvilla.org.in Basics of serial communication Serial versus Parallel Data Transfer
  • 4. www.techvilla.org.in UART • RS232 standard and application, e.g. 4 3 RS232 port (UART) RS232 port (UART) RS232 standard 3 wires +10 V=‘0’=SPACE -10V=‘1’=MARK Pin2 Pin3 pin5 Pin3 Pin2 pin5
  • 5. www.techvilla.org.in U Universal A Asynchronous R Receiver T Transmitter UART for data communication • Serial data transmission means sending data bits one by one using one wire. • Asynchronous transmission means a data (including one start bit , 8- bit data, and stop bits) can be sent at any time. 5 4
  • 6. www.techvilla.org.in Universal asynchronous receiver transmitter : UART • RS232 is a serial communication standard • Since it is asynchronous, no external clock is needed, only 3 wires are required for the simplest RS232 connection {GND, tx(transmit), rx(receive)} 6 5 +10V=Logic 0=space -10V= Logic 1=mark Exercise: Sketch Bit Patterns for character A and B Start 0 1 2 3 4 5 6 7 stop Bit 0 to 7 (least sig. bit first ) time
  • 7. www.techvilla.org.inCEG2400 Ch6. Serial Interface -- UART V4b ASCII table 7 6
  • 8. www.techvilla.org.inCEG2400 Ch6. Serial Interface -- UART V4b EXAMPLES • Sending ASCII • ‘5’=0x35=0011 0101b 8 7 Start bit=0 10101100(stop bit=1) Least Sign. Bit first What is this code ? The whole ASCII serial character has 10 bits (1 start+8 data + 1 stop bit) Stop bit=1 Oscilloscope Probe T=bit period =1/baud rate
  • 9. www.techvilla.org.inCEG2400 Ch6. Serial Interface -- UART V4b If the baud rate is 57600 bits per second Define ‘bit period’ :the amount of time to transmit a logic 1 or 0. (bit period= 1/57600 seconds) • Each bit lasts for (1/Baud rate) seconds 9 8 bit period = 1/baud rate =(1 / 57600) seconds=17.4 us Exercise: What is the “bit period” in seconds if baud rate is 2400?
  • 10. www.techvilla.org.in Asynchronous Serial Communication • With asynchronous communication, the transmitter and receiver do not share a common clock Transmitter Receiver+ 1 byte-wide Data Data – 1 byte-wide Data The Receiver φ Extracts the data using its own clock φ Converts the serial data back to the parallel form after stripping off the start, stop and parity bits The Transmitter φ Shifts the parallel data onto the serial line using its own clock φ Also adds the start, stop and parity check bits Add: Start, Stop, Parity Bits Remove: Start, Stop, Parity Bits
  • 11. www.techvilla.org.in Asynchronous Serial Communication • Start bit—indicates the beginning of the data word • Stop bit—indicates the end of the data word • Parity bit—added for error detection (optional) • Data bits—the actual data to be transmitted • Baud rate—the bit rate of the serial port • Throughput—actual data transmitted per sec (total bits transmitted—overhead) • Example: 115200 baud = 115200 bits/sec • If using 8-bit data, 1 start, 1 stop, and no parity bits, the effective throughput is: 115200 * 8 / 10 = 92160 bits/sec
  • 12. www.techvilla.org.in Asynchronous Serial Communication • Asynchronous transmission is easy to implement but less efficient as it requires an extra 2-3 control bits for every 8 data bits • This method is usually used for low volume transmission
  • 13. www.techvilla.org.in Synchronous Serial Communication • In the synchronous mode, the transmitter and receiver share a common clock • The transmitter typically provides the clock as a separate signal in addition to the serial data Transmitter Receiver Data Clock The Receiver φ Extracts the data using the clock provided by the transmitter φ Converts the serial data back to the parallel form The Transmitter φ Shifts the data onto the serial line using its own clock φ Provides the clock as a separate signal φ No start, stop, or parity bits added to data 1 byte-wide Data 1 byte-wide Data
  • 16. www.techvilla.org.in RS232 • For asynchronous communication. • between two data serial links on a network Between a data─ communication equipment and data terminal equipment. • RS232C a standard protocol used in IBM PC COM ports, keyboard,─ computer-mice and • For the data serial link network in UART bit format
  • 20. www.techvilla.org.in How to set-up avr UART • The first step is to set the baud rate in both, the master and the slave. The baud rate has to be the same for both – master and slave. • Set the number of data bits, which needs to be sent. • Get the buffer ready! In case of transmission (from AVR to some other device), load it up with the data to be sent, whereas in case of reception, save the previous data so that the new received data can be overwritten onto it. • Then enable the transmitter/receiver according to the desired usage.
  • 21. www.techvilla.org.in • in UART, there is no master or slave since master is defined by the MicroController, which is responsible for clock pulse generation. • Master and Slave terms occur only in the case of USART. • Master µC is the one which is responsible for Clock pulse generation on the Bus.
  • 22. www.techvilla.org.in Baud rate generation • The baud rate of UART/USART is set using the 16-bit wide UBRR register.
  • 23. www.techvilla.org.in UBRR register • he 16-bit UBRR register is comprised of two 8-bit registers – UBRRH (high) and UBRRL (low). • The USART Baud Rate Register (UBRR) and the down-counter connected to it functions as a programmable prescaler or baud rate generator. • The down-counter, running at system clock (FOSC), is loaded with the UBRR value each time the counter has counted down to zero or when the UBRRL Register is written. • A clock is generated each time the counter reaches zero.
  • 25. www.techvilla.org.in •BAUD = Baud Rate in Bits/Second (bps) •Bps = Bytes/Second, whereas bps = Bits/Second) •FOSC = System Clock Frequency (1MHz) (or as per use in case of external oscillator) •UBRR = Contents of UBRRL and UBRRH registers
  • 27. www.techvilla.org.in FRAME STRUCTURE • USART communication uses special protocol to transmit data reliable. It consists of several parts: • 1 start bit; • 5,6,7,8 or 9 data bits; • no, even, or odd parity bit; • 1 or 2 stop bits.

Editor's Notes

  1. Asynchronous transmission is easy to implement but less efficient (i.e. slower) as it requires an extra 2-3 control bits for every 8 data bits.
  2. Asynchronous transmission is easy to implement but less efficient (i.e. slower) as it requires an extra 2-3 control bits for every 8 data bits.