Вы находитесь на странице: 1из 9

Protocols:

All communications between devices require that the devices agree on the format of the data. The set
of rules defining a format is called a protocol.
A communications protocol must define the following:
1. rate of transmission (in baud or bps)
2. whether transmission is to be synchronous or asynchronous
3. whether data is to be transmitted in half-duplex or full-duplex mode
Synchronous transmissions are synchronized by an external clock (always work in Master slave
relationships) while asynchronous transmissions are synchronized by special signals along
the transmission medium/line.

half-duplex
Refers to the transmission of data in just one direction at a time. For example, a walkie-talkie is a halfduplex device because only one party can talk at a time.
full-duplex
Refers to the transmission of data in two directions simultaneously. For example, a telephone is a fullduplex device because both parties can talk at once.
SERIES vs PARALLEL:
The bits of data can be transmitted either in parallel or serial form. In parallel communication, the bits
of data are sent all at the same time, each through a separate wire. The following diagram shows the
parallel transmission of the letter C in binary (01000011):

In serial communication, the bits are sent one by one through a single wire. The following diagram
shows the serial transmission of the letter C in binary (01000011):

SPI, I2C, and UART are ideal for communication between microcontrollers and between
microcontrollers and sensors where large amounts of high speed data dont need to be
transferred.

SPI: (Motorolla) (Full Duplex - Synchronous Serial

Protocol)
The Serial Peripheral Interface (SPI) bus is a synchronous serial communication interface
Four signal lines: MISO, MOSI, SCLK, SS/CS

Devices communicating via SPI 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.

Advantages:
No start and stop bits, so the data can be streamed continuously without
interruption
o
No complicated slave addressing system like I2C
o
Higher data transfer rate than I2C (almost twice as fast)
o
Separate MISO and MOSI lines, so data can be sent and received at the same
o

time.

(Full Duplex)

Disadvantages:
o
o
o
o

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

IIC: (Phillips) (Half Duplex - Synchronous Serial


Protocol)
IC is a multi-master protocol that uses 2 signal lines. Serial data (SDA) and serial clock
(SCL).
o
There is no need of chip select (slave select) or arbitration logic.
o
Virtually any number of slaves and any number of masters can be connected onto these 2
signal lines and communicate between each other using a protocol that defines:
o 7-bits slave addresses: each device connected to the bus has got such a unique address;
o data divided into 8-bit bytes
o A few control bits for controlling the communication start, end, direction and for an
acknowledgment mechanism.(after every byte of data received/transmitted)
o

The data rate has to be chosen between 100 kbps, 400 kbps and 3.4 Mbps, respectively called
standard mode, fast mode and high speed mode

UART: (Full Duplex - Asynchronous Serial Protocol)


o

Uses two signal lines. (Tx and Rx)

In UART communication, two UARTs communicate directly with each other. The transmitting

UART converts parallel data from a controlling device like a CPU into serial form, transmits it in
serial to the receiving UART, which then converts the serial data back into parallel data for the
receiving device.

Advantages
o
o
o
o

Only uses two wires


No clock signal is necessary
Has a parity bit to allow for error checking
Well documented and widely used method

Disadvantages
o
o
o

The size of the data frame is limited to a maximum of 9 bits


Only allows for a single master
The baud rates of each UART must be within 10% of each other

CAN :

( Controller Area Network)

(Full Duplex Two wire- Asynchronous Serial Protocol)


Controller Area Network or CAN protocol is a method of communication between various
electronic devices embedded in an automobile. Like like engine management systems, active
suspension, ABS, gear control, lighting control, air conditioning, airbags, central locking etc.
An idea initiated by Robert Bosch GmbH in 1983 to improve the quality of automobiles thereby
making them more reliable, safe and fuel efficient.
CAN supports multi domain communications. Domain is a group of electronic devices that have
almost similar requirements to work in the system.
Enables different Electronics to do R-T communication by exchanging information with each other
over a common serial bus.
Data messages transmitted from any node on a CAN bus do not contain addresses of either the
transmitting node, or of any intended receiving node.

LIN: (Local Interconnected Network)

(Half Duplex Two wire- Asynchronous Serial Protocol)


LIN is used for communication between components in vehicles. The need for a cheap serial
network arose as the technologies and the facilities implemented in the car grew, while the CAN
bus was too expensive to implement for every component in the car.
Transmitted data within the LIN is transmitted serially as eight bit data bytes with one start & stop-bit
and no parity.
LIN is a single master multiple slave system. The "bus" is a single wire with reference to ground.

CAN is suitable and cost effective for communication b/w high speed electronics devices in vehicles.
It is not cost effective for low performance devices like power window and seat controllers
The protocols main features are listed below:

Single master, up to 16 slaves (i.e. no bus arbitration)

USB: Universal Serial Bus


SATA: Serial Advance Technology Attachment use to connect hard drive to PC. Is faster than PATA
( parallel Advance Technology Attachment) also called IDE (Integrated Development Environment)

Вам также может понравиться