Table of Contents

Overview
#

Serial communication protocols are fundamental to modern electronics, enabling data transfer between devices. This guide covers eight major protocols, their characteristics, and applications.

Protocol Comparison
#

ProtocolYearSpeedDistanceWires
RS-2321960s115.2 kbps15m3-9
RS-485198310 Mbps1200m2 (diff)
I2C19823.4 MbpsOn-chip2
SPI1980s~50 MHzOn-board4+
UART1960s115.2 kbpsvaries2
USB199640 Gbps5m4
FireWire1995800 Mbps4.5m6
CAN19831 Mbps40m2

RS-232 (1960s)
#

Purpose
#

Developed for computer-terminal and modem communication.

Characteristics
#

  • Maximum speed: 115.2 kbps
  • Maximum distance: 15 meters
  • Voltage levels: plus/minus 3V to 15V
  • Point-to-point connection

Signal Pins
#

PinSignalDirection
TxDTransmit DataDTE to DCE
RxDReceive DataDCE to DTE
GNDGround-
RTSRequest to SendDTE to DCE
CTSClear to SendDCE to DTE

RS-485 (1983)
#

Purpose
#

Long-distance, multi-device industrial communication.

Specifications
#

  • Maximum speed: 10 Mbps
  • Maximum distance: ~1200 meters
  • Differential signaling for noise immunity
  • Multi-drop topology (up to 32 devices)

Voltage Levels
#

$$ V_{differential} = V_A - V_B $$
LogicVoltage
1V_A - V_B > +200mV
0V_A - V_B < -200mV

I2C (1982)
#

Purpose
#

Inter-IC communication developed by Philips for simple on-chip connectivity.

Specifications
#

  • Two wires: SDA (data) and SCL (clock)
  • 128 addressable devices (7-bit addressing)
  • Speed modes: 100 kbps, 400 kbps, 1 Mbps, 3.4 Mbps
  • Master-slave architecture

Speed Modes
#

ModeSpeed
Standard100 kbps
Fast400 kbps
Fast Plus1 Mbps
High Speed3.4 Mbps

SPI (1980s)
#

Purpose
#

Developed by Motorola for high-speed synchronous communication.

Specifications
#

  • Four wires: SCLK, MOSI, MISO, SS
  • Full-duplex communication
  • Speeds up to tens of MHz
  • No addressing (chip select lines)

Signal Functions
#

SignalFunction
SCLKSerial Clock
MOSIMaster Out, Slave In
MISOMaster In, Slave Out
SS/CSSlave Select / Chip Select

SPI Modes
#

ModeCPOLCPHADescription
000Sample on rising edge
101Sample on falling edge
210Sample on falling edge
311Sample on rising edge

UART (1960s)
#

Purpose
#

Asynchronous serial interface for bidirectional communication.

Specifications
#

  • Asynchronous (no clock line)
  • Common speeds: 9600, 115200 baud
  • Start/stop bits for synchronization
  • Optional parity bit

Baud Rate Calculation
#

$$ \text{Bit Time} = \frac{1}{\text{Baud Rate}} $$

At 115200 baud: Bit Time = 8.68 microseconds

USB (1996)
#

Purpose
#

Standardized peripheral interface for consumer electronics.

Version Evolution
#

VersionYearSpeed
USB 1.1199812 Mbps
USB 2.02000480 Mbps
USB 3.020085 Gbps
USB 3.1201310 Gbps
USB 3.2201720 Gbps
USB 4.0201940 Gbps

Features
#

  • Hot-pluggable
  • Power delivery (up to 240W with USB PD)
  • Tiered star topology
  • Automatic device enumeration

FireWire / IEEE 1394 (1995)
#

Purpose
#

Apple’s high-speed multimedia protocol for video and storage.

Specifications
#

  • FireWire 400: 400 Mbps
  • FireWire 800: 800 Mbps
  • Isochronous data transfer (guaranteed bandwidth)
  • Peer-to-peer communication
  • Hot-pluggable

CAN (1983)
#

Purpose
#

Bosch’s automotive communication protocol for vehicle networks.

Specifications
#

  • Maximum speed: 1 Mbps (CAN 2.0)
  • CAN FD: Up to 8 Mbps
  • Differential signaling
  • Multi-master architecture
  • Automatic error detection and retransmission

Arbitration
#

Priority-based arbitration using identifier:

$$ \text{Lower ID} \rightarrow \text{Higher Priority} $$

Protocol Selection Guide
#

ApplicationRecommended Protocol
Sensor readingI2C
High-speed displaySPI
Industrial controlRS-485, CAN
AutomotiveCAN, CAN FD
Consumer devicesUSB
Debug/consoleUART
Long distanceRS-485

Summary
#

Key considerations for protocol selection:

  1. Speed requirements: USB 4 > SPI > RS-485 > I2C
  2. Distance: RS-485 > CAN > RS-232 > others
  3. Complexity: USB > CAN > I2C > SPI > UART
  4. Multi-device: CAN, RS-485, I2C support multiple nodes
  5. Application domain: CAN for automotive, USB for consumer