Академический Документы
Профессиональный Документы
Культура Документы
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.
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
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
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
Disadvantages
o
o
o
CAN :
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: