← All articles
SPII2CUARTInterfacesInterview

SPI, I²C and UART Interview Questions: Timing and Debugging

Understand SPI, I²C and UART interview questions through explicit timing, framing, acknowledgment and debugging examples.

November 23, 2026·3 min read

SPI, I²C and UART connect digital devices, but their clocking, framing and electrical assumptions differ. The best interview answer identifies both protocol rules and what can be observed on the wires.

Q1. How does SPI mode 0 sample data?

Mode 0 has CPOL=0 and CPHA=0: the clock idles low and data is sampled on the leading rising edge. The transmitter must satisfy setup and hold around that edge. Chip select frames the transfer; bit order and word size depend on the devices and configuration.

SCK:    ___|‾‾‾|___|‾‾‾|___
           ↑       ↑
         sample  sample

The vertical markers identify the rising transitions. This is an idealized clock-only sketch; data must be stable around each sampling edge.

Follow-up: A CPHA mismatch can shift sampling to the wrong edge. Check the actual device timing diagram rather than inferring timing from mode number alone.

Q2. How does I²C signal an acknowledgment?

After eight data bits, the transmitter releases SDA for the ninth clock. The receiver pulls SDA low for ACK; a high SDA at the sampling time is NACK. Pull-ups raise the open-drain bus when no device drives it low.

Q3. When can I²C SDA change?

For ordinary data bits SDA is stable while SCL is high and may change while SCL is low. START and STOP are exceptions: SDA changes while SCL is high. Multi-controller arbitration and clock stretching require additional checks.

Q4. What is in an 8N1 UART frame?

An idle-high UART line carries one low start bit, eight data bits and one high stop bit; no parity bit is present. Standard asynchronous UART transmits the least significant data bit first. At an ideal 9600 baud, ten bit periods take approximately 1.042 ms, excluding idle gaps.

For byte 0x41, the transmitted data-bit order is 1 0 0 0 0 0 1 0. The receiver must agree on baud rate and framing.

Q5. Can you identify a protocol from a short trace?

Not always. A clock and data line may resemble SPI or I²C depending on chip-select, electrical behavior and framing. Ask for idle levels, transaction boundaries, sampling edges and additional traces before claiming a unique answer.

Q6. How would you debug a missing response?

Check power, reset, ground and voltage compatibility; confirm pin configuration and wiring; then compare the observed transaction with the device specification. For I²C inspect address format and ACK; for SPI check select polarity and CPOL/CPHA; for UART check baud and framing.

Q7. Why are pull-ups important on I²C?

They return the open-drain bus to a high level. The resistance and bus capacitance affect rise time; use the devices' electrical limits and bus requirements to choose values. An idealized digital trace alone does not verify analog rise time.

Q8. What are the trade-offs?

I²C supports addressed devices on a shared bus; SPI typically uses separate select lines and is full duplex; UART is asynchronous and commonly used point-to-point. Actual speed, pin count and distance depend on the implementation and electrical environment.

See also embedded firmware interview questions and FPGA engineer interview questions.

Practice hardware interview questions

Explore ChipPrep's existing Practice experience.