📡
Protocols

I2C vs SPI: When to Use Each Protocol

The two most common embedded communication protocols — how they work and when to use each.

February 18, 2025·6 min read
← All articles

I2C — Two Wires, Many Devices

  • SDA + SCL — just 2 wires regardless of device count
  • Each device has unique 7-bit address
  • Standard 100kHz, Fast 400kHz, Fast+ 1MHz
  • Requires pull-up resistors, half-duplex

SPI — Fast and Full Duplex

  • MOSI + MISO + SCK + CS per device
  • Typically 1-50MHz, some up to 100MHz+
  • Full duplex — send and receive simultaneously
  • One CS pin per device — uses more GPIO

Quick Decision Guide

  • Many devices, few pins → I2C
  • High speed (>1MHz) → SPI
  • Display, SD card → SPI
  • Sensor network → I2C
  • Maximum throughput → SPI

💡 Tip: Most designs use both. I2C for slow sensors and config registers. SPI for displays, fast ADCs, and storage.

📡

Ready to try it?

Free to use — no credit card required.

Try Code Generator