Chapter 03 Communication Protocols
Chapter 03 Communication Protocols
Asynchronous Data Transfer: Asynchronous Data Transfer is a character oriented data transfer. In this
one data byte is transferred serially at a time. When data is not transferred output line stays HIGH i.e.
marking state. The start of data is indicated by a low start bit. The start bit is used to synchronize transmitter
and receiver. After the start bit, data bits are transferred serially. The data bits are followed by a one or
more high stop bits. After the stop bits same logical level is maintained on output line i.e. marking state for
next data byte.
Synchronous Data Transfer: Synchronous Data Transfer is a block or packet of data transfer. The blocks
of data bytes is transferred serially. The data bytes in a block are transferred one after another. Before data
is transmitted sync characters are send by the transmitter to achieve synchronization between transmitter
and receiver, the output line of the transmitter is HIGH i.e. marking state. To start transmission the sync
character bits are sent by transmitter followed by data bits. When the receiver is synchronized it will accept
the data in the same sequence as send by the transmitter. The sync character may be any digital bit pattern.
The clock to both the transmitter and receiver is same.
RS 232 Interface:
In serial I/O the signals are transmitted as either voltage or current. Typically 20mA or 60mA current loop
are used in these systems. When data is transmitted as voltage the standard used is known as RS-232C. It
is defined in reference to Data Terminal Equipment (DTE) and Data Communication equipment (DCE).
The rate of data transmission in RS 232 is restricted to a maximum of 20K baud and the DTE and DCE are
linked with a coaxial cable of 50ft. the DTE is a 25 pin D type male connector and the DCE is a D type
female connector. For high-speed data transmission two new standards RS 422A and RS 423A have been
developed.
RS-232 Signals:
MAX 232: The MAX232 is an IC, that converts signals from an RS-232 serial port to signals suitable for
use in TTL compatible digital logic circuits. The MAX232 is a dual driver/receiver and typically converts
the RX, TX, CTS and RTS signals.
The drivers provide RS-232 voltage level outputs (approx. ± 7.5 V) from a single + 5 V supply via on-
chip charge pumps and external capacitors. This makes it useful for implementing RS-232 in devices that
otherwise do not need any voltages outside the 0 V to + 5 V range, as power supply design does not need
to be made more complicated just for driving the RS-232 in this case.
The receivers reduce RS-232 inputs (which may be as high as ± 25 V), to standard 5 V TTL levels. These
receivers have a typical threshold of 1.3 V, and a typical hysteresis of 0.5 V.
When a MAX232 IC receives a TTL level to convert, it changes a TTL logic 0 to between +3 and +15 V,
and changes TTL logic 1 to between -3 to -15 V, and vice versa for converting from RS232 to TTL. This
can be confusing when you realize that the RS232 data transmission voltages at a certain logic state are
opposite from the RS232 control line voltages at the same logic state.
I²C 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. There is a protocol for the I²C bus. Fig shows the signals during the transfer of a byte when using I²C
bus. The format of bits at the I²C bus is as shown:
Integrated Data
Circuit 2
Integrated
Clock
Circuit 1
Integrated
Circuit 3
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.
6. Controlling OLED/OLCD displays in cell phones.
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.
Field and its Length Description of each field in CAN frame
1st field of 12 bits It is called arbitration field. It contains the packet 11-bit destination address and
the RTR [Remote Transmission Request]. When this bit is at 1 this indicates the
packet is for the destination address. If this packet for request for a data from a
device defined by identifier. The device is at destination address specified in the
field.
2nd field of 6 bits It is called a control field. The 1st bit id the identifier extension. The 2nd bit is
always 1, and the last 4 bits are code for data length.
rd
3 field of 0-64 bits Its length depends on data length code in the control field.
4th field of 16-bits { It is the CRC word. The receiver node uses it to detect errors during
3rd if data field has no transmission.
bit present}
5th field of 2 bits 1st field is the ACK slot. The sender sends it as 1 and RX sends back 0 in this
slot when the receiver detects an error in the reception. Sender after sensing 0
in the ACK slot transmits the data frame. The 2nd bit is the ACK delimiter bit. It
signals the end of the ACK field. If the transmitting node does not receive and
ACK of data frame within a specified time slot it should retransmit.
th
6 field of 7-bits It is for end of the frame specification and has seven 0’s.
Devices communicate in master/slave mode where the master device initiates the data frame. Multiple slave
devices are allowed with individual slave select lines. Sometimes SPI is called a four-wire serial bus,
contrasting with three-,two-, and one-wire serial buses.
SPI is often referred to as SSI (Synchronous Serial Interface).
The SPI bus specifies four logic signals:
SCLK : Serial Clock (output from master).
MOSI : Master Output, Slave Input (output from master).
MISO : Master Input, Slave Output (output from slave).
SS : Slave Select (active low, output from master).
Synchronous Serial Protocol: Synchronous serial communication describes a serial
communication protocol in which "data is sent in a continuous stream at a constant rate."
Synchronous communication requires that the clocks in the transmitting and receiving devices
are synchronized – running at the same rate – so the receiver can sample the signal at the same time intervals
used by the transmitter. No start or stop bits are required. For this reason "synchronous communication
permits more information to be passed over a circuit per unit time" than asynchronous serial
communication. Over time the transmitting and receiving clocks will tend to drift apart,
requiring resynchronization.
Universal Serial Bus: Universal Serial Bus (USB) is an industry standard developed in the mid-1990s that
defines the cables, connectors and communications protocols used in a bus for connection, communication,
and power supply between computers and electronic devices.
USB was designed to standardize the connection of computer peripherals (including keyboards, pointing
devices, digital cameras, printers, portable media players, disk drives and network adapters) to personal
computers, both to communicate and to supply electric power. It has become commonplace on other
devices, such as smart phones, PDAs and video game consoles.[3] USB has effectively replaced a variety of
earlier interfaces, such as serial and parallel ports, as well as separate power chargers for portable devices.
Infra Data Transmission: IR data transmission is also employed in short-range communication among
computer peripherals and personal digital assistants. These devices usually conform to standards published
by IrDA, the Infrared Data Association. Remote controls and IrDA devices use infrared light-emitting
diodes (LEDs) to emit infrared radiation that is focused by a plastic lens into a narrow beam. The beam
is modulated, i.e. switched on and off, to encode the data. The receiver uses a silicon photodiode to convert
the infrared radiation to an electric current. It responds only to the rapidly pulsing signal created by the
transmitter, and filters out slowly changing infrared radiation from ambient light. Infrared communications
are useful for indoor use in areas of high population density. IR does not penetrate walls and so does not
interfere with other devices in adjoining rooms. Infrared is the most common way for remote controls to
command appliances. Infrared remote control protocols like RC-5, SIRC, are used to communicate with
infrared.
Advantages:
1. IrDA is an established technology that enjoys a large installed base within notebook computers and other
devices
2. Recent trend towards use of IrDA in cellular telephones, which has the potential to expand
use of IrDA as a cable.
3. Will maintain a speed advantage over initial Bluetooth products (i.e. 4Mbps versus 1Mbps).
4. IrDA will maintain a cost advantage over initial Bluetooth; however, this cost advantage is
expected to quickly erode over time as the number of available Bluetooth solutions grows.
5. Windows 2000 is expected to included enhanced support for IrDA which will improve usability for file
transfer and synchronization.
6. Since IrDA is based on infrared technology, it will not interfere with other radio frequency based
technologies like 802.11b wireless LAN; in environments where 802.11b wireless LAN products have
been deployed IrDA may be the more appropriate wireless PAN technology
Disadvantages:
1. Won’t work when there’s no line-of-sight
2. Susceptible to interference from microwave ovens and other RFI
3. Does not work with all applications
4. Requires a mobile broadband connection
5. Gets frizzy when the humidity is high
Bluetooth: Bluetooth technology is the implementation of a protocol defined by the IEEE 802.15 standard.
The standard defines a wireless Personal Area Network (PAN) operable in an area the size of a room or a
hall. Bluetooth is wireless LAN technology designed to connect devices of different functions like
Telephone, notebooks, desktops, laptops etc. A Bluetooth LAN is an adhoc network that is instantaneously
formed, find each other and make a network called Pico net. It can even be connected to the Internet if it
has the capability.
Applications:
1. Peripheral Devices of a computer can communicate with the computer through this technology.
2. Monitoring devices can communicate with sensor devices in a small health care centre.
3. Home Security devices can use this technology to connect different sensors to the main security
controller.
4. Conference attendees can synchronize their palmtop computers at a conference.
Architecture: or
Q: Describe the two types of links between Bluetooth and Blue tooth slave.
Bluetooth Defines two types of Networks:
Pico net: A blue tooth network is called as a pico net or small net. A Pico net can have up to 8 stations
one of which is called as master and the rest are called slaves. All the slaves’ stations have only one
master network. A pico nets network can have only one master network. The communication between
the master and slave can be one-one or one-many. A pico net normally can have 7 slave devices but in
some cases 8th device can be also used in parked state. As in this only 8 devices can have a
communication a device in parked state can communicated only when one of the active devices goes
in parked state.
Scatter net: Pico nets can be combined to form scatter net. A slave station in one pico net can become
master in another pico net. This station can receive message from the master in 1st pico net (as a slave)
& acting as a master, delivers it to the slaves in the 2nd pico net. A station can be member of two pico
nets.
Advantages:
1. Widely Used:
2. Feature Simplicity
3. Free of Charge:
4. Go Wireless!:
5. User in Control:
Disadvantages:
1. Battery Use: This occurs mostly on user’s cell phone but also occurs in other technology such as music
players. More battery power is used when user leave its Bluetooth enabled on phone all day. To disregard
all this, the best thing that user can possibly do is disable it once you are completed with the transfer
2. Bluetooth Internet: Throughout all devices, when using Bluetooth internet, the connection can
sometimes run very slow so Bluetooth internet is not highly suggested for all cases.
Zig Bee: ZigBee is a specification for a suite of high-level communication protocols used to
create personal area networks built from small, low-power digital radios. ZigBee is based on an IEEE
802.15.4 standard. Though its low power consumption limits transmission distances to 10–100
meters line-of-sight, depending on power output and environmental characteristics.
ZigBee devices can transmit data over long distances by passing data through a mesh network of
intermediate devices to reach more distant ones.
ZigBee is typically used in low data rate applications that require long battery life and secure networking
(ZigBee networks are secured by 128 bit symmetric encryption keys.)
ZigBee has a defined rate of 250 Kbit/s, best suited for intermittent data transmissions from a sensor or
input device.
Applications:
Wireless light switches,
Electrical meters with in-home-displays,
Traffic management systems, and
Other consumer and industrial equipment that requires short-range low-rate wireless data transfer.
Advantages:
Power saving, as a result of the short working period, low power consumption of communication, and
standby mode
Reliability: Collision avoidance is adopted, with a special time slot allocated for those communications
that need fixed bandwidth so that competition and conflict are avoided when transmitting data. The
MAC layer adopts completely confirmed data transmission, that is, every data packet sent must wait for
the confirmation from the receiver
Low cost of the modules, and the ZigBee protocol is patent fee free
Short time delay, typically 30 ms for device searching, 15 ms for standby to activation, and 15 ms for
channel access of active devices
Large network capacity: One ZigBee network contains one master device and maximum 254 slave
devices. There can be as many as 100 ZigBee networks within one area
Safety: ZigBee provides a data integrity check and authentication function. AES-128 is adopted and at
the same time each application can flexibly determine its safety property.
Disadvantages:
Short range, low complexity,
Low data speed.