Unit— III
Communication standards and Protocol (12 M)
Contents-
3.1. Modes of data communication: serial
Communication. Parallel, synchronous and Asynchronous
3.2. Serial communication standards: RS232
3.3. MAX232 as a bidirectional level converter
3.4. Communication protocol-Serial Communication to m
I2C, CAN, USB, Serial Peripheral interface (SPI), synchronous serial
protocol (SSP), Parallel communication protocols: PCI, PCI-X
3.5. Features of advanced serial protocol: IrDA, bluetooth, zigbee
3.1. Modes of data communication: serial
Communication. Parallel, synchronous and Asynchronous
Serial and Parallel Communication-
Q. Explain duplex mode of communication and write any two applications. (2M)
Full-Duplex-
In a full-duplex system, both parties can communicate with each other simultaneously. An
example of a full-duplex device is plain old telephone service; the parties at both ends of a call
can speak and be heard by the other party simultaneously.
A. Serial Communication
How It Works
In serial communication, data is transmitted bit by bit along a single channel or wire. This
method is akin to sending letters one at a time through a single mail slot.
(1) 1 bit is transmitted at a time through single wire.
(2) Any two lines are required.
(3) Data transfer rate is low.
(4) Hardware cost is less.
(5) Used for long distance.
(6) No extra line is required for error checking.
Serial Communication
➢ Data Transmission: Sends data one bit at a time over a single channel.
➢ Speed: Generally slower compared to parallel communication.
➢ Cost: More cost-effective due to fewer wires and simpler circuitry.
➢ Distance: Suitable for long-distance communication.
➢ Complexity: Simpler circuit design.
➢ Example: USB (Universal Serial Bus).
Advantages
➢ Cost-Effective: Fewer wires and simpler hardware reduce costs.
➢ Long-Distance Communication: Less signal degradation over long distances.
➢ Simplicity: Easier to implement and troubleshoot.
Disadvantages
➢ Slower Data Rates: Limited by the speed at which bits can be sent sequentially.
➢ Latency: Higher latency due to sequential bit transmission.
Use Cases
➢ USB (Universal Serial Bus): Commonly used for connecting peripherals like
keyboards, mice, and storage devices.
➢ RS-232: Used in older computer serial ports and industrial equipment.
➢ I2C and SPI: Widely used in embedded systems for communication between
microcontrollers and sensors.
B. Parallel Communication
How It Works
Parallel communication transmits multiple bits simultaneously across multiple channels or
wires. Imagine sending several letters at once through multiple mail slots.
All 8 bits are transferred at a time through separate wires.
8 or 9 lines are required.
Data transfer rate is high.
Hardware cost is more.
Used for short distance.
9 line is required for error checking.
Advantages
High Speed: Faster data transfer rates due to simultaneous bit transmission.
Low Latency: Reduced latency as multiple bits are sent at once.
Disadvantages
Costly: Requires more wires and complex hardware, increasing costs.
Short-Distance Limitation: Signal degradation and timing issues over longer distances.
Complexity: More complex to design and maintain.
Use Cases
Parallel Communication
➢ Internal Computer Buses: Such as the data bus connecting the CPU to RAM.
➢ Parallel ATA (PATA): An older interface for connecting hard drives and optical drives.
➢ Printer Ports: Older printers used parallel ports for faster data transfer.
Serial Vs Parallel communication summary:
Serial Parallel
Typically slower for short distances than Typically faster as multiple bits are
Speed
parallel communication. sent at once
Complexity Simple for long distances Simple for short distances
Typically more expensive for long
Cost Typically cheaper for long distances
connections
May suffer signal degradation over
Reliability Reliable over long distances
long distances
More prone to crosstalk in longer
Interference Less prone to crosstalk
connections
Easier to synchronize at short
Synchronization Complex at very high speeds
distances
Can be easily scaled for short
Scalability High-speed scalability can be challenging
distances
Requires more wires, increasing
Wiring Requires fewer wires, reducing bulk
bulk
Bandwidth Bandwidth limited by channel characteristics High bandwidth potential
B. Synchronous and Asynchronous Serial Data Transfer
There are two types of serial data transfer:
1. Synchronous,
2. Asynchronous.
1. Synchronous Serial Data Communication: In synchronous serial data communication,
transmitter and receiver are synchronized. It uses a common clock signal to synchronise the
receiver and the transmitter, as shown in Fig. 21 (a). Fig. 21 (a) shows the transmission of data;
first the sync character and then the data is transmitted. This format is generally used for high
speed transmission.
How It Works:
Clock Signal: Both the sender and receiver share a common clock signal, ensuring that data is
sent and received at the same rate.
Data Transmission: Data is sent in a continuous stream, often in the form of frames or blocks,
without gaps between the bits.
Fig. 1.21 (a): Synchronous Transmission Format
Advantages:
• High Speed: Efficient for transferring large amounts of data quickly.
• Reliability: Reduced timing errors due to synchronized clocks.
Disadvantages:
• Complexity: Requires precise synchronization between sender and receiver.
• Cost: More expensive due to the need for a clock signal and more complex hardware.
Example:
• SPI (Serial Peripheral Interface): Commonly used in microcontrollers and sensors.
2. Asynchronous Serial Data Communication: In asynchronous serial data communication,
different clock sources are used for transmitter and receiver. In this mode, data is transmitted
with start and stop bits. Transmission begins with start bit, followed by data and then stop bit.
Fig. 21 (b) shows the transmission of 10-bits in the asynchronous format: one start bit, eight
data bits and one stop bit. For error checking purpose, parity bit is included just prior to stop
bit.
How It Works:
No Common Clock: The sender and receiver do not share a common clock signal. Instead, data
is sent with start and stop bits to indicate the beginning and end of each byte.
Data Transmission: Data is sent one byte at a time, with gaps between the bytes.
Advantages:
• Simplicity: Easier to implement and less expensive.
• Flexibility: Suitable for intermittent data transmission.
Disadvantages:
• Slower Speed: Less efficient for large data transfers due to the overhead of start and
stop bits.
• Higher Latency: Increased latency due to the gaps between bytes.
Example:
• UART (Universal Asynchronous Receiver/Transmitter): Commonly used in serial
ports and communication between computers and peripherals.
Q. Compare synchronous and asynchronous communication. (any four points) (4M)
3.2. Serial communication standards: RS232
RS – 232-
Q. Draw the pin out of RS 232 and describe function of TXD, RXD, DTE and DCE pins.
(4M)
Q. Draw 9 pin RS 232C connector and state significance of DTR and DSK signals. (4M)
Q. Explain the process of handshaking in RS232 standard based communication. (4M)
➢ RS-232 was introduced in the year 1962, where the signals were represented, by
voltage-level with respect to a system.
➢ It is a single-ended (1-wire) independent channel used for full duplex
communication.
➢ This interface was developed by EIA(Electronic Industry Association).
➢ As per EIA standards, any voltage between +3V to +12V is logic 0, while
any voltage between -3V to -12V is logic 1.
➢ RS-232 C standard defines many hand-shaking and control signal.
➢ It supports 2 different types of connectors, i.e. DB 9 & DB 25.
➢ RS-232 C is a point to point communication interface and devices involved for
communication are called as Data Terminal Equipment (DTE) & Data Communication
Equipment (DCE).
➢ This interface gives a speed of about 300 bps (bits per second) to about 20 kbps
(kilobits per second).
➢ The maximum operating distance supported by RS-232 C is about 50 feet.\
RS232 handshaking involves a step-by-step process.
The RS232 handshake process involves four steps:
1. The data terminal equipment (DTE) puts the RTS line into the “On” state.
2. The data communications equipment (DCE) puts the CTS line into the “On” state.
3. The DTE puts the DTR line into the “On” state.
4. The DTR line remains in the “On” state while data is being transmitted.
1. Data Carrier Detect – After a data terminal is detected, a signal is sent to the data
set that is going to be transmitted to the terminal.
2. Received Data – The data set receives the initial signal via the receive data line
(RxD).
3. Transmitted Data – The data terminal gets a signal from the data set, a
confirmation that there is a connection between the data terminal and the data set.
4. Data Terminal Ready – A positive voltage is applied to the data terminal ready
(DTR) line, a sign that the data terminal is prepared for the transmission of data.
5. Signal Ground – A return for all the signals on a single interface, the signal
ground (SG) offers a return path for serial communications. Without SG, serial data
cannot be transmitted between devices.
6. Data Set Ready – A positive voltage is applied to the data set ready (DSR) line,
which ensures the serial communications between a data terminal and a data set can be
completed.
7. Request to Send – A positive voltage indicates the request to send (RTS) can be
performed, which means the data set is able to send information to the data terminal
without interference.
8. Clear to Send – After a connection has been established between a data terminal
and a distant modem, a clear to send (CS) signal ensures the data terminal recognizes
that communications can be performed.
9. Ring Indicator – The ring indicator (RI) signal will be activated if a modem that
operates as a data set detects low frequency. When this occurs, the data terminal is
alerted, but the RI will not stop the flow of serial data between devices.
Disadvantages:
1) Suitable for system-to-system communication & NOT for chip to chip
or chip to sensor.
2) Low speed for long distance.
3) Requires transceiver (transmitter + receiver) chips which add to system cost.
4) Supports only single master-singl
3.3. MAX232 as a bidirectional level converter-
MAX232-
Q. State the use of MAX 232 in communication. (2M)
MAX232 IC is widely used for serial communication among Microcontrollers & PC. The main
function of this integrated circuit is to change the logic levels of TTL/CMOS
to RS232 throughout the serial communication process.
Generally, a microcontroller works at TTL of about 0 to 5V while a computer operates on the
standards of RS232 like -25 to +25V. So interfacing a computer with a microcontroller is not
possible without a MAX232 IC. For example; if you want to connect a PIC microcontroller to
the serial pin of a laptop, then you must place MAX232IC among them.
There, laptop serial ports like 9 pin work through RS232 Voltage Logic whereas the serial
ports of Microcontroller like Tx & RX pins work on transistor Logic. The equivalent RS232
Converters of MAX232 are RS232 module, MC1488, RS232 adapter cable & FT232RL
Structure of IC
MAX232 IC includes three main blocks shown in the following diagram. It operates with 5
volts of power supply so that it is compatible with almost all embedded systems.
AX232 IC includes 16 pins where each pin is described below. This IC needs
four capacitors externally for its proper design. These four capacitors range from 8 to10
Applications of MAX232 IC include the following.
• It is used to interface microcontroller through PC
• Computers
• Used to convert from TTL or CMOS logic to RS232
• Modem.
• Terminals
• Utilized within RS232 cables
• Portable Computing
3.4. Communication protocol-Serial Communication to m
I2C, CAN, USB, Serial Peripheral interface (SPI), synchronous serial
protocol (SSP), Parallel communication protocols: PCI, PCI-X-
Inter Integrated Circuit(I2C)-
Q. Draw the frame format of I2C and explain fields therein (4M)
1. The name stands for Inter-Integrated Circuit Bus.
2. A Small Area Network connecting ICs and other electronic systems.
3. Allows data transfer between ICs and systems at relatively low rates. Reduces board space
and cost.
4. Devices available with I2C interfaces are microcontroller, EEPROM, A/D driver, LCD
driver.
5. Developed and patented by Philips for connecting fow speed peripherals to motherboard
embedded system or cell phone.
PC (Inter-Integrated Circuit) BUS Features
1. Two wire serial bus protocol.
2. Master controls clock for slaves.
3. Each connected slave has a unique 7 bit address. The bus allows an extension to 10 bits.
4. Two wire serial data and control bus implemented with the serial data (SDA) and clock
(SCL) lines.
5. Unique start and stop conditions.
6. Bidirectional data transfer.
7. Acknowledgement after each transferred byte.
8. True multi-master capability.
9. Data speeds: Standard-100 k bits/sec. Fast mode-Up to 400 k bits/sec. High speed-Up to 3.4
M bits/sec.
Diagram:
Fig. 1.22: Master Slave Configuration
Design:
1. two bidirectional open drain lines. Serial Data Line (SDA) and Serial Clock Line (SCL)
pulled up with resistors.
2. Typical voltages used are +5V or +3.3V.
3. reference design las 7 bit or 10 bit address space.
4. Common speeds are:
10 k bits/sec low speed mode.
100 k bits/sec standard mode.
■400 k bits/sec fast mode.
1M bits/sec fast mode.
3.4 M bits/sec high speed mode.
5. The bit rates mentioned above have not considered clock stretching or other hardware
overhead.
6. Protocol overhead includes a slave address and perhaps a register address within the shave
device as well as per byte ACK/NACK bits.
7. So, actual transfer rate of user data is lower than those peak bit rates alone would imply
. 8. Maximum member of nodes is limited by the address space and also by the total bus
capacitance of 400 pF, which restricts practical communication distances to a few meters.
Master and Slave:
• A master device is simply the device that is in charge of the bus at the present time and
this device controls the clock and generates START end STOP signals.
• Slave simply listens to the bus and acts on controls and data that they are sent.
• The master can send or receive data from a slave. Slaves do not transfer data between
themselves.
• Multi Master:Multi Master operation is more complex use of PC that allows different
controlling devices on the same bus.
• Multi Master operation involves arbitration of the bus (where a master has to fight to
get control of the bus) and clock synchronization.
Data and Clock:
The 1+C uses two bi-directional lines. The two wires must be driven as open collector/drain
outputs and must be pulled high using one resistor each. This implements a wired AND
function format of SPA..
Fig. 1.23: PC Protocol
• All data blocks are composed of 8 bits. The initial block has 7 address bita followed by
a R/W bit. Following blocks have 8 data bits. Acknowledge bits are squeezed in
between each block
• Each data byte is transmitted MSB first including the address byte.
• To allow START and STOP bit generation by the master, the data line (SDA) must not
be changed while the clock (SCL) is high. It can be changed only when clock is low.
• Acknowledged bit indicates to the transmitter that the data transfer was OK. It is
generated by either master or slave depending on data direction.
• When a not acknowledge is received by the bus master, the transfer had failed and the
master must generate a STOP or repeated START to aboard the sequence.
Advantages:
1. Provides a low cost but powerful chip-to-chip communication link.
2. High noise immunity.
3. No need to design the bus interface because the PC bus interface is already integrated on
chip.
4. ICs can be added or removed from a system without affecting any other circuits on the bus.
5. Fault diagnosis and debugging are simple.
6. Extremely low current consumption.
Disadvantages:
1. Short distance only.
2. Slow clock speeds (typically 100 kHz).
3. Faster clocked devices cannot coexist with slower devices on the same bus.
Applications of I2CIt is the best choice for those applications that require less costly and easy
implementation rather than high-speed.
1. Reading certain memory ICs
2. Accessing DACs and ADCs
3. Transmitting and controlling user-directed actions
4. Reading hardware sensors
5. Communicating with multiple micro-controller
CAN (Controller Area Network) protocol-
Q. Compare between CAN and I2C protocols on the following points. i) Data Transfer
rate ii) Number of fields iii) Addressing bits iv) Applications (4M)
Q. Draw and explain CAN bus with frame format. (4M)
Q. Explain ‘CAN’ bus protocol and list out it’s two applications. (4M)
CAN stands for Controller Area Network protocol. It is a protocol that was developed by
Robert Bosch in around 1986. The CAN protocol is a standard designed to allow the
microcontroller and other devices to communicate with each other without any host computer.
The feature that makes the CAN protocol unique among other communication protocols is the
broadcast type of bus. Here, broadcast means that the information is transmitted to all the
nodes. The node can be a sensor, microcontroller, or a gateway that allows the computer to
communicate over the network through the USB cable or ethernet port. The CAN is a message-
based protocol, which means that message carries the message identifier, and based on the
identifier, priority is decided. There is no need for node identification in the CAN network, so it
becomes very easy to insert or delete it from the network. It is a serial half-duplex and
asynchronous type of communication protocol. The CAN is a two-wired communication
protocol as the CAN network is connected through the two-wired bus.
The need for a centralized standard communication protocol came because of the increase in
the number of electronic devices. For example, there can be more than 7 Transmission Control
Unit for various subsystems such as dashboard, transmission control, engine control unit, and
many more in a modern vehicle. If all the nodes are connected one-to-one, then the speed of the
communication would be very high, but the complexity and cost of the wires would be very
high. In the above example, a single dashboard requires 8 connectors, so to overcome this
issue, CAN was introduced as a centralized solution that requires two wires.
CAN Standard Frame
Various fields in standard CAN are as follows-
SOF - Start of Frame bit. It indicates start of message and used to synchronize the nodes on a
bus. A dominant bit in the field marks the start of frame.
IDENTIFIER - It serves dual purpose one, to determine which node has access to the bus and
second to identify the type of message.
RTR - Remote Transmission Request. It identifies whether it’s a data frame or a remote frame
.RTR is dominant when it is a data frame and recessive when it is a remote frame.
IDE – Identifier Extension. It is used to specify the frame format. Dominant bit is for standard
frame and recessive for extended frame.
R0 - Reversed bit. Not used currently and kept for future use.
DLC – Data Length Code. It is 4 bit data length code that contains the number of bytes being
transmitted.
DATA– Used to store up to 64 data bits of application data to be transmitted.
CRC– Cyclic Redundancy Check. The 16-bit (15 bits plus delimiter) cyclic redundancy check
(CRC) contains the checksum of the preceding application data for error detection.
ACK – Acknowledge (ACK) field. It compromises of the ACK slot and the ACK delimiter.
When the data is received correctly the recessive bit in ACK slot is overwritten as dominant bit
by the receiver.
EOF– End of Frame (EOF). The 7-bit field marks the end of a CAN frame (message) and
disables
Bit - stuffing, indicating a stuffing error when dominant.
IFS - Inter Frame Space that specifies minimum number of bits separating consecutive
messages. It provides the intermission between two frames and consists of three recessive bits
known as intermission bits. This time allows nodes for internal processing before the start of
next frame.
Applications of CAN protocol
➢ Automotive (passenger vehicles, trucks, buses)
➢ Electronic equipment for aviation and navigation
➢ Industrial automation and mechanical control
➢ Elevator and escalators
➢ Building automation
➢ Medical instruments and equipment
➢ Marine, medical, industrial, medical
Compare between CAN and I2C-
Sr Parameter I2C CAN
No
1 Data Synchronous with 3 Asynchronous with
transfer rate speeds 250kbps upto 1mbps
100kbps,400kbps and
3.4mbps
2 Number of 07 08
fields
3 Addressing 7 bit or 10 bit address 11 bit
bits
Sr Parameter I2C CAN
No
4 Application To interface devices Elevator
like watchdog,flash and controllers,medical
RAM memory,Real instruments,production
time clock and limit control system
microcontrollers
USB: Universal Serial Bus-
Q. Draw and explain USB protocol. (4M) (4M)
Q. What is USB serial protocol? Which signals it uses? (4M)
Q. List out eight features of USB (4M)
➢ Universal Serial Bus is an industry standard used to define the cables, connectors and
communication protocols used in a bus for connection, communication and power
supply between computers and electronic devices.
➢ USB was designed to support data transfer and supply electric power between
peripheral devices such as mouse, keyboard, printer, portable media players, disk drive
etc.
➢ A USB is a common computer port, which shorts for Universal Serial Bus and allows
communication between a computer and peripheral or other devices. It is the most
common interface used in today's computers, which can be used to connect printers,
scanners, keyboards, mice, game controllers, digital cameras, external hard drives and
flash drives. The USB has replaced a wide range of interfaces like the parallel and serial
port because it is used for a wide variety of uses as well as offers better support for
electrical power. With a single USB port, up to 127 peripherals can be connected with
the help of a few USB hubs, although that will need quite a bit of dexterity.
➢ A USB is intended to allow hot-swapping and enhance plug-and-play. Without having
to restart the computer, plug-and-play makes it capable of operating the system to
involuntarily discover and configure, and hot-swapping allows replacement and
removal of a new peripheral device. In the devices like smartphones and tablets, a USB
may also use for supplying power as well as charge their batteries. Its first version 1.0,
was introduced in January 1996.
USB connector types
There are different shapes and sizes available for the USB connector. Also, there are numerous
versions of USB connectors, such as Mini USB, Micro USB, etc.
➢ USB 1.0 is capable of supporting up to 127 peripheral devices and also able to support
data transfer rates of 12 Mbps
➢ In 2001, USB 2.0 was developed by Phillips, Lucent, Microsoft, Hewlett Packard, Intel,
NEC, and Compaq that is also known as hi-speed USB. It has the ability to support a
transfer rate of 60 megabytes per second or up to 480 Mbps
➢ In November 2009, USB 3.0 was available It can support transfer rates of 640
megabytes per second, or up to 5.0 gigabits per second (Gbps).
➢ USB 3.1 is the latest version of the USB protocol that was made available till 31 July
2013, which is also known as SuperSpeed It can support transfer rates of up to 10 Gbps.
Features Of USB-
1.Multiple device connection: Upto 127 different devices can be connected on single USB
bus.
2.Transfer rate: The initial USB supported 12 MBps transfer rate where USB 2.0 supports
higher rate currently 60 MB/sec.
3.Support for large range of peripherals: Low bandwidth devices such as keyboard, mouse,
joystick, and game -port, FDD . 4.Hub architecture: The devices are not daisy chained. Each
device is connected to an USB hub. The USB hub interacts with PC on one side and peripheral
on other side.
5.Plug ability: The USB device can be connected without powering off a PC i.e. plug and play
feature in BIOS together with the device takes care of detection, handling and device
recognition.
6.Power allocation: USB controller in the PC detects the presence or absence of the USB
devices and does the allocation of power.
7.Ease of installation: There is only one cable. A 4-pin cable carries signals like power signal
(-), signal (+), ground.
8.Host centric: The CPU software initiates every transaction on the USB bus. Hence the
overhead on the PC increases when there are large number of peripherals involving large
number of transactions.
Serial Peripheral Interface (SPI)-
1. Serial Peripheral Interface or SPI is a synchronous serial communication protocol th
provides full-duplex communication at very high speeds.
2. Serial Peripheral Interface (SPI) is a master-slave type protocol that provides a simple a low
cost interface between a microcontroller and its peripherals.
3. SP1 Interface bus is commonly used for interfacing microprocessor or microcontroller with
memory like EEPROM, RTC (Real Time Clock), ADC (Analog-to-Digital Converters), DAC
(Digital-to-Analog Converters), displays like LCDs, Audio ICs.
4. Sensors like temperature and pressure, memory cards like MMC or SD Cards or even other
microcontrollers.
5. SPI is a Synchronous type serial communication ie. it uses a dedicated clock signal to
synchronize the transmitter and receiver or Master and Slave, speaking in SPI terms.
6. 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.
7. Since both the clock and data are sent by the Master (or transmitter), we need not worry
about the speed of data transfer.
8. SPI so popular becasue Synchronous Serial Communication protocols (or any serial
communication for that matter) is that it provides a high speed secured data transfer with
reasonably simple hardware like shift registers at relatively less cost.
Working of SPI
1. 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.
2. Because of its simple interface, flexibility and ease of use, SPI has become a standard and
soon other semiconductor manufacturers started implementing it in their chips.
3. 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.
4. In SPI protocol, there can be only one master but many slave devices.
5. 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)
6. Since, the SPI bus is implemented using 4 signals or wires, it is sometimes called as Four
Wire Interface
7. The following image depicts a Master (Processor) connected to a Slave (Peripheral) using
SPI bus.
MOSI: MOSI stands for Master Output Slave Input. It is used to send data from the master to
the slave.
MISO: MISO stands for Master Input Slave Output. It is used to send data from the slave to
the master.
SCK or SCLK (Serial Clock): It is used to the clock signal.
SS/CS (Slave Select / Chip Select): It is used by the master to send data by selecting a slave.
Fig. 1.27: SPI Interfacing
8. 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 we must be
transmitted to Master. - Out or MISO is the data generated by
9. MISO pins on both the master and slave are ties together. Even though the Signal in M30 is
produced by the Slave, the line is controlled by the Master. The Master generates a th signal at
SCLK and is supplied to the clock input of the slave. Chip Select. (CS) or Slave Select (SS) is
used to select a particular slave by the master.
10. Since the clock is generated by the Master, the flow of data is controlled by the master. Fo
every clock cycle, one bit of data is transmitted from master to slave and one bit of data i
transmitted from slave to master.
11. This process happen simultaneously and after 8 clock cycles, a byte of data is transmited a
both directions and hence, SPI is a full-duplex communication.
12. If the data has to be transmitted by only one device, then the other device has to send
something (even garbage or junk data) and it is up to the device whether the transmitted dau is
actual data or not.
13. This means that for every bit transmitted by one device, the other device has to send one hi
data Le. the Master simultaneously transmits data on MOSI line and receive data from slave on
MISO line,
14. If the slave wants to transmit the data, the master has to generate the clock sig accordingly
by knowing when the slave wants to send the data in advance.
Advantages of SPI
1. The main advantage of the SPI is to transfer the data without any interruption.
2. It is simple hardware.
3. It provides full-duplex communication.
4. There is no need for a unique address of the slave in this protocol.
5. This protocol does not require precise oscillation of slave devices because it uses the
master's clock.
6. In this, software implementation is very simple.
7. It provides high transfer speed.
8. Signals are unidirectional.
9. It has separate lines of MISO and MOSI, so the data can be sent and received at the
same time.
Disadvantages of SPI
1. Usually, it supports only one master.
2. It does not check the error like the UART.
3. It uses more pins than the other protocol.
4. It can be used only from a short distance.
5. It does not give any acknowledgment that the data is received or not.
Applications of SPI
o Memory: SD Card, MMC, EEPROM, and Flash.
o Sensors: Temperature and Pressure.
o Control Devices: ADC, DAC, digital POTS, and Audio Codec.
o Others: Camera Lens Mount, Touchscreen, LCD, RTC, video game controller, etc.
Peripheral Component Interconnect (PCI)-
•➢PCI stands for Peripheral Component Interconnect.
➢It could be a standard information transport that was common in computers from 1993
to 2007 or so.
➢ It was for a long time the standard transport for extension cards in computers, like
sound cards, network cards, etc.
➢ It was a parallel transport, that, in its most common shape, had a clock speed of 66
MHz, and can either be 32 or 64 bits wide.
➢ It has since been replaced by PCI Express, which could be a serial transport as
contradicted to PCI.
Types of PCI:
These are various types of PCI:
➢ PCI 32 bits have a transport speed of 33 MHz and work at 132 MBps.
➢ PCI 64 bits have a transport speed of 33 MHz and work at 264 MBps.
➢ PCI 32 bits have a transport speed of 66 MHz and work at 512 MBps.
➢ PCI 64 bits have a transport speed of 66 MHz and work at 1 GBps.
Function of PCI:
PCI slots are utilized to install sound cards, Ethernet and remote cards and presently strong
state drives utilizing NVMe innovation to supply SSD drive speeds that are numerous times
speedier than SATA SSD speeds.
Advantages of PCI :
You’ll interface a greatest of five components to the PCI and you’ll be able moreover
➢
supplant each of them by settled gadgets on the motherboard.
➢ You have different PCI buses on the same computer.
➢ The PCI transport will improve the speed of the exchanges from 33MHz to 133 MHz
with a transfer rate of 1 gigabyte per second.
➢ The PCI can handle gadgets employing a greatest of 5 volts and the pins utilized can
exchange more than one flag through one stick.
Disadvantages of PCI :
➢ PCI Graphics Card cannot get to system memory.
➢ PCI does not support pipeline.
Peripheral Component Interconnect eXtended-
➢ PCIX, stands for Peripheral Component Interconnect eXtended.
➢ It is a computer bus and expansion card standard that came with a support of enhancement
for the 32-bit PCI local bus for higher bandwidth demanded mostly by servers and
workstations.
➢ PCI-X is basically having a complete specification for both 32 and 64-bit PCI
connectors,and PCI-X 2.0 added a 16-bit variant for embedded applications.
➢ It has been replaced in modern designs by the PCI Express with a completely different
connector and a really different electrical design, having one or more narrow but fast
serial connection lanes instead of a number of slower connections in parallel.
PCI-X is a complicated version of PCI conventional buses. It works like a pipe that data
transfers between devices. It increases the clock speed from 66 MHz to 133 MHz, essentially
providing a bigger, faster pipe for data to flow through.
History of PCI-X
Introduced in 1999 and developed by IBM, HP, and Compaq, PCI-X offered more speed than
PCI and steadily increased to quite 30 times that of the first PCI bus. The peak bandwidth of
the PCI-X bus is having a range from 133 to 4262 MB/second. Although a greatly enhanced
Version 2.0 was introduced in 2002, it had been not widely used, and PCI-X altogether its
versions were superseded by PCI Express (PCIe).
Characteristics of PCI-X
➢ Bus Type
PCI-X, just like the original PCI standard, maybe a shared bus technology, with all connected
peripherals using an equivalent bus in parallel. \.
➢ Bandwidth
Most PCI-X buses are 64-bits and run at either 100MHz or 133MHz, allowing a maximum
transmission speed of 1, 066 MB per second. Advances in PCI-X technology have allowed
for theoretical accelerates to eight .5GB per second, although speeds that prime have some
issues with interference.
➢ Speed
PCI-E technology is supportable within one and 32 lanes and runs at speeds beginning at 500
MB per second, up to a theoretical maximum of 16GB per second
➢ Slot Size
PCI-E and PCI-X standards differ greatly when it involves the dimensions of the slot on the
computer’s motherboard. PCI-X slots are equivalent because of the original PCI slots,
although with one additional extension allowing 64-bit communication.
Advantages of PCI-X over PCI
➢ Double the bandwidth of PCI
➢ Backward compatibility
➢ Much faster rates than PCI
3.5. Features of advanced serial protocol: IrDA, bluetooth, zigbee-
Infrared (IRDA)-
Q. Explain architecture of IrDA protocol. (4M)
Q. State any two features of IrDA (2M)
➢ Infrared technology uses diffuse light reflected at walls, furniture etc. or a directed
light if a line of sight (LOS) exists between sender and receiver.
➢ Infrared light is the part of the electromagnetic spectrum, and is an electromagnetic
form of radiation. It comes from the heat and thermal radiation, and it is not visible to
the naked eyes.
➢ In infrared transmission, senders can be simple light emitting diodes (LEDs) or laser
diodes. Photodiodes act as receivers.
➢ Infrared is used in wireless technology devices or systems that convey data through
infrared radiation. Infrared is electromagnetic energy at a wave length or wave lengths
somewhat longer than those of red light.
➢ Infrared wireless is used for medium and short range communications and control.
Infrared technology is used in instruction detectors; robot control system, medium
range line of sight laser communication, cordless microphone, headsets, modems, and
other peripheral devices.
➢ Infrared radiation is used in scientific, industrial, and medical application. Night
vision devices using active near infrared illumination allow people and animals to be
observed without the observer being detected.
➢ Infrared transmission technology refers to energy in the region of the electromagnetic
radiation spectrum at wavelength longer than those of visible light but shorter than
those of radio waves.
➢ Infrared technology allows computing devices to communicate via short range
wireless signals. With infrared transmission, computers can transfer files and other
digital data bidirectional.
Architecture-
Protocol Architecture
The IrDA Data Protocol consists of a mandatory set of protocols and a set of optional
protocols.
Mandatory Protocols
1. IrPHY(Physical signaling layer)
2. IrLAP(Link Access Protocol)
3. IrLMP(Link Management Protocol)
4. IAS(Information Access Protocol)
Optional Protocols
1. IrCOMM (IR communication protocol)
2. Tiny-TP (Tiny transport protocol)
3. IrOBEX (IR object exchange protocol)
4. IrLAN (IR local area network protocol)
IrPHY
• Basic level of IrDA specifications
• Necessary in all IrDA devices
• Lays out the angle limits, speed range, distance range and modulation
IrLAP
• Responsible for performing device discovery and negotiation
• Provides a reliable transmission medium on which to build additional
communications
• Based on HDLC protocol
• Responsible for preserving the physical connection
• Facilitates error detection, retransmission of lost or damaged packets & rudimentary
flow control
IrLMP
• Allows one or more IrDA services to run over a single IrLAP connection
Characteristics of Infrared Radiation
➢ Infrared radiation consists of heat-inducing property. ...
➢ The origin is from an alteration in electron movement.
➢ Wavelength range from 710 nm to 1 mm.
➢ Frequency range from 430 THz to 300 GHz.
➢ Infrared radiation is a Transverse wave.
➢ Speed is 3X 108 m/s.
Advantages of infrared
➢ The main advantage of infrared technology is its simple and extremely cheap senders
and receivers which are integrated into nearly all mobile devices available today.
➢ No licenses are required for infrared and shielding is very simple.
➢ PDAs, laptops, notebooks, mobile phones etc. have an infrared data association
(IrDA) interface.
➢ Electrical devices cannot interfere with infrared transmission.
Disadvantages of Infrared
➢ Disadvantages of infrared transmission are its low bandwidth compared to other LAN
technologies.
➢ Limited transfer rates to 115 Kbit/s and we know that even 4 Mbit/s is not a particular
high data rate.
➢ Their main disadvantage is that infrared is quite easily shielded.
➢ Infrared transmission cannot penetrate walls or other obstacles.
➢ Typically, for good transmission quality and high data rates a LOS (Line of site), i.e.
direct connection is needed.
Bluetooth-
Q. State any two applications of Bluetooth. (2M)
➢ Bluetooth is used for short-range wireless voice and data communication.
➢ It is a Wireless Personal Area Network (WPAN) technology and is used for data
communications over smaller distances.
➢ It operates within the unlicensed, business, scientific, and clinical (ISM) bands from 2.4
GHz to 2.485 GHz.
➢ Bluetooth stages up to 10 meters. Depending upon the version, it presents information
up to at least 1 Mbps or 3 Mbps.
➢ The spreading method that it uses is FHSS (Frequency-hopping unfold spectrum).
➢ A Bluetooth network is called a piconet and a group of interconnected piconets is called
a scatter net.
What is Bluetooth?
Bluetooth is a wireless technology that lets devices like phones, tablets, and headphones
connect to each other and share information without needing cables. Bluetooth simply follows
the principle of transmitting and receiving data using radio waves. It can be paired with the
other device which has also Bluetooth but it should be within the estimated communication
range to connect. When two devices start to share data, they form a network called piconet
which can further accommodate more than five devices.
Key Features of Bluetooth
• The transmission capacity of Bluetooth is 720 kbps.
• Bluetooth is a wireless device.
• Bluetooth is a Low-cost and short-distance radio communications standard.
• Bluetooth is robust and flexible.
• The basic architecture unit of Bluetooth is a piconet.
Architecture of Bluetooth-
The architecture of Bluetooth defines two types of networks:
1.Piconet
Piconet is a type of Bluetooth network that contains one primary node called the master node
and seven active secondary nodes called slave nodes. Thus, we can say that there is a total of 8
active nodes which are present at a distance of 10 meters. The communication between the
primary and secondary nodes can be one-to-one or one-to-many. Possible communication is
only between the master and slave; Slave-slave communication is not possible. It also has 255
parked nodes, these are secondary nodes and cannot take participation in communication unless
it gets converted to the active state.
2. Scatternet
It is formed by using various piconets. A slave that is present in one piconet can act as master
or we can say primary in another piconet. This kind of node can receive a message from a
master in one piconet and deliver the message to its slave in the other piconet where it is acting
as a master. This type of node is referred to as a bridge node. A station cannot be mastered in
two piconets.
Bluetooth Applications
Some of the common applications of Bluetooth are −
• In laptops, notebooks and wireless PCs
• In mobile phones and PDAs (personal digital assistant).
• In printers.
• In wireless headsets.
• In wireless PANs (personal area networks) and even LANs (local area networks)
• To transfer data files, videos, and images and MP3 or MP4.
• In wireless peripheral devices like mouse and keyboards.
• In data logging equipment.
• In the short-range transmission of data from sensors devices to sensor nodes like mobile
phones.
Zigbee Technology-
Q. State any four features of Zigbee. (4M) (4M)
➢ Zigbee is one of the wireless personal area network (WPAN) specifications. It is
designed to meet low-power and low data rate applications and is developed under
IEEE 802.15.4 standard by The Zigbee Alliance. Typically, Zigbee is used in
establishing a smart home for devices from different manufacturers to communicate
with each other to enable automation.
➢ Hence, it is also called the smart home protocol. For example, the light system can be
linked to the security cameras, and the coffee maker can be linked to the alarm system
so that the coffee is ready for you when you wake up.
➢ If we want a network for short-range communication for streaming audio, we opt for
Bluetooth. For streaming videos and larger files, we use Wi-Fi. But, we need a network
using which we can connect a large number of battery-powered devices. We can't go for
Wi-Fi because of its high energy requirements, and we can't choose Bluetooth even
though it consumes less power, as only a small number of devices can be connected
using Bluetooth.
➢ we need a network that can connect many battery-powered devices, and the main aspect
here is low energy/ power consumption. This is the whole purpose of developing
Zigbee Technology. Zigbee revolves around control and sensor networks.
➢ zigbee networks use Mesh Topology, which gives a separate link for every device pair
in the Network. Even if one link fails, the Network can utilize another alternate path/
link for communication. Hence, it is reliable.
➢ Zigbee 250 kbps, 100 kbps, 40 kbps, 20 kbps
➢ The applications of Zigbee are designed in a way that the required data rate is low.
➢ In a Zigbee network, there will be three types of devices:
➢ Zigbee features :-
1) IEEE Standard 802.15.4
2) Frequency (GHz) 0.868, 0.915, 2.4
3) Maximum raw bit rate (Mbps) 0.250
4) Typical data throughput (Mbps) 0.2
5) Maximum (Outdoor) Range (Meters) 10-100
6) Relative Power Consumption Very low
➢ Zigbee Coordinator
➢ End device
➢ Zigbee Router
End Devices:
The End device is a battery-powered device that we use. These devices communicate with the
Zigbee Coordinator.
Zigbee Routers:
A Zigbee router isn't the same as a Wi-Fi router. It can send information to the Coordinator and
route data from Zigbee end devices to the Coordinator.
The Zigbee router is a mains-powered device, which means it is directly connected to the
house's main power. So, there is no concern about its battery life.
Zigbee Coordinator:
The Coordinator is also a mains-powered device, and every Zigbee network will have only one
Coordinator.
It is responsible for starting and maintaining the Network and selecting the network security
mode.
It receives the information from the end devices and bridges the information to the home
network for us to access from our phones or tablets.
Advantages (Pros):
➢ Zigbee is the best Network for battery-powered devices as it allows them to turn off/
sleep when they aren't used. When needed, the Network quickly wakes them up, thus
saving power.
➢ Though battery-powered, Zigbee devices can have a good life span due to the
Network's power-saving capabilities.
➢ The Network stays reliable due to its Mesh Topology.
Disadvantages (Cons):
➢ If one Coordinator fails, the whole Network goes down.
➢ When the Coordinator is replaced, all the Zigbee devices aren't automatically
connected to the new Coordinator. Every connection has to be manually established again.
➢ The Network stays reliable due to its Mesh Topology.
___________________***_________________