You are on page 1of 13

Chapter-3 Communication Standards & Protocols

Synchronous and Asynchronous Communication

Sr.No. Synchronous communication Asynchronous communication


1. Single clock is used for both transmitter and Two different clocks are used for both
receiver . transmitter and receiver
2. Data bits are transmitted with sync character No sync character is required
3. Start and stop bits are not used Start and stop bits are used
4. Used for data transfer rate >= 20 Kbps Used for data transfer rate <= 20 Kbps
5. Used for transferring block of data at a time Used to transfer one character at a time
6. Character is received at a constant rate Character is received at a any rate
7. Less reliable More reliable

Serial and Parallel Communication

RS232 standard based communication

RS232 monitoring hardware establishes a connection between data terminal equipment (DTE) and
data communication equipment (DCE).

In order to link these devices, an RS232 D9 pinout is essential, as this pinout will allow you to
connect two devices successfully.

An RS232 pinout 9 pin cable features nine pins:


Pin 1 - Data carrier detect (DCD): The DCE tells the DTE it is receiving a valid input signal.
Pin 2 - Received data (RD): This is the actual signal received from the DTE.
Pin 3 -Transmit data (TD): This is the transmitted signal from the DTE.
Pin 4 -Data terminal ready (DTR): This line is from the DTE to the DCE indicating readiness to send or
receive data.
Pin 5 -Signal ground: This is the common ground connection for all signals.
Pin 6 -Data set ready (DSR): The DCE tells the DTE it is connected and ready to receive.
Pin 7 -Request to send (RTS): This signal from the DTE tells the DCE it is ready to transmit
Pin 8 -Clear to send (CTS): This line from the DCE tells the DTE it is ready to receive data.
Pin 9 -Ring indicator (RI): This line was used in older modem connections but isn’t used anymore.

OR

Need of RS232:

 RS-232 is a standard by which two serial devices communicate (recommended standard).


 The RS-232 interface is the Electronic Industries Association (EIA) standard for the
interchange of serial binary data between two devices.
 It was initially developed by the EIA to standardize the connection of computers with
telephone line modems.
 The connection must not be longer than 50 feet. (15 m)
 The standard defined voltage levels made it immune to noise disturbances and reduced the
error in data exchange.
 The maximum slew rate in RS232 is limited to 30V/µs. Also, a maximum bit rate of 20 Kbps is
also defined. These limitations of the standard help in reducing the cross – talk with adjacent
signals.
MAX 232: The MAX232 is a hardware layer protocol converter IC manufactured by the Maxim
Corporation. Commonly known as a RS-232 Transceiver, it consists of a pair of drivers and a pair of
receivers. The drivers convert between TTL and CMOS voltage levels (TIA/EIA-232-E), which is
required for serial port communications. Utilised in embedded microcontroller systems, and
computers, this IC has been one of the most popular components in production for many years. If
you have a microcontroller circuit that requires communication through a serial port, then this is the
IC to use. It is very versatile, and one of those wonderful components that solve so many signal
conversion problems.

Need of MAX 232:

 A line driver such as the MAX232 chip is required to convert RS232 voltage levels to TTL
levels, and vice versa.
 8051 has two pins that are used specifically for transferring and receiving data serially.
 These two pins are called TxD and RxD and are part of the port 3 group (P3.0 and P3.1).
 These pins are TTL compatible; therefore, they require a line driver to make them RS232
compatible.
 We need a line driver (voltage converter) to convert the R232’s signals to TTL voltage levels
that will be acceptable to 8051’s TxD and RxD pins.
Serial Communication Protocol:-

Controlled Area Network [CAN]:- Can is mainly used in automotive electronics. CAN bus is a
standard bus in distributed network. It has a bi-directional serial line which receives or sends a bit at
an instance by operating at maximum rate of 1Mbps. It employs a twisted pair connection to each
node. The pair can run to a maximum length of 40m.

 CAN Frame -- an entire CAN transmission: arbitration ID, data bytes, acknowledge bit, and so
on. Frames also are referred to as messages. .
 SOF (start-of-frame) bit – indicates the beginning of a message with a dominant (logic 0) bit.
 Arbitration ID – identifies the message and indicates the message's priority. Frames come in
two formats -- standard, which uses an 11-bit arbitration ID, and extended, which uses a 29-
bit arbitration ID.
 IDE (identifier extension) bit – allows differentiation between standard and extended
frames.
 RTR (remote transmission request) bit – serves to differentiate a remote frame from a data
frame. A dominant (logic 0) RTR bit indicates a data frame. A recessive (logic 1) RTR bit
indicates a remote frame.
 DLC (data length code) –
– contains 0 to 8 bytes of data.
 CRC (cyclic redundancy check) – contains 15-bit cyclic redundancy check code and a
recessive delimiter bit. The CRC field is used for error detection.
 ACK (Acknowledgement) slot – any CAN controller that correctly receives the message
sends an ACK bit at the end of the message. The transmitting node checks for the presence
of the ACK bit on the bus and reattempts transmission if no acknowledge is detected.
National Instruments Series 2 CAN interfaces have the capability of listen-only mode. Herein,
the transmission of an ACK bit by the monitoring hardware is suppressed to prevent it from
affecting the behavior of the bus.
 CAN Signal – an individual piece of data contained within the CAN frame data field. You also
can refer to CAN signals as channels. Because the data field can contain up to 8 bytes of
data, a single CAN frame can contain 0 to 64 individual signals (for 64 channels, they would
all be binary)
 (EOF) END OF FRAME– Each DATA FRAME and REMOTE FRAME is delimited by a flag
sequence consisting of ’recessive’ bits

Applications: Copiers, Telescopes, Medical instruments, Elevator controllers, Automobile industry.


I2C protocols:-

I²C (Inter – Integrated Communication)Bus: In any process plant there are n numbers of device
circuits that are used for measurement of temperature, pressure and it is required to connect these
ICs through a common bus. For this I²C has become a standard.

There are three standards:

 Industrial 100 kbps I²C.


 100 kbps SM I²C.
 400 kbps I²C.

The I²C bus has two lines that carry its signals. One line is for the clock and another is for the bi-
directional data. Serial data line [SDA] and Serial Clock [SCL]. The voltages used are +5 V and +3.3 V.
There is a protocol for the I²C bus.

The format of bits at the I²C bus is as shown:


 I²C Bus reference design has 7 bit address space with 16 reserved addresses, so a maximum
112 nodes can communicate on the same bus.
 Each device has an unique address using which the data transfer is carried out.
 The master can address have 127 slaves at an instance.
 It has a processing element functioning as a bus controller or a microcontroller with I²C bus
interface circuit. So each slave must have an I²C bus controller and processing element.
 A number of masters can also connect to bus but there can be only one master which can
initiate data transfer on SDA line and which can transmit the SCL pulses. Common I²C Bus
speeds are 100 Kbps standard mode and 10 Kbps low speed mode.

Advantages:

1. Multiple slave devices can be accessed with only 2 wires.

2. Low cost to implement.

3. Implemented in hardware and software.

4. Ease to implement.

5. Supports multi-master configuration.

Dis-Advantages:

1. Short distance.

2. Slow speed.

3. Limited device addresses.

Applications of I²C Bus: I²C Bus is used for peripherals where simplicity and low manufacturing cost
are more important than speed.

1. Supporting systems management for PCI cards.

2. Accessing NVRAM chips that keep user settings.

3. Accessing low speed DAC‟s and ADC‟s.

4. Changing constrast, hue and colour balance settings in monitors.

5. Changing sound volume in intelligent speakers. Controlling OLED/OLCD displays in cell phones
Comparision between CAN and I2C protocols on the basis of following points:

USB protocol:-

Universal Serial Bus protocol:- Any computer that you buy today comes with one or more Universal
Serial Bus connectors. These USB connectors let you attach mice, printers and other accessories to
your computer quickly and easily.
The operating system supports USB as well, so the installation of the device drivers is quick and easy,
too. Compared to other ways of connecting devices to your computer (including parallel ports, serial
ports and special cards that you install inside the computer's case), USB devices are incredibly
simple.
 The USB is based on a so-called tiered star topology in which there is a single host and up to
127 slave devices.
 The host controller is connected to a hub within the PC which allows a number of
attachment points (ports).
 A further hub can be plugged into each of these attachments and so on. However, there are
limitations on this expansion.
 A maximum of 127 devices may be connected. This is because the address field in a packet is
7 bits long and the address 0 cannot be used as it has special significance.
 A device can be plugged into a hub and that hub can be plugged into another hub and so on.
However, the maximum number of tieres permitted is six.
 The length of any cable is limited to 5 meters. So, USB is intended as a bus for devices near
to PC. For applications requiring distance from the PC, another form of connection is needed
such as Ethernet.
 Host is the master. So, all communications are initiated by the host. There can be no
communication directly between USB devices.
Features of USB:-

The Universal Serial Bus has the following features:

 The computer acts as the host.


 Up to 127 devices can connect to the host, either directly or by way of USB hubs.
 Individual USB cables can run as long as 5 meters; with hubs, devices can be up to 30 meters
(six cables' worth) away from the host.
 With USB 2.0,the bus has a maximum data rate of 480 megabits per second (10 times the
speed of USB 1.0).
 A USB 2.0 cable has two wires for power (+5 volts and ground) and a twisted pair of wires to
carry the data. The USB 3.0 standard adds four more wires for data transmission. While USB
2.0 can only send data in one direction at a time (downstream or upstream), USB 3.0 can
transmit data in both directions simultaneously.
 On the power wires, the computer can supply up to 500 milliamps of power at 5 volts. A USB
3.0 cable can supply up to 900 milliamps of power.
 Low-power devices (such as mice) can draw their power directly from the bus. Highpower
devices (such as printers) have their own power supplies and draw minimal power from the
bus. Hubs can have their own power supplies to provide power to devices connected to the
hub.
 USB devices are hot-swappable, meaning you can plug them into the bus and unplug them
any time. A USB 3.0 cable is compatible with USB 2.0 ports -- you won't get the same data
transfer speed as with a USB 3.0 port but data and power will still transfer through the cable.
 Many USB devices can be put to sleep by the host computer when the computer enters a
power-saving mode.
SSP: Synchronous serial Protocol

SPI: Serial Peripheral Interface


Serial Peripheral Interface or SPI is a synchronous serial communication protocol that provides full –
duplex communication at very high speeds. Serial Peripheral Interface (SPI) is a master – slave type
protocol that provides a simple and low cost interface between a microcontroller and its peripherals.
For short distance communication, Synchronous Serial Communication would be a better choice and
in that Serial Peripheral Interface or SPI in particular is the best choice. When we say short distance
communication, it often means communication with in a device or between the devices on the same
board (PCB).
SPI is a Synchronous type serial communication i.e. it uses a dedicated clock signal to synchronise
the transmitter and receiver or Master and Slave, speaking in SPI terms. The transmitter and receiver
are connected with separate data and clock lines and the clock signal will help the receiver when to
look for data on the bus.
SPI or Serial Peripheral Interface was developed by Motorola in the 1980’s as a standard, low – cost
and reliable interface between the Microcontroller (microcontrollers by Motorola in the beginning)
and its peripheral ICs.

In SPI protocol, the devices are connected in a Master – Slave relationship in a multi – point
interface. In this type of interface, one device is considered the Master of the bus (usually a
Microcontroller) and all the other devices (peripheral ICs or even other Microcontrollers) are
considered as slaves.

The SPI bus consists of 4 signals or pins. They are

 Master – Out / Slave – In (MOSI)


 Master – In / Slave – Out (MISO)
 Serial Clock (SCLK) and
 Chip Select (CS) or Slave Select (SS)

Master – Out / Slave – In or MOSI, as the name suggests, is the data generated by the Master
and received by the Slave. Hence, MOSI pins on both the master and slave are connected
together.
MISO – MISO pins on both the master and slave are ties together. Even though the Signal in
MISO is produced by the Slave, the line is controlled by the Master.
SCK – The Master generates a clock signal at SCK and is supplied to the clock input of the slave.
(CS) or (SS) – Chip Select (CS) or Slave Select (SS) is used to select a particular slave by the
master.
Applications of SPI

 Memory: SD Card , MMC , EEPROM , Flash


 Sensors: Temperature and Pressure
 Control Devices: ADC , DAC , digital POTS and Audio Codec.
 Others: Camera Lens Mount, touchscreen, LCD, RTC, video game controller, etc.

Advantages

 SPI is very simple to implement and the hardware requirements are not that complex.
 Supports full – duplex communication at all times.
 Very high speed of data transfer.
 No need for individual addresses for slaves as CS or SS is used.
 Only one master device is supported and hence there is no chance of conflicts.
 Clock from the master is configured based on speed of the slave and hence slave doesn’t have
to worry about clock.
Disadvantages

 Each additional slave requires an additional dedicated pin on master for CS or SS.
 There is no acknowledgement mechanism and hence there is no confirmation of receipt of
data.
 Slowest device determines the speed of transfer.
 There are no official standards and hence often used in application specific implementations.
 There is no flow control.

Features of Bluetooth Technology:

The Bluetooth Technology has the following features:

 Short range Radio Frequency at 2.4 GHz


 Point-to-point or point-to-multiple points
 Voice and Data
 Transmit through walls up to 10m
 Supports both synchronous and asynchronous services.
 Bluetooth is IEEE 802.15.1 protocol.
 Bluetooth 1.x supports data rate up to 1Mbps.
 Bluetooth 2.0 enhanced maximum data rate of 3Mbps over 100m.

Features of Zigbee:

The Zigbee has the following features:

 IEEE Standard 802.15.4


 Frequency (GHz) 0.868, 0.915, 2.4
 Maximum bit rate (Mbps) 0.250 or 250 Kbps, low bit rate
 Typical data throughput (Mbps) 0.2
 Maximum (Outdoor) Range (Meters) 10-100
 Relative Power Consumption Very low
 Battery Life Months to years
 Network Size 64,000+

Features of IrDA: InfraRed (IrDA) is a serial half duplex, line of sight based wireless technology for
data communications between devices.

The IrDA has the following features:

 The remote control of TV, VCD players etc. works on the infrared data communication
principle.
 Infrared communication technique uses infrared waves of the electromagnetic spectrum for
transmitting the data.
 IrDA supports point-to-point and point-to-multipoint communication provided that all the
devices involved in the communication are within the line of sight.
 The typical communication range for IrDA lies in the range 10 cm to 1 m. The range can be
increased by increasing the transmitting power of the IR device.
 IR supports data rates ranging from 9600 bits/second to 16 Mbp
IR (SIR), Medium IR (MIR), Fast IR (FIR) depending on the speed of data transmission.
Parallel protocols PCI & PCI-X:-

PCI: PCI stands for Peripheral Component Interconnect/Interface bus.


 It is popular for higher bandwidth processor independent which can function as peripheral
bus.
 It is introduced by Intel in 90‟s
 It is 32 bit local bus and extended up to 64 bit by processor it requires.
 It has high speed I/O subsystem performance.
 The PCI is designed to meet economically the i/o requirement of modern system.
 It supports ten i/o devices and provides 3 types of synchronous parallel interface It has two
versions: 32 bit (33 MHz) ,64 bit (66 MHz)
 The data transfer rate for synchronous is 132 mbps and for asynchronous it is 528 mbps.
 The PCI driver can access hardware automatically or by programmer can assign address.
The automatic detection and assignment of addresses of various devices simplifies the
addition and removal of the system peripheral.
 PCI is designed to support variety of microprocessor best configuration including single and
multi-processing system.

PCI -X :

 PCI-X is a computer bus and expansion card standard that enhances the 32-bit PCI local bus
for higher bandwidth transmission.
 It was originally created by IBM, HP and Compaq in the year 1998.
 It is a double wide version of PCL, running at up to four times the clock speed but is
otherwise similar in electrical implementation and uses the same protocol.
 It has been replaced by the similar PCI Express bus, with a completely different connector
and a very different logical design.
 It provides number of slower connections in parallel but the new version PCI-Express gives
single, narrow but fast serial connection.
 Clock speed of PCI-X is doubled from 66 MHz to 133 MHz.
 Maximum possible bandwidth is 1064M Bits/sec.
 Split transactions increase the efficiency.

IEEE 802.11:-

 Wi-Fi follows the IEEE 802.11 standard.


 Wi-Fi enabled devices contain wireless adaptor for transmitting and receiving data in the
form of radio signals through an antenna. The hardware part of it is known as Wi-Fi Radio.
 Wi-Fi operates on 2.4 GHz or 5 GHz of radio spectrum and they can exist with other ISM
band devices in a Wi-Fi network.
 For communication with devices over a Wi-Fi network, the device, when its Wi-Fi radio is
turned ON, searches the available Wi-Fi network in its vicinity and lists out the Service Set
Identifier (SSID) of the available networks.
 If the network is security enabled, a password may be required to connect to a particular
SSID.
 Wi-Fi employs different security mechanisms like Wired Equivalent Privacy (WEP), Wireless
Protected Access (WPA) etc. for securing the data communication.
 Wi-Fi supports data rates ranging from 1 Mbps to 150 Mbps and access/modulation method.

You might also like