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:

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

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

References
Backlinks
Notes that reference this page.
Connections
Direct relationships to this note.