Inter integrated circuit is a communication protocol developed by Philips semiconductor. Inter Integrated circuit is a communication protocol between ICs. It allows multiple slave units to communicate with master.
We have the question, why we need to go with I2C?
The main reason is, it has more features than SPI. It has the features of SPI and UART.
It allows many master chips to communicate with slave chips. And there is no need for many wires, the communication is just done with two wires.
There are two signal used for communication
DA (Serial Data) – The line for the master and slave to send and receive data.
SCL (Serial Clock) – The line that carries the clock signal.
The data is transmitted in frames. Every data contains
- Start Bit
- Stop Bit
- Address Bus (Initially, address bus was only about 7 bits, later it changed to 10 Bits)
- Read/Write Bit
- Data Bus (8 Bit)
- ACK Bit/ NACK Bit (meta data)
In I2C slave devices slows the master from sending more data and it is known as Clock Stretching