The example shown here explains how communication is done over the I²C bus. Communication must always start with a START bit which is also called the START condition. The master then sends out the slave address followed by a bit that will declare whether the master wants to send data to the slave or is requesting data from the slave. This bit is called a READ or NOT-WRITE bit. ‘0’ would mean write and ‘1’ would mean read. The receiving device must acknowledge by sending an ACK signal back. This sequence continues until the master sends a STOP bit or a ReSTART condition which would mark the end of the communication. The STOP bit would free the I²C bus for the next communication to begin. The ReSTART condition allows the master to retain control and continue the communication with a different slave.
So in the case of a master sending data the process would be:
1. Master sends the START bit
2. Master sends the slave address
3. Master sends a ‘0’ which would mean that it wants to send data or write.
4. Slave with that particular address would send an ACK signal back.
5. 8-bit data will be sent by the master.
6. Slave will send an ACK signal back. This would continue until the master is done sending data.
7. Master will end the communication with a STOP bit or a ReSTART condition if it wanted to retain control of the bus and address a new slave device.
Now, let’s look at how this signalling is done electrically over the I²C bus.