SlideShare a Scribd company logo
BASICS OF THE UART
COMMUNICATION
PROTOCOL
UART was developed by Gordon Bell at
Digital Equipment Corporation (DEC) in the 1960's.
WHAT ARE UART FEATURES
• It is Asynchronous (means no clock) where as SPI and I2C synchronous
• It converts parallel data to serial and serial data to parallel data
• It transmit data using packet format
• It support serial communication
• It does not support multi master and multi slave configuration
• So only one master and one slave.
• It supports full duplex
• Data speed measured in-terms of baud rate.
• The “Universal” portion is with regards to fact that the format of the data and the
speed of the transmission are configurable.
WHAT IS UART
• A UART (Universal Asynchronous Receiver/Transmitter) is the
microchip with programming that controls a computer's interface
to its attached serial devices.
• Embedded systems, microcontrollers, and computers mostly use
UART as a form of device-to-device hardware communication
protocol.
• Among the available communication protocols, UART uses only two
wires for its transmitting and receiving ends.
WHY IS UART CALLED UNIVERSAL?
WHAT ARE UART FEATURES
• It has only two wires
• It supports full duplex communication
Transceiver Transceiver
Transmitter side Receiver side
Transceiver means = Transmitter + Receiver in one device.
Data Forwarding from Laptop to Raspberry using UART-
But it needs USB to Serial data converter.
WHAT IS ASYNCHRONOUS AND SYNCHRONOUS ?
• It is Asynchronous (means no clock) so data can transmit using packet format.
• What is the advantage of asynchronous mode of transmission ?
• It supports multi subscriber configuration in network to forward their
messages/ data.
• Where as in synchronous only one subscriber/one letter/ one word/ can
send (data) along with clock ( using clock) . Clock used for
synchronous.
WHAT IS THE DRAWBACK OF ASYNCHRONOUS ?
• In asynchronous mode of communication- there is no guarantee of delivery of
messages. So reliability is less.
• But in synchronous 100 % delivery of guarantee. Because the second data will not be
delivered until the first data is completely delivered.
•HOW UART WORKS
•Converts the bytes it receives from the computer along parallel circuits into a
single serial bit stream for outbound transmission.
•On inbound transmission, converts the serial bit stream into the bytes that
the computer handles
•Adds a parity bit (if it's been selected) on outbound transmissions and checks
the parity of incoming bytes (if selected) and discards the parity bit.
•Adds start and stop delineators on outbound and strips them from inbound
transmissions
•Handles interrupt s from the keyboard and mouse (which are serial devices
with special port s)
•May handle other kinds of interrupt and device management that require
coordinating the computer's speed of operation with device speeds
UART SPI and I2C serial Interfaces .pptx
STEPS OF UART TRANSMISSION
1. The transmitting UART receives data in parallel from the data bus:
2. THE TRANSMITTING UART ADDS THE START BIT, PARITY
BIT, AND THE STOP BIT(S) TO THE DATA FRAME:
3. THE ENTIRE PACKET IS SENT SERIALLY FROM THE
TRANSMITTING UART TO THE RECEIVING UART. THE
RECEIVING UART SAMPLES THE DATA LINE AT THE PRE-
CONFIGURED BAUD RATE:
4. THE RECEIVING UART DISCARDS THE START
BIT, PARITY BIT, AND STOP BIT FROM THE DATA
FRAME:
5. The receiving UART
converts the serial data
back into parallel and
transfers it to the data
bus on the receiving end:
• ADVANTAGES
• Only uses two wires
• No clock signal is necessary
• Has a parity bit to allow for error checking
• The structure of the data packet can be changed as long as both sides are set
up for it
• Well documented and widely used method
• DISADVANTAGES
• The size of the data frame is limited to a maximum of 9 bits
• Doesn’t support multiple slave or multiple master systems
• The baud rates of each UART must be within 10% of each other
I2C STANDS FOR
INTER INTEGRATED CIRCUIT-
(IIC)
INTEGRATED CIRCUIT- (IC)
ALSO CALLED CHIP
WHAT ARE THE FEATURES OF I2C?
• It is a synchronous (so CLOCK is required)
• It uses two wires only like UART
• I2C use half duplex communication mode
• It supports Single master and multi slave configuration and multi master and multi slave
configuration
• It supports packetized/frame data transmission
• Speed up to 5 Mbps (100 Kbps to 5 Mpbs)- in four modes of operation.
• Philips Semiconductor (now NXP Semiconductors) invented the protocol in 1982.
• Like UART communication, I2C only uses two wires to transmit data between
devices:
• SDA (Serial Data) – The
line for the master and
slave to send and receive
data.
• SCL (Serial Clock) – The
line that carries the clock
signal.
I2C is a serial communication protocol, so data is transferred bit by bit along a single wire (the
SDA line).
• I2C combines the best features of SPI (synchronous) and
UARTs (packetized data format & only two wires) .
• With I2C, you can connect multiple slaves to a single
master (like SPI) and you can have multiple masters
controlling single, or multiple slaves.
• This is really useful when you want to have more than
one microcontroller (quadcore/octa core processor)
logging data to a single memory card or displaying text
to a single LCD.
• ADVANTAGES
• Only uses two wires
• Supports multiple masters and multiple slaves
• ACK/NACK bit gives confirmation that each frame is transferred successfully
• Hardware is less complicated than with UARTs
• Well known and widely used protocol
• DISADVANTAGES
• Slower data transfer rate than SPI
• The size of the data frame is limited to 8 bits
• More complicated hardware needed to implement than SPI
BASICS OF THE SPI
COMMUNICATION
PROTOCOL
It was developed by Motorola in the mid-1980 for inter-chip
communication.
SPI- SERIAL PERIPHERAL
INTERFACE (SPI)
• It supports serial communication
• Synchronous
• Full duplex
• Its has medium speed of operation
• It is based on Master and slave
• It is a 4 wire bus.
• It is onboard communication protocol/bus -SPI, I2C, and UART are ideal for
communication between microcontrollers and between microcontrollers and sensors
• SPI, I2C, and UART are quite a bit slower than protocols like USB, ethernet,
Bluetooth, and WiFi, but they’re a lot more simple and use less hardware and
system resources
• One unique benefit of SPI is the fact that data can be
transferred without interruption.
• Any number of bits can be sent or received in
a continuous stream. With I2C and UART, data is
sent in packets, limited to a specific number of bits.
• Start and stop conditions of UART /I2C define the
beginning and end of each packet, so the data is
interrupted during transmission.
SERIAL PERIPHERAL INTERFACE (SPI)
• Serial Peripheral Interface (SPI) is an interface bus
commonly used to send data between
microcontrollers and small peripherals such as shift
registers, sensors, and SD cards.
• It uses separate clock and data lines, along with a
select line to choose the device you wish to talk to.
• Devices communicating via SPI /I2C are in a
master-slave relationship.
• The master is the controlling device
(usually a microcontroller),
• while the slave (usually a sensor, display, or
memory chip) takes instruction from the
master.
• The simplest configuration of SPI is a single
master, single slave system, but one master
can control more than one slave (more on
this below).
MOSI (Master Output/Slave Input) – Line for the master to
send data to the slave.
MISO (Master Input/Slave Output) – Line for the slave to
send data to the master.
SCLK (Clock) – Line for the clock signal.
SS/CS (Slave Select/Chip Select) – Line for the master to
select which slave to send data to.
SPI Bus architecture
• SLAVE SELECT
• The master can choose which slave it wants to talk to by setting the slave’s CS/SS line
to a low voltage level. In the idle, non-transmitting state, the slave select line is kept
at a high voltage level. Multiple CS/SS pins may be available on the master, which
allows for multiple slaves to be wired in parallel
• MULTIPLE SLAVES
• SPI can be set up to operate with a single master and a single slave, and it can be set
up with multiple slaves controlled by a single master. There are two ways to connect
multiple slaves to the master.
• MOSI AND MISO
• The master sends data to the slave bit by bit, in serial
through the MOSI line. The slave receives the data sent
from the master at the MOSI pin.
• Data sent from the master to the slave is usually sent
with the most significant bit first.
• The slave can also send data back to the master through
the MISO line in serial. The data sent from the slave back
to the master is usually sent with the least significant
bit first.
• ADVANTAGES
• No start and stop bits, so the data can be streamed continuously without
interruption
• No complicated slave addressing system like I2C
• Higher data transfer rate than I2C (almost twice as fast)
• Separate MISO and MOSI lines, so data can be sent and received at the same
time
• DISADVANTAGES
• Uses four wires (I2C and UARTs use two)
• No acknowledgement that the data has been successfully received (I2C has this)
• No form of error checking like the parity bit in UART
• Only allows for a single master

More Related Content

Similar to UART SPI and I2C serial Interfaces .pptx

serial_busses_i2c.pptx
serial_busses_i2c.pptxserial_busses_i2c.pptx
serial_busses_i2c.pptx
SKUP1
 
communication interfaces-Embedded real time systems
communication interfaces-Embedded real time systemscommunication interfaces-Embedded real time systems
communication interfaces-Embedded real time systems
Raghunath reddy
 
Raspberry Pi - Lecture 3 Embedded Communication Protocols
Raspberry Pi - Lecture 3 Embedded Communication ProtocolsRaspberry Pi - Lecture 3 Embedded Communication Protocols
Raspberry Pi - Lecture 3 Embedded Communication Protocols
Mohamed Abdallah
 
Chapter 3 esy
Chapter 3 esy Chapter 3 esy
Chapter 3 esy
Yogesh Mashalkar
 
I2C And SPI Part-23
I2C And  SPI Part-23I2C And  SPI Part-23
I2C And SPI Part-23
Techvilla
 
UNIT- 3.pptx
UNIT- 3.pptxUNIT- 3.pptx
UNIT- 3.pptx
BASKARS53
 
Switched networks (LAN Switching – Switches)
Switched networks (LAN Switching – Switches)Switched networks (LAN Switching – Switches)
Switched networks (LAN Switching – Switches)
Fleurati
 
UNIT 2.pptx
UNIT 2.pptxUNIT 2.pptx
UNIT 2.pptx
BASKARS53
 
Unit II Study of Onchip Peripherals
Unit II Study of Onchip PeripheralsUnit II Study of Onchip Peripherals
Unit II Study of Onchip Peripherals
Dr. Pankaj Zope
 
Communication Interface of The Embedded Systems
Communication Interface of The Embedded Systems Communication Interface of The Embedded Systems
Communication Interface of The Embedded Systems
VijayKumar5738
 
Networking and internetworking devices
Networking and internetworking devicesNetworking and internetworking devices
Networking and internetworking devices
Raveena kumari
 
Serial Communication in 8051
Serial Communication in 8051Serial Communication in 8051
Serial Communication in 8051
Sudhanshu Janwadkar
 
UNI T 6- SPI_I2C_Lecture8.pptx
UNI                    T 6- SPI_I2C_Lecture8.pptxUNI                    T 6- SPI_I2C_Lecture8.pptx
UNI T 6- SPI_I2C_Lecture8.pptx
naveen088888
 
Serial Peripheral Interface(SPI)
Serial Peripheral Interface(SPI)Serial Peripheral Interface(SPI)
Serial Peripheral Interface(SPI)
Dhaval Kaneria
 
USART
USARTUSART
Network hardware 2
Network hardware 2Network hardware 2
Network hardware 2
Downloadssu Fullmaza
 
Communication protocols
Communication protocolsCommunication protocols
Communication protocols
Pantech ProLabs India Pvt Ltd
 
UART(universal asynchronous receiver transmitter ) PPT
UART(universal asynchronous receiver transmitter ) PPTUART(universal asynchronous receiver transmitter ) PPT
UART(universal asynchronous receiver transmitter ) PPT
Sai_praneeth
 
Lec 5
Lec 5Lec 5
Computer Networks Basics of Network Devices
Computer Networks  Basics of Network DevicesComputer Networks  Basics of Network Devices
Computer Networks Basics of Network Devices
Chandrakant Divate
 

Similar to UART SPI and I2C serial Interfaces .pptx (20)

serial_busses_i2c.pptx
serial_busses_i2c.pptxserial_busses_i2c.pptx
serial_busses_i2c.pptx
 
communication interfaces-Embedded real time systems
communication interfaces-Embedded real time systemscommunication interfaces-Embedded real time systems
communication interfaces-Embedded real time systems
 
Raspberry Pi - Lecture 3 Embedded Communication Protocols
Raspberry Pi - Lecture 3 Embedded Communication ProtocolsRaspberry Pi - Lecture 3 Embedded Communication Protocols
Raspberry Pi - Lecture 3 Embedded Communication Protocols
 
Chapter 3 esy
Chapter 3 esy Chapter 3 esy
Chapter 3 esy
 
I2C And SPI Part-23
I2C And  SPI Part-23I2C And  SPI Part-23
I2C And SPI Part-23
 
UNIT- 3.pptx
UNIT- 3.pptxUNIT- 3.pptx
UNIT- 3.pptx
 
Switched networks (LAN Switching – Switches)
Switched networks (LAN Switching – Switches)Switched networks (LAN Switching – Switches)
Switched networks (LAN Switching – Switches)
 
UNIT 2.pptx
UNIT 2.pptxUNIT 2.pptx
UNIT 2.pptx
 
Unit II Study of Onchip Peripherals
Unit II Study of Onchip PeripheralsUnit II Study of Onchip Peripherals
Unit II Study of Onchip Peripherals
 
Communication Interface of The Embedded Systems
Communication Interface of The Embedded Systems Communication Interface of The Embedded Systems
Communication Interface of The Embedded Systems
 
Networking and internetworking devices
Networking and internetworking devicesNetworking and internetworking devices
Networking and internetworking devices
 
Serial Communication in 8051
Serial Communication in 8051Serial Communication in 8051
Serial Communication in 8051
 
UNI T 6- SPI_I2C_Lecture8.pptx
UNI                    T 6- SPI_I2C_Lecture8.pptxUNI                    T 6- SPI_I2C_Lecture8.pptx
UNI T 6- SPI_I2C_Lecture8.pptx
 
Serial Peripheral Interface(SPI)
Serial Peripheral Interface(SPI)Serial Peripheral Interface(SPI)
Serial Peripheral Interface(SPI)
 
USART
USARTUSART
USART
 
Network hardware 2
Network hardware 2Network hardware 2
Network hardware 2
 
Communication protocols
Communication protocolsCommunication protocols
Communication protocols
 
UART(universal asynchronous receiver transmitter ) PPT
UART(universal asynchronous receiver transmitter ) PPTUART(universal asynchronous receiver transmitter ) PPT
UART(universal asynchronous receiver transmitter ) PPT
 
Lec 5
Lec 5Lec 5
Lec 5
 
Computer Networks Basics of Network Devices
Computer Networks  Basics of Network DevicesComputer Networks  Basics of Network Devices
Computer Networks Basics of Network Devices
 

Recently uploaded

the potential for the development of autonomous aircraft
the potential for the development of autonomous aircraftthe potential for the development of autonomous aircraft
the potential for the development of autonomous aircraft
huseindihon
 
# Smart Parking Management System.pptx using IOT
# Smart Parking Management System.pptx using IOT# Smart Parking Management System.pptx using IOT
# Smart Parking Management System.pptx using IOT
Yesh20
 
Distillation-1.vapour liquid equilibrium
Distillation-1.vapour liquid equilibriumDistillation-1.vapour liquid equilibrium
Distillation-1.vapour liquid equilibrium
RjKing12
 
Presentation slide on DESIGN AND FABRICATION OF MOBILE CONTROLLED DRAINAGE.pptx
Presentation slide on DESIGN AND FABRICATION OF MOBILE CONTROLLED DRAINAGE.pptxPresentation slide on DESIGN AND FABRICATION OF MOBILE CONTROLLED DRAINAGE.pptx
Presentation slide on DESIGN AND FABRICATION OF MOBILE CONTROLLED DRAINAGE.pptx
Er. Kushal Ghimire
 
Santa Barbara City College degree offer diploma Transcript
Santa Barbara City College degree offer diploma TranscriptSanta Barbara City College degree offer diploma Transcript
Santa Barbara City College degree offer diploma Transcript
owbetho
 
Red Hat Enterprise Linux Administration 9.0 RH134 pdf
Red Hat Enterprise Linux Administration 9.0 RH134 pdfRed Hat Enterprise Linux Administration 9.0 RH134 pdf
Red Hat Enterprise Linux Administration 9.0 RH134 pdf
mdfkobir
 
charting the development of the autonomous train
charting the development of the autonomous traincharting the development of the autonomous train
charting the development of the autonomous train
huseindihon
 
readers writers Problem in operating system
readers writers Problem in operating systemreaders writers Problem in operating system
readers writers Problem in operating system
VADAPALLYPRAVEENKUMA1
 
Chartered Cost Engineer ChCE certification.pdf
Chartered Cost Engineer ChCE certification.pdfChartered Cost Engineer ChCE certification.pdf
Chartered Cost Engineer ChCE certification.pdf
GAFM ACADEMY
 
Software Engineering and Project Management - Activity Planning
Software Engineering and Project Management - Activity PlanningSoftware Engineering and Project Management - Activity Planning
Software Engineering and Project Management - Activity Planning
Prakhyath Rai
 
The world of Technology Management MEM 814.pptx
The world of Technology Management MEM 814.pptxThe world of Technology Management MEM 814.pptx
The world of Technology Management MEM 814.pptx
engrasjadshahzad
 
Python programming Introduction about Python
Python programming Introduction about PythonPython programming Introduction about Python
Python programming Introduction about Python
Senthil Vit
 
ISO 9001 - 2015 Quality Management Awareness.pdf
ISO 9001 - 2015 Quality Management Awareness.pdfISO 9001 - 2015 Quality Management Awareness.pdf
ISO 9001 - 2015 Quality Management Awareness.pdf
InfoDqms
 
Girls Call Mysore 000XX00000 Provide Best And Top Girl Service And No1 in City
Girls Call Mysore 000XX00000 Provide Best And Top Girl Service And No1 in CityGirls Call Mysore 000XX00000 Provide Best And Top Girl Service And No1 in City
Girls Call Mysore 000XX00000 Provide Best And Top Girl Service And No1 in City
rawankhanlove256
 
Top EPC companies in India - Best EPC Contractor
Top EPC companies in India - Best EPC  ContractorTop EPC companies in India - Best EPC  Contractor
Top EPC companies in India - Best EPC Contractor
MangeshK6
 
Online airline reservation system project report.pdf
Online airline reservation system project report.pdfOnline airline reservation system project report.pdf
Online airline reservation system project report.pdf
Kamal Acharya
 
EAAP2023 : Durabilité et services écosystémiques de l'élevage ovin de montagne
EAAP2023 : Durabilité et services écosystémiques de l'élevage ovin de montagneEAAP2023 : Durabilité et services écosystémiques de l'élevage ovin de montagne
EAAP2023 : Durabilité et services écosystémiques de l'élevage ovin de montagne
idelewebmestre
 
Buy a fake University of Washington diploma
Buy a fake University of Washington diplomaBuy a fake University of Washington diploma
Buy a fake University of Washington diploma
College diploma
 
API-1150WB-Cooling Towers.pdf with details
API-1150WB-Cooling Towers.pdf with detailsAPI-1150WB-Cooling Towers.pdf with details
API-1150WB-Cooling Towers.pdf with details
MuhammadUsmanAsghar4
 
1. DEE 1203 ELECTRICAL ENGINEERING DRAWING.pdf
1. DEE 1203 ELECTRICAL ENGINEERING DRAWING.pdf1. DEE 1203 ELECTRICAL ENGINEERING DRAWING.pdf
1. DEE 1203 ELECTRICAL ENGINEERING DRAWING.pdf
AsiimweJulius2
 

Recently uploaded (20)

the potential for the development of autonomous aircraft
the potential for the development of autonomous aircraftthe potential for the development of autonomous aircraft
the potential for the development of autonomous aircraft
 
# Smart Parking Management System.pptx using IOT
# Smart Parking Management System.pptx using IOT# Smart Parking Management System.pptx using IOT
# Smart Parking Management System.pptx using IOT
 
Distillation-1.vapour liquid equilibrium
Distillation-1.vapour liquid equilibriumDistillation-1.vapour liquid equilibrium
Distillation-1.vapour liquid equilibrium
 
Presentation slide on DESIGN AND FABRICATION OF MOBILE CONTROLLED DRAINAGE.pptx
Presentation slide on DESIGN AND FABRICATION OF MOBILE CONTROLLED DRAINAGE.pptxPresentation slide on DESIGN AND FABRICATION OF MOBILE CONTROLLED DRAINAGE.pptx
Presentation slide on DESIGN AND FABRICATION OF MOBILE CONTROLLED DRAINAGE.pptx
 
Santa Barbara City College degree offer diploma Transcript
Santa Barbara City College degree offer diploma TranscriptSanta Barbara City College degree offer diploma Transcript
Santa Barbara City College degree offer diploma Transcript
 
Red Hat Enterprise Linux Administration 9.0 RH134 pdf
Red Hat Enterprise Linux Administration 9.0 RH134 pdfRed Hat Enterprise Linux Administration 9.0 RH134 pdf
Red Hat Enterprise Linux Administration 9.0 RH134 pdf
 
charting the development of the autonomous train
charting the development of the autonomous traincharting the development of the autonomous train
charting the development of the autonomous train
 
readers writers Problem in operating system
readers writers Problem in operating systemreaders writers Problem in operating system
readers writers Problem in operating system
 
Chartered Cost Engineer ChCE certification.pdf
Chartered Cost Engineer ChCE certification.pdfChartered Cost Engineer ChCE certification.pdf
Chartered Cost Engineer ChCE certification.pdf
 
Software Engineering and Project Management - Activity Planning
Software Engineering and Project Management - Activity PlanningSoftware Engineering and Project Management - Activity Planning
Software Engineering and Project Management - Activity Planning
 
The world of Technology Management MEM 814.pptx
The world of Technology Management MEM 814.pptxThe world of Technology Management MEM 814.pptx
The world of Technology Management MEM 814.pptx
 
Python programming Introduction about Python
Python programming Introduction about PythonPython programming Introduction about Python
Python programming Introduction about Python
 
ISO 9001 - 2015 Quality Management Awareness.pdf
ISO 9001 - 2015 Quality Management Awareness.pdfISO 9001 - 2015 Quality Management Awareness.pdf
ISO 9001 - 2015 Quality Management Awareness.pdf
 
Girls Call Mysore 000XX00000 Provide Best And Top Girl Service And No1 in City
Girls Call Mysore 000XX00000 Provide Best And Top Girl Service And No1 in CityGirls Call Mysore 000XX00000 Provide Best And Top Girl Service And No1 in City
Girls Call Mysore 000XX00000 Provide Best And Top Girl Service And No1 in City
 
Top EPC companies in India - Best EPC Contractor
Top EPC companies in India - Best EPC  ContractorTop EPC companies in India - Best EPC  Contractor
Top EPC companies in India - Best EPC Contractor
 
Online airline reservation system project report.pdf
Online airline reservation system project report.pdfOnline airline reservation system project report.pdf
Online airline reservation system project report.pdf
 
EAAP2023 : Durabilité et services écosystémiques de l'élevage ovin de montagne
EAAP2023 : Durabilité et services écosystémiques de l'élevage ovin de montagneEAAP2023 : Durabilité et services écosystémiques de l'élevage ovin de montagne
EAAP2023 : Durabilité et services écosystémiques de l'élevage ovin de montagne
 
Buy a fake University of Washington diploma
Buy a fake University of Washington diplomaBuy a fake University of Washington diploma
Buy a fake University of Washington diploma
 
API-1150WB-Cooling Towers.pdf with details
API-1150WB-Cooling Towers.pdf with detailsAPI-1150WB-Cooling Towers.pdf with details
API-1150WB-Cooling Towers.pdf with details
 
1. DEE 1203 ELECTRICAL ENGINEERING DRAWING.pdf
1. DEE 1203 ELECTRICAL ENGINEERING DRAWING.pdf1. DEE 1203 ELECTRICAL ENGINEERING DRAWING.pdf
1. DEE 1203 ELECTRICAL ENGINEERING DRAWING.pdf
 

UART SPI and I2C serial Interfaces .pptx

  • 1. BASICS OF THE UART COMMUNICATION PROTOCOL UART was developed by Gordon Bell at Digital Equipment Corporation (DEC) in the 1960's.
  • 2. WHAT ARE UART FEATURES • It is Asynchronous (means no clock) where as SPI and I2C synchronous • It converts parallel data to serial and serial data to parallel data • It transmit data using packet format • It support serial communication • It does not support multi master and multi slave configuration • So only one master and one slave. • It supports full duplex • Data speed measured in-terms of baud rate. • The “Universal” portion is with regards to fact that the format of the data and the speed of the transmission are configurable.
  • 3. WHAT IS UART • A UART (Universal Asynchronous Receiver/Transmitter) is the microchip with programming that controls a computer's interface to its attached serial devices. • Embedded systems, microcontrollers, and computers mostly use UART as a form of device-to-device hardware communication protocol. • Among the available communication protocols, UART uses only two wires for its transmitting and receiving ends.
  • 4. WHY IS UART CALLED UNIVERSAL?
  • 5. WHAT ARE UART FEATURES • It has only two wires • It supports full duplex communication Transceiver Transceiver Transmitter side Receiver side Transceiver means = Transmitter + Receiver in one device.
  • 6. Data Forwarding from Laptop to Raspberry using UART- But it needs USB to Serial data converter.
  • 7. WHAT IS ASYNCHRONOUS AND SYNCHRONOUS ? • It is Asynchronous (means no clock) so data can transmit using packet format. • What is the advantage of asynchronous mode of transmission ? • It supports multi subscriber configuration in network to forward their messages/ data. • Where as in synchronous only one subscriber/one letter/ one word/ can send (data) along with clock ( using clock) . Clock used for synchronous.
  • 8. WHAT IS THE DRAWBACK OF ASYNCHRONOUS ? • In asynchronous mode of communication- there is no guarantee of delivery of messages. So reliability is less. • But in synchronous 100 % delivery of guarantee. Because the second data will not be delivered until the first data is completely delivered.
  • 9. •HOW UART WORKS •Converts the bytes it receives from the computer along parallel circuits into a single serial bit stream for outbound transmission. •On inbound transmission, converts the serial bit stream into the bytes that the computer handles •Adds a parity bit (if it's been selected) on outbound transmissions and checks the parity of incoming bytes (if selected) and discards the parity bit. •Adds start and stop delineators on outbound and strips them from inbound transmissions •Handles interrupt s from the keyboard and mouse (which are serial devices with special port s) •May handle other kinds of interrupt and device management that require coordinating the computer's speed of operation with device speeds
  • 11. STEPS OF UART TRANSMISSION 1. The transmitting UART receives data in parallel from the data bus:
  • 12. 2. THE TRANSMITTING UART ADDS THE START BIT, PARITY BIT, AND THE STOP BIT(S) TO THE DATA FRAME:
  • 13. 3. THE ENTIRE PACKET IS SENT SERIALLY FROM THE TRANSMITTING UART TO THE RECEIVING UART. THE RECEIVING UART SAMPLES THE DATA LINE AT THE PRE- CONFIGURED BAUD RATE:
  • 14. 4. THE RECEIVING UART DISCARDS THE START BIT, PARITY BIT, AND STOP BIT FROM THE DATA FRAME: 5. The receiving UART converts the serial data back into parallel and transfers it to the data bus on the receiving end:
  • 15. • ADVANTAGES • Only uses two wires • No clock signal is necessary • Has a parity bit to allow for error checking • The structure of the data packet can be changed as long as both sides are set up for it • Well documented and widely used method • DISADVANTAGES • The size of the data frame is limited to a maximum of 9 bits • Doesn’t support multiple slave or multiple master systems • The baud rates of each UART must be within 10% of each other
  • 16. I2C STANDS FOR INTER INTEGRATED CIRCUIT- (IIC) INTEGRATED CIRCUIT- (IC) ALSO CALLED CHIP
  • 17. WHAT ARE THE FEATURES OF I2C? • It is a synchronous (so CLOCK is required) • It uses two wires only like UART • I2C use half duplex communication mode • It supports Single master and multi slave configuration and multi master and multi slave configuration • It supports packetized/frame data transmission • Speed up to 5 Mbps (100 Kbps to 5 Mpbs)- in four modes of operation. • Philips Semiconductor (now NXP Semiconductors) invented the protocol in 1982.
  • 18. • Like UART communication, I2C only uses two wires to transmit data between devices: • SDA (Serial Data) – The line for the master and slave to send and receive data. • SCL (Serial Clock) – The line that carries the clock signal. I2C is a serial communication protocol, so data is transferred bit by bit along a single wire (the SDA line).
  • 19. • I2C combines the best features of SPI (synchronous) and UARTs (packetized data format & only two wires) . • With I2C, you can connect multiple slaves to a single master (like SPI) and you can have multiple masters controlling single, or multiple slaves. • This is really useful when you want to have more than one microcontroller (quadcore/octa core processor) logging data to a single memory card or displaying text to a single LCD.
  • 20. • ADVANTAGES • Only uses two wires • Supports multiple masters and multiple slaves • ACK/NACK bit gives confirmation that each frame is transferred successfully • Hardware is less complicated than with UARTs • Well known and widely used protocol • DISADVANTAGES • Slower data transfer rate than SPI • The size of the data frame is limited to 8 bits • More complicated hardware needed to implement than SPI
  • 21. BASICS OF THE SPI COMMUNICATION PROTOCOL It was developed by Motorola in the mid-1980 for inter-chip communication.
  • 22. SPI- SERIAL PERIPHERAL INTERFACE (SPI) • It supports serial communication • Synchronous • Full duplex • Its has medium speed of operation • It is based on Master and slave • It is a 4 wire bus. • It is onboard communication protocol/bus -SPI, I2C, and UART are ideal for communication between microcontrollers and between microcontrollers and sensors • SPI, I2C, and UART are quite a bit slower than protocols like USB, ethernet, Bluetooth, and WiFi, but they’re a lot more simple and use less hardware and system resources
  • 23. • One unique benefit of SPI is the fact that data can be transferred without interruption. • Any number of bits can be sent or received in a continuous stream. With I2C and UART, data is sent in packets, limited to a specific number of bits. • Start and stop conditions of UART /I2C define the beginning and end of each packet, so the data is interrupted during transmission.
  • 24. SERIAL PERIPHERAL INTERFACE (SPI) • Serial Peripheral Interface (SPI) is an interface bus commonly used to send data between microcontrollers and small peripherals such as shift registers, sensors, and SD cards. • It uses separate clock and data lines, along with a select line to choose the device you wish to talk to.
  • 25. • Devices communicating via SPI /I2C are in a master-slave relationship. • The master is the controlling device (usually a microcontroller), • while the slave (usually a sensor, display, or memory chip) takes instruction from the master. • The simplest configuration of SPI is a single master, single slave system, but one master can control more than one slave (more on this below).
  • 26. MOSI (Master Output/Slave Input) – Line for the master to send data to the slave. MISO (Master Input/Slave Output) – Line for the slave to send data to the master. SCLK (Clock) – Line for the clock signal. SS/CS (Slave Select/Chip Select) – Line for the master to select which slave to send data to. SPI Bus architecture
  • 27. • SLAVE SELECT • The master can choose which slave it wants to talk to by setting the slave’s CS/SS line to a low voltage level. In the idle, non-transmitting state, the slave select line is kept at a high voltage level. Multiple CS/SS pins may be available on the master, which allows for multiple slaves to be wired in parallel • MULTIPLE SLAVES • SPI can be set up to operate with a single master and a single slave, and it can be set up with multiple slaves controlled by a single master. There are two ways to connect multiple slaves to the master.
  • 28. • MOSI AND MISO • The master sends data to the slave bit by bit, in serial through the MOSI line. The slave receives the data sent from the master at the MOSI pin. • Data sent from the master to the slave is usually sent with the most significant bit first. • The slave can also send data back to the master through the MISO line in serial. The data sent from the slave back to the master is usually sent with the least significant bit first.
  • 29. • ADVANTAGES • No start and stop bits, so the data can be streamed continuously without interruption • No complicated slave addressing system like I2C • Higher data transfer rate than I2C (almost twice as fast) • Separate MISO and MOSI lines, so data can be sent and received at the same time • DISADVANTAGES • Uses four wires (I2C and UARTs use two) • No acknowledgement that the data has been successfully received (I2C has this) • No form of error checking like the parity bit in UART • Only allows for a single master