Communication Protocols · Interview question

You put two of the same sensor on an I2C bus and one doesn't respond. Why?

A strong answer

Almost certainly an address conflict: I2C devices are selected by address, not a chip-select line, and two identical chips ship with the same fixed 7-bit address, so they collide on the bus, both try to respond to the same address, corrupting the transaction, and effectively you can't talk to them independently. The fixes depend on the chip: many I2C devices have one to three address-select pins you tie high or low to choose among a small set of addresses, so you give each sensor a different address; if the chip has no selectable address (or you need more copies than it allows), you put them on separate I2C buses, or use an I2C multiplexer/switch (like a TCA9548A-style part) that gates each device onto the shared master bus one at a time. The general lesson is that I2C's two-wire elegance comes with a finite address space and no per-device select, so device-address planning is part of the design, unlike SPI, where you'd just add another chip-select line. Before blaming hardware, confirm the two devices' configured addresses actually differ.

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

I2C

Many devices on two wires: open-drain SDA/SCL with pull-ups, 7-bit addressing, ACK/NACK handshaking, clock stretching, and why a missing pull-up is the classic I2C failure.

More I2C questions

Browse all 472 interview questions
You put two of the same sensor on an I2C bus and one doesn't respond. Why? | EmbeddedPrep.io