Communication Protocols Shell -Final
Communication Protocols Shell -Final
protocols
Day 4
CONTENTS OF THIS
TEMPLATE
Font used is Monteserrat of all sizes and weights
Fonts Click here to download
If not available, use Poppins
#2d317c (blue)
#344382 (blue)
#3c5688 (blue shade)
Colors #43688e (blue shade)
#4b7a93 (blue shade)
White , grey
TABLE OF CONTENTS
01 02 03
Into UART SPI
04 05 06
I2C CAN Practical
01
Introduction to
communication
protocols
What is a communication system?
● Definition: A communication system is a framework that allows the exchange of data
between two or more devices. It consists of hardware and software components that ensure
efficient data transfer.
Feature v
Serial communication Parallel communication
Data Transfer Bit by bit (1 wire) Multiple bits at once (many wires)
Wiring Complexity Simple (fewer wires) Complex (many wires) which could
lead to crosstalk and data skew
In simplex operation, a network cable or communications channel can only send information
in one direction; it's a “one-way street”. A good example would be your keyboard to your
CPU. The CPU never needs to send characters to the keyboard but the keyboard always
sends characters to the CPU. In many cases, Computers almost always send characters to
printers, but printers usually never send characters to computers (there are exceptions,
some printers do talk back). Simplex requires only one lane (in the case of serial).
Classifications of communication
system
Technologies that employ half-duplex operation are capable of sending information in both
directions between two nodes, but only one direction or the other can be utilized at a time.
This is a fairly common mode of operation when there is only a single network medium
(cable, radio frequency and so forth) between devices. The only advantage that Half-Duplex
would have is the single lane or single track is cheaper than the double lane or double track.
Classifications of communication
system
In this type of communication there is a master node that can send data to any other nodes
(Slaves). The master is the only node that can initiate the communication, the slave can
never initiate the communication. The slave can send data to master only when the master
permit the slave to send. The Master / Slave network can be divided to: Single Master Single
Slave (SMSS) Single Master Multi Slave (SMMS) Multi Master Multi Slave (MMMS)
Classifications of communication
system
Synchronous vs Asynchronous Communication
● Synchronous Communication : (e.g., SPI,I2C).
Data is transmitted with the help of a shared clock between sender and receiver.
Each data frame has start and stop bits to indicate the beginning and end.
● Bit rate
Bit rate refers to Number of data bits transferred per second. Unit of Bit rate is bits per
second(bps). For example bit rate is 10kbps means 10,000 bits are transferred within one
second.
● Baud rate
Baud rate refers to number of signal or voltage level changes per second. Unit of baud rate
is bauds per second. For example baud rate is 9600 means 9600 signal level changes are
happening within a second.
02
UART
Communication
Protocol
What is UART?
UART stands for Universal Asynchronous Receiver Transmitter .There is one
wire for transmitting data , and one wire to receive data , a common
parameter is the baud rate known as “bps” whish stands for bits per
second . If a transmitter is configured with 9600bps , then the receiver must
be listening on the other end at the same speed.
UART Frame
UART Frame
•Start bit: 1 bit indicates the start of a new frame, always
logic low.
•Data: 5 to 9 bits of sent data.
•Parity bit: 1 bit for error checking
•Even parity: Clear parity bit if number of 1s sent is even.
•Odd parity: Clear parity bit if number of 1s sent is odd.
03
SPI
Communication
Protocol
What is SPI?
Serial Peripheral Interface (SPI) bus is a synchronous
serial communication interface specifications used for
short distance communication.
2. The master switches the SS/CS pin to a low voltage state, which
activates the slave:
Data Transmitter steps
3. The master sends the data one bit at a time to the slave along the
MOSI line. The slave reads the bits as they are received: