Serial Communication Explained: UART, SPI, and I2C
Feb 14, 2026
9 min read
Serial Communication Explained: UART, SPI, and I2C
Microcontrollers need to talk to sensors, displays, and other devices. They do this using serial communication protocols—standardised ways of sending data one bit at a time over wires. The three most common protocols in electronics projects are UART, SPI, and I2C.
Quick Comparison
| Feature | UART | SPI | I2C |
|---------|------|-----|-----|
| Wires needed | 2 (TX, RX) | 4 (MOSI, MISO, SCK, CS) | 2 (SDA, SCL) |
| Speed | Up to 115200 baud (typical) | Up to 10+ MHz | Up to 400 kHz (standard) |
| Devices | Point-to-point (1:1) | 1 master, many slaves | Many masters, many slaves |
| Addressing | None needed | Chip Select pin per device | 7-bit address per device |
| Best for | GPS, Bluetooth modules, Serial Monitor | Displays, SD cards, fast sensors | Sensors, EEPROMs, RTCs |
UART is the simplest protocol. Two devices exchange data over two wires: TX (transmit) and RX (receive). Cross-connect them: Device A's TX goes to Device B's RX, and vice versa.
Key Characteristics
Asynchronous: No clock signal. Both devices must agree on the same baud rate (e.g., 9600, 115200).
Point-to-point: Connects exactly two devices.
Full duplex: Can send and receive simultaneously.
Common Uses
Arduino Serial Monitor (USB-UART)
GPS modules (NEO-6M outputs NMEA sentences via UART)
Bluetooth modules (HC-05, HC-06)
GSM modules (SIM800L)
SPI (Serial Peripheral Interface)
SPI is faster than UART and I2C. It uses a clock signal (synchronous) and separate data lines for each direction.
Wiring
MOSI (Master Out Slave In): Data from master to slave
MISO (Master In Slave Out): Data from slave to master
SCK (Serial Clock): Clock signal from master
CS/SS (Chip Select): One per slave device (LOW = selected)
Key Characteristics
Synchronous: Clock signal ensures perfect timing.
Fast: 1–10+ MHz typical. Great for displays and SD cards.
Multiple slaves: Each needs its own CS pin. Uses more GPIO pins.
Common Uses
TFT/OLED displays
SD card modules
RFID readers (MFRC522)
High-speed sensors (accelerometers)
I2C (Inter-Integrated Circuit)
I2C uses only two wires for communication, regardless of how many devices are connected. Each device has a unique 7-bit address.
Wiring
SDA (Serial Data): Bidirectional data line
SCL (Serial Clock): Clock signal from master
Both lines need pull-up resistors (4.7kΩ to VCC). Many breakout boards include these.
Key Characteristics
Two-wire bus: Many devices share the same two wires.
Addressed: Each device has a unique address (e.g., OLED at 0x3C, RTC at 0x68).