You are on page 1of 11

Embedded Device-UART

SPI
12C
Presented By:
Fatima Insia Ali (19-CS-01)
Muhammad Aitesam Hassan (19-CS-11)
Aqif Akhtar (19-CS-30)
 An embedded device UART (Universal Asynchronous
Receiver/Transmitter) is a communication interface that
allows an embedded device (such as a microcontroller or
sensor) to exchange data with other devices or systems over
a serial interface.
 In IoT applications, an embedded device with a UART
Embedded interface can be connected to other devices such as sensors,
Device-UART actuators, or other microcontrollers, as well as to higher-
level systems such as a gateway or cloud server.
 The UART interface allows for the exchange of data between
these devices, which can then be used for monitoring,
control, or data analysis purposes.
 UART is a widely used communication protocol for embedded
UART devices due to its simplicity and low overhead.
(Universal  The UART interface allows for the exchange of data between
Asynchronou devices over a serial interface, using a simple and efficient
communication protocol.
s  The UART protocol is asynchronous, meaning that the timing
Receiver/Tran of the data transmission is not dependent on a clock signal.
Instead, each byte of data is sent with a start bit, followed by
smitter) the data bits, and ending with a stop bit.
 The UART interface typically consists of two lines: TX
(transmit) and RX (receive), which are used to send and
receive data between the devices.
Cont’d  In addition to these lines, there may be additional control
lines such as RTS (request to send) and CTS (clear to send),
which are used to control the flow of data between the
devices.
 SPI (Serial Peripheral Interface) is a communication protocol
commonly used in IoT devices to transfer data between
microcontrollers, sensors, and other peripherals.
 SPI is a full-duplex synchronous protocol, which means that
SPI (Serial data can be transferred in both directions at the same time
Peripheral and the timing of the communication is controlled by a clock
signal.
Interface)  The protocol uses a master-slave architecture, where the
master device initiates the communication and controls the
timing of the data exchange.
 In IoT applications, SPI is often used to connect sensors or
other peripheral devices to a microcontroller or other
processing unit.
 For example, an IoT device might use SPI to interface with a
temperature sensor or an accelerometer.
Cont’d  SPI is a popular choice for IoT applications due to its simple
hardware requirements, high data rates, and low overhead.
 One advantage of the SPI protocol is its high-speed data
transfer capability, which can reach rates of several megabits
per second.
 The SPI protocol uses a four-wire interface consisting of:
1. SCLK (Serial Clock) - the clock signal that synchronizes the
data transfer between the master and slave devices.
2. MOSI (Master Out Slave In) - the data line on which the
Cont’d master sends data to the slave.
3. MISO (Master In Slave Out) - the data line on which the
slave sends data to the master.
4. SS (Slave Select) - a signal used by the master to select the
slave device with which it wishes to communicate.
 I2C (Inter-Integrated Circuit) is a communication protocol
commonly used in IoT devices to transfer data between
microcontrollers, sensors, and other peripherals.
 I2C is a synchronous protocol, which means that data is
I2C (Inter- transferred between devices based on a clock signal.
 The protocol uses a master-slave architecture, where the
Integrated master device initiates the communication and controls the
Circuit) timing of the data exchange.
 In IoT applications, I2C is often used to connect sensors or
other peripheral devices to a microcontroller or other
processing unit. For example, an IoT device might use I2C to
interface with a humidity sensor or a display module.
 The I2C protocol uses a two-wire interface consisting of:
1. SCL (Serial Clock) - the clock signal that synchronizes the
Cont’d data transfer between the master and slave devices.
2. SDA (Serial Data) - the data line on which the master and
slave devices exchange data.
  I2C is half duplex communication and SPI is full duplex
communication.
 I2C supports multi master and multi slave and SPI supports
Difference single master.

between I2C &  I2C is a two wire protocol and SPI is a four wire protocol.
 I2C supports clock stretching and SPI does not have clock
SPI stretching.
 I2C is slower than SPI.
 I2C has an acknowledgment bit after every byte of transfer.
THANK YOU!

You might also like