Elio Saade
Note

I2C

Topics: Embedded Systems

Overview

Inter-Integrated Circuit (I2C) is a synchronous, two-wire, master-slave, serial communication protocol used to connect low-speed peripheral chips, sensors and displays to microcontrollers.

Here is a summary of the characteristics of I2C:
I2C_Characteristics.png

Interface

I2C uses 2 shared wires for communication across all the devices on the bus. This way, the communication is bidirectional and half-duplex, i.e. one device is sending data on the bus at a time.

The 2 lines are:

  • SCL (serial clock): which is the line for the clock signal
  • SDA (serial data): which is the line to send and receive data

I2C_Connection.png

One of the features of I2C is that multiple controllers/masters can be connected on the same bus.

Communication Procedure

Reference (1) contains a step by step view of the communication procedure, no need to repeat everything here. Briefly:

  • each slave is assigned a 7-bit or 10-bit address.
  • to start communication, the master sends a start condition, followed by the address of the target device and a read/write bit
  • the device with the correct address acknowledges by ending ACK bit
  • the master sends data on the line or waits for data from the slave
  • after each data frame is sent/received, the receiving device sends and ACK bit
  • to stop data transmission, the master sends a stop condition

I2C_Message.png

References

  1. https://www.circuitbasics.com/basics-of-the-i2c-communication-protocol/
  2. https://www.ti.com/lit/an/sbaa565/sbaa565.pdf?ts=1789914097054&ref_url=https%253A%252F%252Fwww.google.com%252F

Connections

Direct relationships to this note.