I2C vs SPI vs UART: Differences and When to Use Each
Updated: November 12, 2026
These are the three serial interfaces you meet first in embedded systems. UART is a simple point-to-point link with no shared clock. SPI is a fast, four-wire bus where one master selects each device with a chip-select line. I2C is a two-wire bus where many devices share the same lines and are picked by address. The trade-off is mostly between speed (SPI), pin count (I2C) and simplicity (UART).
Aspect
UART
SPI
I2C
Wires
Two signal wires (TX and RX) plus ground
Three shared signal wires (SCLK, MOSI, MISO) plus one chip-select (CS) per device
Two shared wires (SDA and SCL) plus ground, with pull-up resistors
Clock
Asynchronous: no clock line, so both sides must agree on the baud rate
Synchronous: the master drives a clock
Synchronous: the master drives a clock
Topology
Point to point between two devices
One master and several slaves, each slave needing its own CS line
Several masters and slaves share one bus
Addressing
None
Chip-select line selects the device
7-bit address (10-bit optional) sent at the start of each transfer
Figures are typical orders of magnitude and vary by process generation and product.
When to use which
UART
When you need the simplest possible link between two devices, a debug console or a module with a serial interface.
SPI
When you need speed: memory, displays, fast converters. The price is more pins as you add devices.
I2C
When you have many slow devices and few pins: sensors, small memories, configuration registers. Speed is limited and pull-up resistors are required.
FAQ
Which is faster, I2C or SPI?
SPI. It often runs at 1 to 50 MHz or more, while I2C runs at 100 kHz to 1 MHz in common modes, and 3.4 MHz in high-speed mode.
Why does I2C need pull-up resistors?
I2C devices only pull the lines low and release them to go high, so resistors pull the lines up. This lets many devices share two wires safely.
Do UART devices need a clock line?
No. UART is asynchronous, so both sides must be set to the same baud rate. A small baud-rate mismatch can garble characters.
How many pins does SPI need for many devices?
SPI needs shared SCLK, MOSI and MISO lines plus one chip-select pin per device, so the pin count grows with the number of devices. I2C needs only two pins regardless of the number of devices.
AThe sender drives a clock wire, and the receiver samples data with that clock
BNo clock wire is used; both sides agree on a communication speed (baud rate), and a start bit marks each character
CMany devices share one wire and are selected by address
Show answer and explanation
Answer: B. No clock wire is used; both sides agree on a communication speed (baud rate), and a start bit marks each character
A UART communicates asynchronously over two wires, transmit and receive (plus ground). The line idles at 1; a 0 start bit marks the beginning of a character, followed by the data bits and a 1 stop bit at the end. No clock is sent, so both sides must be configured for the same speed, such as 115200 bps. UARTs are commonly used for debug output and for connecting GPS and radio modules.
AIt is asynchronous without a clock, using only two wires
BIt is synchronous with the master driving the clock, sends and receives simultaneously, and selects devices with chip-select lines
CIt selects devices by address, so two wires suffice for any number of devices
Show answer and explanation
Answer: B. It is synchronous with the master driving the clock, sends and receives simultaneously, and selects devices with chip-select lines
SPI is synchronous communication in which, on the clock driven by the master, data flows simultaneously on a master-to-slave line and a slave-to-master line. Each device gets its own chip-select (CS) line, and only the device whose CS is pulled low communicates. Its simplicity allows clocks of tens of MHz, so it often connects fast parts such as flash memory, displays and ADCs.
BSeparate transmit and receive lines allow both directions at once
CSeveral devices share two wires, clock (SCL) and data (SDA), and the partner is selected by address
Show answer and explanation
Answer: C. Several devices share two wires, clock (SCL) and data (SDA), and the partner is selected by address
I2C is synchronous serial communication that connects several devices with only two wires, SCL and SDA. The master first sends the partner's address (usually 7 bits), and only the device with that address responds. The lines are open-drain, pulled up to 1 by resistors so any device can pull them low. It suits parts where few wires matter more than speed, such as temperature and acceleration sensors and EEPROMs.
A circuit for asynchronous serial communication without a clock wire, in which both sides agree on a baud rate and characters are framed by start and stop bits.
Serial Peripheral Interface: synchronous serial communication in which data is exchanged in both directions on a master-driven clock, with devices selected by chip-select lines. Used for fast parts.
A synchronous serial bus connecting several devices on two wires, clock (SCL) and data (SDA), selecting the partner by address. The lines are open-drain with pull-ups.
General-purpose input/output: microcontroller pins that software can configure as inputs or outputs, used for reading switches, lighting LEDs and so on.
This page was drafted with AI and fact-checked by a separate AI review before publication. Our Editorial policy explains how we write and check content. If you spot an error, please tell us on our Contact page.