Embedded Systems & Firmware
Which comparison of UART, SPI and I2C is correct?
- AI2C suits many devices on few wires, SPI suits high speed, and UART suits simply linking two devices
- BAll three always use a clock wire
- CAll three select devices by address
Show answer and explanation
Answer: A. I2C suits many devices on few wires, SPI suits high speed, and UART suits simply linking two devices
UART links two devices asynchronously without a clock, with simple wiring and software. SPI is synchronous with a clock and chip selects, enabling tens of MHz, but each added device needs another CS line. I2C connects many devices on two wires but, being open-drain, runs at a few hundred kHz to a few MHz. The choice depends on what the parts support, the speed needed and the wire count.
- A. Correct. They are chosen to fit the use.
- B. UART uses no clock wire.
- C. Only I2C selects by address.