Serial Protocols
Serial Protocols
PROTOCOLS
I2C, CAN, Firewire, USB
SDA does not change between the Clock rising edge and the Clock falling
edge
During data transmission, SDA only transitions while SCL is low
An SDA transition when SCL is high, indicates a start or stop condition
7
READ WRITE BIT
Read/write bit follows the slave address
Set by master to indicate desired operation
O: master wants to write data to slave
1: master wants to read data from slave
Often interpreted and/or decoded as part of
the address byte
8
ACKNOWLEDGE BIT
Sent by the receiver of a byte of data:
0 – Acknowledgement (ACK)
1 – Negative Acknowledgement (NACK)
I2C is idle high.
Lack of response = NACK
Used after the slave address and each data
byte:
ACK after data byte(s) confirms receipt of data.
ACK after slave address confirms:
A slave with that address is on the bus.
The slave is ready to read/write data
(depending on R/W bit).
9
DATA BYTES
Data byte contains the information being
transferred between master and slave
Memory or register contents, addresses, etc.
Always 8 bit long. MSB first
Always followed by an
acknowledgement bit
Set to zero by the receiver if data has been
received properly
10
MULTIPLE DATABYTES
In many cases, multiple data bytes are sent in one I2C frame
Each data byte is followed by an ACK bit
Bytes may be all "data," or some may represent an internal address, etc,
Ex: first byte is a register location and second byte is the data to be written to that
register
11
STOP CONDITION
Stop condition indicates the end of data bytes
First, SCL returns (and remains) high
Then, SDA returns (and remains) high
Note that for data bytes, SDA only transitions
when the clock is low
SDA transition when SCL high = stop condition
Bus becomes idle
-No clock signal
Any node can now use the start condition to
claim the bus and begin a new
communication
12
SUMMARY
I2C Protocol: Widely used for short-distance data
exchange (intra-board).
Two Wires: Serial Data (SDA) and Serial Clock (SCL).
Master Control: Master controls the bus, reads/writes a
frame with a Slave address and data bytes.
Acknowledgement: Each address and data byte is
acknowledged.
Start/Stop Conditions: Communication is initiated and
terminated with special conditions.
Idle State: I2C is idle high (open drain).
Bus Speeds: Supports various maximum bus speeds.
13
INTRODUCTION TO CAN
What is CAN?
Controller Area Network (CAN) is a serial communication protocol designed for real-time, reliable
communication between multiple embedded systems.
Initially developed by Bosch for automotive applications, CAN is now widely used in industries such as
automobiles, robotics, medical devices, and industrial automation.
High-Speed Serial Bus Standard: Designed for fast communication and isochronous real-time data
transfer.
Developed by Apple: First integrated into Macintosh computers in 1999.
Brand Names:
FireWire (Apple, copyrighted)
i.LINK (Sony, used in cameras/camcorders)
Connector Types:
4-pin (Sony): Compact, 4 signal conductors, used in consumer electronics.
6-pin & 9-pin (Apple): More robust, used in computers and peripherals.
Performance: Traditionally faster than USB 2.0 for data transfer.
Replaced By: Thunderbolt (2011) and USB 3.0.
Last Mac with FireWire: 2016.
19
WHY FIREWIRE?
No Host Controller Required: Unlike USB, which follows a master-slave model, FireWire allows
peer-to-peer communication (e.g., a hard disk and a camera can exchange data without CPU
intervention).
Supports Dual Transfer Methods:
Asynchronous: Allocates 20% of the bus for standard data transfer.
Isochronous: Reserves 80% for real-time, time-sensitive data.
Guaranteed Bandwidth: Isochronous transfer ensures continuous data flow, ideal for real-time
applications like aircraft sensor data.
Full Duplex Communication: Unlike USB 2.0, which is half-duplex, FireWire supports full duplex
data transfer.
Direct Memory Access (DMA) Support: Allows direct data transfer to memory, but also introduces a
security risk (DMA attack).
Supports Up to 63 Devices: Uses a daisy-chain topology for multiple peripherals.
FIREWIRE 20
FireWire: 3 prongs
1. Data: High-speed transfer with both
asynchronous and isochronous modes, also
supports plug and play.
2. Power: 6-pin and 9-pin connectors can draw
power from the connected device.
3. Peer-to-Peer Communication: Devices can
communicate without a host controller, unlike
USB.
21
FIREWIRE: TECHNICALITIES
Encoding Scheme:
Data/Strobe Encoding (also called Alpha mode)
Uses two NRZ signals (Data & Strobe) for high-reliability transmission.
Strobe Signal = XOR of data and clock.
At the receiver: Clock is recovered by XORing data & strobe, eliminating the need for a separate clock
line.
Enables synchronization, peer-to-peer communication, and isochronous data transfer.
Arbitration Mechanism:
Manages device access to the bus in 125 µs cycles.
The root node (nearest device) sends a cycle start packet.
All devices respond; the closest wins and gains control of the bus.
Other devices take turns in 125 µs slots, with isochronous transfers getting priority.
22
FIREWIRE: STANDARDS
IEEE 1394 (FireWire 400) IEEE 1394b (FireWire 800)
Speeds: 100/200/400 Mbit/s (S100, S200, Apple’s 9-conductor connector introduced.
S400). Speed: Almost 800 Mbit/s.
Cable Length: Up to 4.5 meters. Introduced a new beta mode encoding.
Can be daisy-chained up to 72 meters using FireWire S800T
repeaters. Speed: 800 Mbit/s.
Power Consumption: 7-8W, usually 25V, but FireWire S1600 & S3200
Apple’s connector used 9V. Speed:
Connector: 6 conductors. S1600: 1.57 Gbit/s
IEEE 1394a S3200: 3.14 Gbit/s
Improvement over the earlier version and
standardized as i.LINK.
Connector: 4 conductors, commonly used in
cameras and PCs.
23
USB
USB stands for Universal Serial Bus
Robust and widely used communication standard for connecting peripherals like keyboard and
mouse to a host system
Designed for ease of use with features like hot-plugging
Provides power and data transfer over the same cable, reducing the need for external power supplies.
Multiple versions of USB
USB 1.1 (12 Mbps)
USB 2.0 (480 Mbps)
USB 3.0+ (SuperSpeed) (5-40 Gbps in USB 4.0).
It is also backward compatible.
24
USB TRANSACTION TYPES
Control Transfers
Used for sending commands to the device, make inquiries, and configure the device.
Interrupt Transfers
Used for sending small amounts of bursty data that requires a guaranteed minimum latency.
Bulk Transfers
Used for large data transfers that use all available USB bandwidth with no guarantee on transfer
speed or latency.
Isochronous Transfers
Like synchronous, it guarantees a consistent data transfer rate.
Like asynchronous, it does not require a strict clock signal between sender and receiver.
Isochronous transfers are capable of this guaranteed delivery time due to their guaranteed
latency, guaranteed bus bandwidth, and lack of error correction. Without the error correction,
there is no halt in transmission while packets containing errors are resent.
25
USB PACKET TYPES
1. Token packets
Initiate transaction
Identify device involved in transaction
Always sourced by the host
2. Data packets
Delivers payload data
Sourced by host or device
3. Handshake packets
Acknowledge error-free data receipt
Sourced by receiver of data
4. Special packets
Facilitates speed differentials
Sourced by host-to-hub devices
Pulchowk Campus | 2025
THANK YOU