Serial Communication Protocols
Serial Communication Protocols
For
SERIAL COMMUNICATION
By Shimi Cohen
Serial Communication Guide
Table of Contents
INTRODUCTION 3
ARCHITECTURE 8
1-WIRE PROTOCOL 11
UART PROTOCOL 14
I²C PROTOCOL 16
SPI PROTOCL 19
USB2.0 PROTOCOL 22
-2-
Serial Communication Guide
INTRODUCTION
Fundamentals
Digital communication transfers data as discrete voltage levels between electronic systems or devices,
revolutionizing hardware engineering by providing reliable, noise-resistant data transfer mechanisms. Unlike
analog transmission, digital methods use discrete voltage levels.
KEY CONCEPTS
REPRESENTATION TECHNIQUES
Non-Return to Zero (NRZ): Maintains voltage level for bit duration
SERIAL COMMUNICATION
Serial communication is the dominant method for transferring data between electronic devices. Unlike
parallel communication, which sends multiple bits at once across multiple lines, serial communication
transmits data one bit at a time over a single line or pair of lines, making it more efficient for long distances,
simpler board designs, and noise reduction.
It’s the backbone of everything from debugging tools to sensor networks and high-speed data.
At its core, serial communication protocols define how data is structured, synchronized, and verified during
transmission. They differ in speed, complexity, error handling, and physical layers. From simple byte-
streaming like UART to more complex protocols like USB or Ethernet, each protocol balances tradeoffs in
bandwidth, power, topology, and control. Understanding serial protocols is essential for designing,
debugging, and optimizing embedded systems.
-3-
Serial Communication Guide
Design Consideration
POWER EFFICIENCY
EMI/EMC CONSIDERATIONS
TRANSMISSIONS MODES
Simplex mode: communication occurs in only one direction — like a one-way street — where one device is
always the transmitter and the other is always the receiver, with no ability to respond.
Half-Duplex mode: allows two-way communication but only one direction at a time; devices must take turns
transmitting and receiving - only one person can speak while the other listens.
Full-Duplex mode: enables simultaneous two-way communication, allowing both devices to send and receive
data at the same time, much like a phone call. Full-duplex systems typically require more complex hardware
to manage the simultaneous flow of data but offer the fastest and most efficient data exchange.
-4-
Serial Communication Guide
SIGNAL CHARACTERISTICS
Push-Pull Configuration
Push-pull outputs use two transistors (NMOS and PMOS) to actively drive the signal high or low.
High-speed transitions between logic levels and low power consumption during idle states.
Ideal for protocols with dedicated lines for transmission (e.g., TX/RX in UART).
Unidirectional communication lines (e.g., SPI, UART), Common in SPI for clock and data lines.
Open-Drain Configuration
Open-drain outputs use a single transistor (NMOS) to pull the signal low, relying on external pull-up resistors
to achieve a high state. Slower transitions due to pull-up resistor size and bus capacitance, higher power
consumption during active transfers, bidirectional communication lines (e.g., I²C, 1-Wire).
Suitable for multi-device bus systems where multiple devices share the same line.
Common in I²C for SDA/SCL lines and in 1-Wire for data/power sharing.
-5-
Serial Communication Guide
Edge Detection Timing from signal transitions NRZ with sufficient transitions
SYNCHRONIZATION CHALLENGES
Start Delimiter Frame boundary identification UART start bit, USB SYNC
-6-
Serial Communication Guide
Common Terminology
Baud Rate Symbols per second
Clock Polarity (CPOL) Defines idle state of clock in SPI; affects how data is sampled.
Clock Phase (CPHA) Determines whether data is sampled on leading or trailing clock edge
Pull-Up Resistor Essential in I2C and 1-Wire to ensure bus lines return to high state.
Bus Arbitration Mechanism in I2C for multiple masters to safely share a single bus.
Start/Stop Condition Specific signal patterns that mark beginning/end of I2C or 1-Wire
CRC/Error Checking Methods used in USB and I2C to detect corrupted data
Addressing Scheme Unique device identification method (used in I2C and USB).
Open-Drain Output type that pulls low but leaves line floating high
Bus Contention Error caused when two devices drive the bus simultaneously
Enumeration USB process where host detects and assigns address to new device
-7-
Serial Communication Guide
ARCHITECTURE
Network Configurations
Network topology refers to the physical or logical arrangement of devices within a communication system,
significantly impacting performance, reliability, and scalability.
Bus All devices share BUS Easy to implement Contention, single POF
Star Devices connect to hub Easy fault isolation Hub failure affects all
Ring Devices form closed loop Built-in redundancy Complex recovery from failures
When implementing a specific topology, hardware engineers must consider the following:
IMPEDANCE-MATCHING TECHNIQUES
Series Termination: Resistor at source end absorbs reflections
-8-
Serial Communication Guide
Control Hierarchies
Control hierarchies establish the relationship between communicating devices.
MASTER-SLAVE ARCHITECTURE
Characteristic Description
PEER-TO-PEER ARCHITECTURE
Characteristic Description
MULTI-MASTER ARCHITECTURE
Multi-master systems combine elements of both approaches, allowing multiple devices to act as masters.
Characteristic Description
-9-
Serial Communication Guide
Synchronous protocols use a shared clock signal to coordinate data transmission and reception.
ASYNCHRONOUS COMMUNICATION
Asynchronous methods operate without a shared clock, using start/stop bits and agreed-upon baud rates.
- 10 -
Serial Communication Guide
1-WIRE PROTOCOL
Single -Wire Interface
Developed by Dallas Semiconductor (now Maxim Integrated), 1-Wire provides bidirectional communication
over a single data line plus ground reference.
1-WIRE PINOUT
PULL-UP RESISTOR
Parasitic Power: The 1-Wire interface often includes optional weak parasitic power. Master provides strong pull-up (≤1kΩ) during
specific operations and slaves can draw power from data line during inactive periods.
LAYOUT TOPOLOGIES
Linear Topology: Devices along single bus with short stubs
- 11 -
Serial Communication Guide
SPEED MODES
Write 0 Pull low for entire slot 60-120 μSec 6-12 μSec
Write 1 Pull low briefly, release 1-15 μSec low 1-2 μSec low
Read Bit Pull low briefly, sample Sample at 15 μSec Sample at 2 μSec
- 12 -
Serial Communication Guide
Device Addressing
Every 1-Wire device contains a globally unique 64-bit ROM registration number for addressing.
READ ROM 0x33 Reads 64-bit ROM code (single device only)
- 13 -
Serial Communication Guide
UART PROTOCOL
Hardware Implementation
UART (Universal Asynchronous Receiver/Transmitter) is a core serial communication method widely used in
embedded systems. While traditionally used for direct device-to-device links, modern systems often embed
UART inside other protocols to enhance compatibility or range. A common case is USB-to-UART bridges
(e.g., FTDI, CP210x), enabling UART over USB. This approach is known as protocol tunneling or
encapsulation. UART is also tunneled via Ethernet using serial-over-IP.
UART PINOUT
UART uses inverted logic, where the idle line is high (logic 1) and active state is low (logic 0). This setup
allows easy break detection and ensures clean synchronization during transmission.
RTS and CTS are optional flow control lines. While TX, RX, and GND are enough for basic UART operation,
adding RTS/CTS enhances reliability, especially in high-speed or buffered systems, by managing data flow
and preventing overruns.
- 14 -
Serial Communication Guide
Frame Structure
UART frames encapsulate data with specific control bits to ensure reliable transmission without a clock.
The standard configuration for modern systems is "8N1" (i.e., 8 data bits, no parity, 1 stop bit).
TIMING CONSIDERATIONS
Frame Time (1 + Data Bits + Parity + Stop Bits) × Bit Time Total transmission time
Baud Rate Error Difference between actual and nominal rates Causes framing errors above ~2%
- 15 -
Serial Communication Guide
I²C PROTOCOL
Two -Wire Interface
Inter-Integrated Circuit (I²C) provides a simple, low-speed, two-wire interface.
I²C PINOUT
Mode Max Clock Frequency Rise Time (max) Fall Time (max)
- 16 -
Serial Communication Guide
I²C SEQUENCE
START Condition SDA transitions high-to-low while SCL high Master → All
STOP Condition SDA transitions low-to-high while SCL high Master → All
ACK Receiver pulls SDA low during 9th clock pulse Receiver → Transmitter
NACK Receiver leaves SDA high during 9th clock pulse Receiver → Transmitter
I²C PACKET
MULTI-MASTER ARBITRATION
If the expected level differs from the actual level, arbitration lost
- 17 -
Serial Communication Guide
CLOCK STRETCHING
10-BIT ADDRESSING
GENERAL CALL
DEVICE ID
- 18 -
Serial Communication Guide
SPI PROTOCL
Four -Wire Interface
Serial Peripheral Interface (SPI) provides high-speed, full-duplex communication between a master and
multiple slave devices.
SPI PINOUT
Unlike I²C, SPI uses push-pull drivers for all signals, enabling faster speeds without pull-up resistors
ELECTRICAL CHARACTERISTICS
- 19 -
Serial Communication Guide
SPI Configurations
SPI supports multiple slave devices using different wiring configurations.
DAISY-CHAIN CONFIGURATION
Advantages: Uses only one CS line, Simplified routing, Good for distribution systems
Disadvantages: Increased latency, Complex data handling, all devices must use same protocol
Devices connected in series with data propagating through chain as followed:
QUAD SPI
Quad SPI (QSPI) is an enhanced version of SPI that boosts bandwidth by using four data lines (IO0–IO3)
instead of just one (MOSI). While standard SPI transmits 1 bit per clock, QSPI can transmit 4 bits per clock
cycle, effectively quadrupling the data rate without increasing the clock speed. This makes it ideal for high-
speed memory access, like reading from NOR flash in embedded systems. QSPI maintains the same clock
and chip select lines as SPI but shifts into higher bit modes after an initial command phase, offering
backward compatibility with standard SPI devices.
- 20 -
Serial Communication Guide
SPI offers four operating modes based on clock polarity (CPOL) and phase (CPHA) settings.
0 0 0 Low Rising
1 0 1 Low Falling
2 1 0 High Falling
3 1 1 High Rising
- 21 -
Serial Communication Guide
USB2.0 PROTOCOL
Physical Layer and Speed Grades
Universal Serial Bus (USB) provides a standardized interface for connecting peripherals to host systems.
USB PINOUT
- 22 -
Serial Communication Guide
Enumeration Process
USB enumeration allows the host to identify and configure connected devices.
ENUMERATION STEPS
DEVICE CLASSES
- 23 -
Serial Communication Guide
Transfer Types
USB supports four transfer types for different communication requirements.
CONTROL TRANSFERS
BULK TRANSFERS
INTERRUPT TRANSFERS
ISOCHRONOUS TRANSFERS
- 24 -