The Inter IC bus (usually abbreviated to I²C) is an industry standard system for simple communication between ICs. The official standard is defined by Philips.
I²C uses two signals:
I²C is a multidrop bus: the signals are common to all devices on that bus:
A master device initiates a data transfer to or from a slave device. Each device can be the master for one transfer, and slave for another transfer (initiated by a different device acting as master), but a common implementation is to have a single master device that can read/write a number of slave-only devices.
All transfers consist of a sequence of 8-bit bytes, with each byte followed by an acknowledge bit.
The master device initiates a transfer by generating the START condition, i.e. by driving SDA low.
The first byte transmitted by the master contains the 7-bit address of the slave to be accessed:
Followed by the data direction bit:
If the slave is present it must respond by transmitting one acknowledge bit.
Data is then transferred (in the direction specified by the R/W bit) one byte at a time:
The master device terminates the transfer (after the last byte) by generating the STOP condition.