Communication Protocols · Interview question

How does pin count scale differently across the three buses as you add devices?

A strong answer

Very differently, and it often decides the design. I2C is flat: all devices share the same two lines (SDA, SCL), and selection is by address, so going from 2 devices to 10 adds zero pins (only address space, which is finite). SPI grows by one pin per device: SCLK, MOSI, and MISO are shared, but each slave needs its own chip-select, so N slaves cost N CS GPIOs on top of the three shared lines. UART is inherently point-to-point, one TX/RX pair links exactly two endpoints, so N modules need N UART peripherals (or external muxing), and MCUs have a limited number of UART instances. So on a pin-constrained MCU, I2C scales best for many devices, SPI is fine for a handful, and UART doesn't multi-drop at all. This scaling behavior is frequently the deciding factor when speed isn't critical, because pins (and peripheral instance counts) are a hard resource on small MCUs.

What a weak answer sounds like

You know the answer. Do you know what gets you dinged?

Pro breaks down the answer most candidates actually give to this question — and the specific reason an interviewer marks it down. It’s the difference between sounding correct and sounding senior, on all 472 questions.

From the lesson

Choosing UART, SPI, or I2C

A side-by-side comparison and a decision framework: pick by speed, device count, pin budget, and distance, and know when none of the three fits and you need CAN or RS-485.

More Choosing UART, SPI, or I2C questions

Browse all 472 interview questions
How does pin count scale differently across the three buses as you add devices? | EmbeddedPrep.io