ESY Ch-3
ESY Ch-3
and
Protocols
Digital Data Transmission Modes
Based on number of data bits transmitted or number of data lines
used to transmit the digital data-
Data Transmission
Synchronous AsynchronousTransmission
Transmission
Parallel Transmission
• In parallel transmission of data, all the bits of data are transmitted
simultaneously on separate lines or wires.
Idle Idle
State State
1 2 3 4 5 6 7 8
Minimum of one
Start bit
stop bit
t
Bit Time = 1 / f
• Asynchronous communication is not
synchronized by a timer mechanism or clock
• Here, DTE stands for Data Terminal Equipment and an example for
DTE is a computer.
• DCE stands for Data Communication Equipment or Data Circuit
Terminating Equipment and an example for DCE is a modem.
i.e. low level voltage is logic ‘1’ and high level voltage is logic ‘0’.
RS232 specify the sequence of operations that must be carried out when a DTE
and DCE are connected.
• Assume a computer (DTE) is connected to a Modem (DCE) through RS232
interface. In order to send data from computer to Modem, the following
procedure must be followed.
1. When DTE is ready to transmit, it will send DTR signal.
2. When Modem (DCE) is ready to receive, it will send a DCE ready signal
(DSR).
3. When the computer (DTE) is ready to send the data, it sends a
These ICs take in the RS232 signals and generate a TTL level
voltages. These ICs also invert the signals as low voltage levels in
RS232 are logic ‘1’ and high voltage levels in RS232 are logic ‘0’.
The following image shows the implementation of RS232 Driver
in a real time application.
• Here, the UART (Universal Asynchronous Receiver Transmitter)-
generates and receives the necessary signals for serial
communication and the RS232 Driver is responsible for
converting signals between TTL and RS232 interface.
The transmitter will transmit the data and it is loaded into the
receiver buffer. During this time, the receiver tells the transmitter not
to send any further data until the data in the buffer has been read by
the receiver.
The RS232 Protocol defines four signals for the purpose of
Handshaking:
Ready to Send (RTS)
Clear to Send (CTS)
Data Terminal Ready (DTR) and
Data Set Ready (DSR)
With the help of Hardware Handshaking, the data from the transmitter
is never lost or overwritten in the receiver buffer. When the transmitter
(DTE) wants to send data, it pulls the RTS (Ready to Send) line to
high.Then the transmitter waits for CTS (Clear to Send) to go high
and hence it keeps on monitoring it. If the CTS line is low, it means
that the receiver (DCE) is busy and not yet ready to receive data.
When the receiver is ready, it pulls the CTS line to high. The
transmitter then transmits the data. This method is also called as
RTS/CTS Handshaking.
Additionally, there are two other wires used in Handshaking. They are
DTR (Data Terminal Ready) and DSR (Data Set Ready). These two
signals are used by the DTE and DCE to indicate their individual
status. Often, these two signals are used in modem communication.
The newer standards of RS232 define an 8 signal Hardware
Handshaking.
Limitations of RS232
1. RS232 Protocol requires a common ground between the
transmitter (DTE) and receiver (DCE). Hence, the reason for
shorter cables between DTE and DCE in RS232 Protocol.
It has single cable connectivity with two wires : One Serial data line (SDA)One
Serial Clock Line (SCL).
Each connected slave has a unique 7-bit address. i.e. 7-bit addressing is used
7-bit addressing allows a total of 128 devices to communicate over shared I2C bus.
First field of 1 bit : START bit : Denotes the start of frame transmission.
Second field of 7 bits: Address field : It defines the slave address which is
being sent by the master using SDA and SCL.
Third field of 1 control bit: Control field 1: It defines whether a read or write
cycle is in progress.
Fourth field of 1 control bit: Acknowledgement: It defines whether the
present data is an acknowledgement ( from slave).
Fifth field of 1 data byte: Data field 1: Data field for I2C device data byte.
Sixth field of 1 bit: NACK- Negative Acknowlwdgement (Acknowledgement
from receiver)
Seventh field of 1 bit: STOP Bit: It is sent by master.
Protocol
• Data transfers are byte oriented, MSB first
• Start: SDA goes low while SCL is high
– 0-write to slave
SDA
SCL
Remember : Clock is produced by Master Stop
Start
52 of 40
Master Writes to Slave
Master Reads from Slave
2
I C Bus Definitions
• Master:
– Initiates a transfer by generating
start and stop conditions
– Generates the clock
– Transmits the slave address
– Determines data transfer direction
• Slave:
– Responds only when addressed
– Timing is controlled by the clock line
I2C Extensions
• 10 bit addressing (up to 1024 addresses)
• Fast mode – up to 400 kbits/sec
• High-Speed – up to 3.4 Mbits/sec
58
CAN bus
• CAN (Controller Area Network) is a serial bus system used to
microcontrollers.
industrial machines).
CAN BUS Physical Layer
Physical medium – two wires terminated at both ends by resistors.
Differential signal - better noise immunity.
Benefits:
▪ Reduced weight, Reduced cost
vs.
http://canbuskit.com/what.php
61
CAN BUS and the OSI Model
62
Data Information – Frame Format
• Type A --> It is used for connecting the cable to the host device
also known as upstream end. They are flat in shape and have
four connections in line.
On-The-Go,
act as slaves to become hosts but later they were adopted in devices
Micro-B
Pin Connections for Standard USB
Pin No. Name Function
1 VBUS +5 V Supply
2 D- Differential data line (D-)
3 D+ Differential data line (D+)
4 GND Signal ground
1 VBUS +5 V Supply
2 D- Differential data line (D-)
3 D+ Differential data line (D+)
4 ID Identifies Type A or B
5 GND Signal ground
USB Interfaces
There are 3 USB versions.
Low- Bandwidth.
It is still used by some devices that don't need faster data transfer
rates
USB Interfaces
USB 2.0- Released in 2000.
• Plug and Play- USB supports plug and play i.e. we can connect
USB devices to the hub or the host without any need for
configuration settings or without need of extra drivers. Most
devices like mouse, pendrive, card reader are directly plugged
and they start working without installing any drivers.
Features of USB
• Self Powered- USB devices are powered through the USB port,
so they do not need extra power adapter which makes it easy to
use them. It can also be used to power certain devices without
exchanging data i.e. charging a mobile handset.
Single Slave
SPI
Multi Slave
SPI
SPI requires four signal lines for communication-
1. SCLK- Serial Clock- Signal line carrying the clock signals.
2. MOSI- Master Out Slave In- Signal line carrying the data from
master to slave device. It is also known as Slave Input/ Slave Data
In.(SI/SDI)
3. MISO- Master In Slave Out- Signal line carrying the data from
slave to master device. It is also known as Slave Output/ Slave
Data Out.(SO/SDO)
UART
(Packetizer/ Encoder /
Processor Decoder
De-packetizer)
Transceiver
LED/Photodiode
IrDA protocol architecture
Higher Layers (
Application, Ir comm )
Physical Layer
( Ir PHY)
Features:
• Advantages-
• Disadvantages-
Applications:
Bluetooth
Bluetooth is a global standard for wireless connectivity.
Features
• Bluetooth is a low cost, low power, short range wireless technology
for data and voice communication.
ZR ZC ZR
ZED
ZED
ZED
110
CAN Bus Characterstics
111