Engineering and procurement guide

I2C vs SPI vs UART: Which Serial Interface Should You Choose?

Choose I²C when several low- or medium-rate peripherals can share two board-level lines, SPI when a short on-board link needs predictable higher throughput, and UART when two endpoints need an asynchronous connection. Do not freeze the choice until voltage levels, payload and deadline, device count, bus loading, cable environment, framing, and software support are known.

There is no universal winner. One controller can use all three for different jobs, and a link that leaves the PCB needs a separate physical-layer decision.

Technical sources reviewed September 5, 2026. Worked examples are transparent calculations, not measured product benchmarks or customer results.

SparkFun BME280 breakout board with separate labeled I2C and SPI connection pads
One sensor, two possible interfaces: a SparkFun BME280 breakout. Board circuitry and voltage limits must be checked separately from the bare sensor. Photo: SparkFun / Wikimedia Commons, CC BY 2.0. Display resized; image unchanged.

Which Interface Fits Your Transfer, Wiring, and Device Count?

The most useful comparison begins with a task: read several sensors, update a display, or exchange commands with a module. Wire count and advertised speed are supporting details—not the whole requirement.

Baseline: ordinary bidirectional I²C, conventional four-wire SPI, and logic-level UART
Decision factorI²CSPIUART
ClockShared SCL lineShared SCLK lineNo separate clock line
Basic signal linesSDA and SCLClock, two data lines, and chip selectTX and RX for two-way communication
Device selectionAddress on a shared busUsually a separate CS per peripheralNormally one endpoint at each end
Data directionOne direction at a time on shared SDASeparate data lines can shift simultaneouslySeparate TX/RX can operate simultaneously
Speed limitDefined modes; every device must support the selected modeDevice and controller timing limitsSupported baud rate and clock accuracy
Main integration costAddresses, pull-ups, and bus loadingRouting, chip selects, and transaction timingFraming, buffering, and application messages
Typical starting pointSmall sensor or configuration transfersMemory, displays, and converter dataCommands, diagnostics, and module links

Scroll wide tables and diagrams sideways on smaller screens.

Signal counts exclude power, ground, interrupts, reset, and optional flow-control lines. With several SPI peripherals, extra chip selects often increase the total pin count. Specialized variants can change the basic wiring.

I²C means Inter-Integrated Circuit; SPI means Serial Peripheral Interface; UART means Universal Asynchronous Receiver/Transmitter. UART describes transmission/reception hardware and asynchronous character framing, not a complete application messaging standard.

Before choosing, answer four questions

  • How many useful bytes must move, and by what deadline?
  • How many devices must share the connection?
  • Which interfaces, pin combinations, and voltage levels do the exact parts support?
  • Is the connection on one PCB, inside an enclosure, or on an external cable?
Decision gates: recommendation, evidence, and stop boundary
Starting conditionRecommended starting pointEvidence requiredStop before approval if
Several small on-board transfers can share two linesI²CAddress map, supported mode, pull-up range, calculated and measured rise timeAn address collision, stuck-bus behavior, or completed-bus timing is unresolved
A short on-board transfer has a tight deadlineSPIFull transaction budget, CPOL/CPHA, bit order, CS timing, and unselected-output behaviorThe rate is only an MCU capability, or peripheral timing and signal integrity are unverified
Two endpoints exchange commands or diagnostics without a clock lineUARTFrame format, actual baud tolerance, peak burst, buffer margin, message validationVoltage/inversion, flow control, or message boundaries are undefined
The connection leaves the PCB or enclosureSelect the physical layer firstDistance, topology, cable, ground difference, interference, protection, and isolation needsBare logic-level pins are being treated as an RS-232/RS-485 or long-cable interface

When Is I2C the Better Choice?

I²C uses serial data, SDA, and serial clock, SCL. The controller addresses a target, then reads or writes data. The ordinary bus uses pull-ups: devices pull a line low or release it, rather than actively driving a shared high level.

Simplified shared I2C bus One controller and two targets share the SDA and SCL lines, which have pull-up resistors to the bus supply. Controller initiates transfer SDA SCL VDD Target A · 0x76 Target B · 0x77
Simplified topology: several addressed targets share SDA and SCL, with pull-ups to the bus supply. Power, ground, and timing details are omitted. Drawn for this guide from the bus structure defined in NXP UM10204.

A byte slot includes a ninth clock for acknowledgment. That ACK helps control the transaction; it is not a checksum proving the complete message is correct. Register reads may first require a pointer write and a repeated START. Follow the target's sequence, as explained in TI's I²C bus guide.

Which I2C mode can every device and the completed bus support?

NXP's UM10204 specification defines Standard-mode up to 100 kbit/s, Fast-mode up to 400 kbit/s, Fast-mode Plus up to 1 Mbit/s, and High-speed mode up to 3.4 Mbit/s. The separate 5 Mbit/s Ultra Fast-mode is unidirectional, not the ordinary bidirectional bus discussed here.

Check the controller and every target before selecting a mode. Also verify clock-stretching support, timeouts, arbitration if multiple controllers are used, and recovery when a device holds a line low.

Real device, illustrative integration decision

What happens when three BME280 sensors share one segment?

Bosch's BME280 datasheet specifies I²C addresses 0x76 or 0x77, selected through SDO. CSB also selects the interface: pulling it low activates SPI and disables I²C until the next power-on reset.

Imagine three independently readable BME280 sensors on one I²C segment with fixed address-pin wiring. The third sensor cannot receive a third unique address from those two choices. Compare a bus multiplexer, another controller bus, or SPI with individual chip selects.

This is an illustrative decision based on published device behavior, not a customer incident. The lesson is to approve the address map and startup pin states before buying the sensor quantity or freezing the PCB.

For several slow sensors, I²C remains a sensible starting point. But “two signal lines” does not mean unlimited expansion. Add up bus capacitance, check devices that may be unpowered, and document whether the software API expects a 7-bit address or a shifted address byte.

When Is SPI the Better Choice?

Conventional SPI has a clock, an outgoing data line, an incoming data line, and chip select. MOSI carries controller-to-peripheral data; MISO carries data back. Device-relative labels such as SDI and SDO require extra care: connect outputs to the intended inputs, not merely matching names.

Simplified four-wire SPI link A controller connects to one peripheral with SCLK, controller-to-peripheral data, peripheral-to-controller data, and active-low chip select. Controller selects the peripheral Peripheral follows clock and CS SCLK · clock MOSI · controller data out MISO · peripheral data out CS̅ · active-low select
Simplified conventional four-wire SPI link. Separate data paths allow simultaneous shifting; power, ground, and timing details are omitted. Drawn for this guide from Analog Devices' SPI introduction.

A controller commonly shares clock and data lines while giving each peripheral its own CS. Check that unselected devices release the shared return-data line. Otherwise, outputs may contend. Full-duplex shifting also does not mean both directions carry useful application data throughout every transaction.

Which SPI timing details must match?

Clock polarity, CPOL, defines the idle clock level. Clock phase, CPHA, defines whether sampling uses the first or second edge relative to that idle level.

Conventional SPI mode mapping
ModeCPOL / idleCPHA / sampleSampling edge
00 / low0 / first edgeRising
10 / low1 / second edgeFalling
21 / high0 / first edgeFalling
31 / high1 / second edgeRising

The mapping follows ADI's SPI introduction. Also match bit order, word length, command format, dummy clocks, and CS setup/hold requirements. Some parts need CS active across a complete command; others use a transition to latch data. ADI AN-1248 explains why the mode number alone is insufficient.

There is no universal SPI clock ceiling. Three-wire operation, daisy chaining, and dual/quad transfers need explicit hardware support; do not infer them from an “SPI” label.

Illustrative transfer-budget example

Can a 4,096-byte display update meet a 5 ms deadline?

Assume a display update sends 4,096 payload bytes over a conventional single-data-line SPI path at 8 MHz. Payload alone takes 4.096 ms. A 5 ms deadline leaves only 0.904 ms for commands, gaps, scheduling, and any competing bus traffic.

This is arithmetic, not a measured display benchmark. Before selecting a faster part, inspect whether the driver sends one efficient burst or many small transfers with pauses.

When Is UART the Better Choice?

A UART sends framed characters without a separate clock wire. For a common non-inverted logic-level connection, one endpoint's TX connects to the other's RX, and vice versa, with compatible voltage levels and a suitable common reference.

The endpoints must agree on baud rate, data bits, parity, and stop bits. 8N1 means eight data bits, no parity, and one stop bit. Adding the start bit gives ten bit periods per character. Both endpoints' actual clock accuracy matters; there is no universal baud-error allowance for every UART implementation.

Simplified 8N1 UART character frame The line idles high, sends one low start bit, eight data bits, and one high stop bit. One 8N1 character = 10 bit periods Idle1 Start0 8 data bitsD0 · D1 · D2 · D3 · D4 · D5 · D6 · D7 Stop1 Idle1 Receiver samples at the agreed baud rate
Simplified 8N1 character frame: idle high, one start bit, eight data bits, no parity, and one stop bit. Drawn for this guide from Analog Devices' UART guide.

UART is convenient for diagnostic logs and modules that already provide serial commands. However, character framing does not define where an application message ends. Agree on length fields or delimiters, response timeouts, and handling for incomplete or invalid messages. See ADI's UART framing guide.

Can the receiver handle the peak burst?

A communications module might send a short command response during setup, then a much larger unsolicited burst during normal operation. The receiver needs enough buffering and timely software service for the peak traffic—not just the average rate.

RTS/CTS hardware flow control can help when both ends support and configure it, but it adds signal lines. It does not replace an application acknowledgment or recovery policy. Parity detects only certain errors; it is not an end-to-end integrity guarantee. Use the protocol's required checksum or CRC, plus appropriate retry and validation rules.

How Much Useful Throughput Will the Transfer Actually Deliver?

Clock rate counts signaling opportunities. Payload throughput counts useful data delivered. Addresses, commands, acknowledgments, framing, and pauses separate the two.

Clocked transfer time = clock cycles ÷ clock frequency
UART character time = bits per character ÷ baud rate

These expressions give signaling time in seconds when frequency or baud is expressed per second. Add conversion time, processing, idle gaps, bus contention, and response delay to estimate a complete operation.

Compare one explicitly defined transfer

Change the payload and rates to see the effect of overhead. These are hypothetical formats, not device benchmarks or a ranking of maximum interface speeds.

I²C SIGNALING

427.5 µs171 clock cycles

SPI SIGNALING

19 µs152 clock cycles

UART SIGNALING

1.389 ms160 bit periods

Calculated signaling time only. Use rates and transaction lengths supported by your actual devices.

  • I²C: 7-bit write address + one register-pointer byte + repeated START + read address + N payload bytes. Each byte slot has an ACK/NACK clock: 9 × (N + 3) clocks. START/STOP timing and clock stretching are excluded.
  • SPI: one command byte + two address bytes + N payload bytes, with no dummy clocks: 8 × (N + 3) clocks. CS setup/hold and pauses are excluded.
  • UART: N characters in 8N1: 10 × N bit periods. Request bytes, packet headers, checksums, and response delay are excluded.

At the default settings, the 16-byte I²C example uses 171 clocks; the SPI example uses 152 clocks; and UART uses 160 bit periods. Their different configured rates explain much of the time difference. Do not treat those numbers as measured performance of the BME280 or the bridge discussed below.

115,200 baud does not mean 115,200 payload bytes per second.Continuous 8N1 transmission has a calculated ceiling of 11,520 payload bytes/s before application overhead. A request/response exchange achieves less once the request, processing, and gaps are included.

For several slow sensors, compare total bus occupancy against the update interval. For a display or memory transfer, compare the full burst against the deadline. Leave time for other devices, retries, and scheduling variation; a calculation that uses the entire interval has no margin.

Which Electrical Limits Can Disqualify the Interface?

Check supply and I/O levels independently. A board's supply label does not prove that every interface pin tolerates that voltage, and a module may add circuitry that the bare IC does not contain. Check reset and unpowered states as well as normal operation.

How should I2C pull-ups be checked on the completed bus?

For a simple resistor-capacitance bus, the approximate 30%–70% rise time is:

Rise time ≈ 0.8473 × pull-up resistance × bus capacitance

Use ohms and farads to obtain seconds. The model and the opposing resistance limits are described in TI's I²C pull-up calculation note.

Illustrative electrical check

Will 4.7 kΩ meet Fast-mode rise time at 200 pF?

With 4.7 kΩ and 200 pF, the calculated rise time is about 796 ns. That exceeds the 300 ns Fast-mode limit. The bus can therefore fail a timing requirement even though the controller is correctly set to 400 kHz.

Reducing resistance improves rise time but increases low-state sink current. Check both limits, tolerances, and existing parallel pull-ups on attached modules. A calculated resistor range is not a substitute for checking the finished board.

This explains why adding another sensor or connector can change behavior without changing the firmware. For SPI and UART too, loading, ringing, return paths, and edge quality matter. A low average data rate does not necessarily mean slow electrical edges.

Use a logic analyzer to inspect decoded transactions. Use an oscilloscope to inspect voltage levels, slow rise times, ringing, and timing margins at the receiving pins. A decoder can show plausible bytes while the electrical margin remains poor.

What Physical Layer Is Needed When the Connection Leaves the PCB?

Logic-level UART is not RS-232. An RS-232 connection uses different electrical signaling and normally needs a suitable transceiver between the UART pins and the cable. A TX/RX label or familiar connector shape does not prove compatibility. See ADI's RS-232 explanation.

  1. 1 · Message behaviorCommands, addresses if needed, responses, timeouts, and error checks.
  2. 2 · UART framingBaud rate, data bits, parity, stop bits, and buffer handling.
  3. 3 · Electrical linkTransceivers at both ends, cable, topology, protection, and reference or isolation strategy.

RS-485 provides a differential electrical layer and can carry UART-framed traffic. It does not, by itself, define application commands or decide who may transmit. A two-wire half-duplex bus needs transmitter-direction control and an appropriate topology and termination strategy. TI's RS-485 design guide covers these physical-layer considerations.

If a module moves from the same PCB to another enclosure, revisit the link design even if its command set is unchanged. Ground differences, interference, connectors, protection, and isolation requirements may dominate the choice.

There is no universal maximum cable length for bare I²C, SPI, or logic-level UART. Buffers, differential links, and lower rates can change what is feasible, but a generic distance figure is not a qualified production limit.

When Should You Add an I2C- or SPI-to-UART Bridge?

Sometimes the controller has spare I²C or SPI capacity but no available UART. A bridge can add the missing function without changing the main processor. It also adds a buffer-service and driver requirement.

Published device capability + illustrative timing

Can an SC16IS750 buffer the actual traffic?

NXP's SC16IS750 exposes a UART through an I²C or SPI host interface, with 64-byte transmit and receive FIFOs. A FIFO is a first-in, first-out buffer.

At a hypothetical continuous 115,200-baud 8N1 input, 64 characters arrive in about 5.56 ms. This illustrates buffer capacity, not a guaranteed safe service interval: current occupancy, interrupt thresholds, host transfers, and flow control change the available margin.

The exact variant matters too. NXP specifies a 4 Mbit/s SPI limit for SC16IS750, versus 15 Mbit/s for SC16IS760. The earlier 8 MHz calculator example is therefore not a valid SC16IS750 setting.

Approve the bridge only after checking peak traffic, host-bus availability, driver support, startup configuration, and error handling. It is an active device with registers and timing requirements, not a passive cable adapter or an RS-232/RS-485 line driver.

What Should You Check Before Replacing a Suspect Interface IC?

Symptoms suggest checks; they do not establish a diagnosis
SymptomPossible causeFirst evidence to collect
I²C never receives an ACKAddress convention, interface-selection state, wiring, or power.Address pins, API format, startup state, and idle SDA/SCL levels.
I²C fails only at a higher rateRise time, loading, or unsupported timing.Measured waveforms and the limits of every attached device.
SPI values are shifted or inconsistentMode, bit order, CS timing, or command mismatch.A captured transfer compared with the device timing diagram.
SPI fails after adding a peripheralReturn-data contention or extra loading.Unselected output behavior, CS levels, and receiver waveforms.
UART text is unreadableBaud, frame format, inversion, or voltage mismatch.Settings at both ends and the actual electrical interface.
UART loses bytes during burstsOverrun, insufficient buffering, or slow service.Overrun flags, buffer occupancy, and flow-control behavior.

Save the failed transaction and record supply voltage, clock or baud settings, temperature, firmware revision, and attached devices. A replacement part is hard to evaluate when the failure conditions are not reproducible.

Also check reset defaults and pin multiplexing. A microcontroller family may advertise all three interfaces while a particular package or pin assignment prevents the combination your board requires.

What Must Engineering and Purchasing Verify Before Approving a Part?

“I²C sensor,” “SPI memory,” or “UART module” is not a complete purchasing specification. Include the conditions that make the component usable in your design.

  1. Exact identity and electrical fitManufacturer, full orderable part number, package, pinout, supply voltage, I/O levels, and temperature range.
  2. Interface role and variantController or target; conventional or three-wire SPI; UART framing, inversion if relevant, and hardware flow control.
  3. Device-selection and startup planAddress map or chip selects, mode-selection straps, reset behavior, and any interrupt or data-ready signals.
  4. Traffic and timing requirementsPayload size, update rate, peak burst, response deadline, transaction format, and supported clock or baud settings.
  5. Board, cable, and software constraintsWiring environment, transceivers, protection or isolation needs, register map, driver support, and MCU pin-multiplexing limits.
  6. Supply terms and alternate approvalQuantity, delivery schedule, lifecycle and traceability needs, and whether engineering-reviewed substitutes are permitted.
Interface compatibility is one gate in alternate-part approval
Approval questionEvidence to compareDecision
Is it electrically compatible?Absolute maximum ratings, operating supply, VIH/VIL, output drive, leakage, pull-up or load requirements, and power-off behaviorHold if any operating or fault-state limit is not covered
Is the transaction compatible?Address or chip-select behavior, register map, commands, CPOL/CPHA, bit order, word length, framing, and reset defaultsReject as drop-in if firmware or board changes are required but not approved
Will it meet the deadline?Supported rate at the stated voltage and load, payload overhead, conversion time, buffer depth, interrupts, and worst-case response timePrototype and measure when calculation alone cannot prove margin
Can supply and quality requirements be met?Full orderable MPN, package, lifecycle status, date/lot traceability, inspection plan, quantity, and delivery targetAccept only after engineering and quality evidence match the approved requirement

Two parts can share an interface name yet differ in register maps, reset states, pin functions, timing, or error behavior. Approve the full integration before treating an alternate as interchangeable. For order preparation and receiving requirements, review the YURUNOX purchasing process and quality-assurance information.

The practical choice is usually straightforward once these details are written down: I²C for a shared board bus that meets the load and address plan, SPI for a clocked transfer that meets the deadline, and UART for an endpoint link with suitable framing and an appropriate physical layer.

Turn the interface choice into a clear enquiry

Sourcing interface-compatible components?

Send YURUNOX the full MPN or required function, package, voltage levels, interface settings, quantity, and delivery target. If alternatives are acceptable, include the payload and timing requirements so proposals can be reviewed against the real design.

Discuss your component requirements →

Which Technical Sources Support These Selection Rules?

The worked examples are calculations, not measured performance or customer results. Use the current datasheet and operating conditions for the exact device before final design or alternate-part approval.

  1. NXP UM10204: I²C-bus specification and user manual — modes, transactions, arbitration, and electrical timing.
  2. TI SLVA704: Understanding the I²C Bus — addressing and acknowledgment.
  3. TI SLVA689: I²C Bus Pull-Up Resistor Calculation — rise time and sink-current limits.
  4. Analog Devices: Introduction to SPI Interface — signal directions and clock modes.
  5. Analog Devices AN-1248: SPI Interface — device-specific framing and timing.
  6. Analog Devices: UART—A Hardware Communication Protocol — asynchronous character and message framing.
  7. Analog Devices: Fundamentals of RS-232 Serial Communications — electrical signaling and transceivers.
  8. TI SLLA272D: The RS-485 Design Guide — differential physical-layer design.
  9. Bosch Sensortec: BME280 datasheet — I²C address choices and interface selection.
  10. NXP: SC16IS740/750/760 datasheet — bridge capabilities, buffers, and variant-specific limits.
Cart (0 items)