Basics of the I2C Communication Protocol

So far, we’ve talked about the basics of SPI communication and UART communication, so now let’s go into the final protocol of this series, the Inter-Integrated Circuit, or I2C.

You’ll probably find yourself using I2C if you ever build projects that use OLED displays, barometric pressure sensors, or gyroscope/accelerometer modules.

Basics of the I2C Communication Protocol

I2C combines the best features of SPI and UARTs. With I2C, you can connect multiple slaves to a single master (like SPI) and you can have multiple masters controlling single, or multiple slaves. This is really useful when you want to have more than one microcontrollers logging data to a single memory card or displaying text to a single LCD.

Like UART communication, I2C only uses two wires to transmit data between devices:

SDA (Serial Data) – The line for the master and slave to send and receive data.

SCL (Serial Clock) – The line that carries the clock signal.

I2C is a serial communication protocol, so data is transferred bit by bit along a single wire (the SDA line).

Like SPI, I2C is synchronous, so the output of bits is synchronized to the sampling of bits by a clock signal shared between the master and the slave. The clock signal is always controlled by the master.

For More Details: Basics of the I2C Communication Protocol

Scroll to Top
Read previous post:
C-BISCUIT: System Integration and Testing

Finally, we have everything we need for a functional robot. Let’s put the pieces together and see what the C-BISCUIT...