Embedded Systems & Firmware

Which comparison of UART, SPI and I2C is correct?

  1. AI2C suits many devices on few wires, SPI suits high speed, and UART suits simply linking two devices
  2. BAll three always use a clock wire
  3. 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.
Practice this topic Back to topic

More Embedded Systems & Firmware questions

  1. What is the difference between polling and interrupts as ways to learn a peripheral's status?
  2. Which describes the "super loop" structure often seen in microcontroller programs without an OS?
  3. What is the main purpose of using an RTOS (real-time operating system) in embedded devices?
  4. In a preemptive RTOS, while a low-priority task is running, a high-priority task receives the data it was waiting for and becomes ready. What generally happens?
  5. Which describes priority inversion in an RTOS?