Embedded Systems & Firmware

What is a characteristic of I2C communication?

  1. AEach device needs a dedicated chip-select line
  2. BSeparate transmit and receive lines allow both directions at once
  3. CSeveral devices share two wires, clock (SCL) and data (SDA), and the partner is selected by address
Show answer and explanation

Answer: C. Several devices share two wires, clock (SCL) and data (SDA), and the partner is selected by address

I2C is synchronous serial communication that connects several devices with only two wires, SCL and SDA. The master first sends the partner's 7-bit address, and only the device with that address responds. The lines are open-drain, pulled up to 1 by resistors so any device can pull them low. It suits parts where few wires matter more than speed, such as temperature and acceleration sensors and EEPROMs.

  • A. That describes SPI.
  • B. I2C is half duplex, sharing one data line.
  • C. Correct. Few wires make it easy to attach many sensors.
Practice this topic Back to topic

More Embedded Systems & Firmware questions

  1. In I2C, how does the receiver of a data byte acknowledge it?
  2. You want to connect two identical I2C temperature sensors to the same I2C bus, but both have the same address. Which is a correct solution?
  3. Which comparison of UART, SPI and I2C is correct?
  4. What is the difference between polling and interrupts as ways to learn a peripheral's status?
  5. Which describes the "super loop" structure often seen in microcontroller programs without an OS?