The I2C Bus protocol

The Inter-Integrate Circuit (abbreviated to I2C) is a two-wire interface, which allows components, which reside on the same USB GPIO circuit board to communicate in an easy way, as an I2C adapter requires only two bus lines.

The USB I2C/GPIO/SPI Adapter consists of a master and a slave. They connected with the help of two lines:

  • Serial Data line (SDA), which controls the flow of data bits and via it a master receives and send data to a slave and vice versa.
  • Serial Clock line (SCL) is a control line, which set up the frequency of transmitting data.

These two wires carry information between the USB I2C devices, which are connected to the bus. Each slave device has its unique address, so the master can recognize the slave. The master can operate as a transmitter or a receiver, it depends on the function of the device.

A master initiates the transfer of data bits and generates the clock line.

The I2C bus is a multi-master bus, it means that two or more buses can be connected to the same circuit. As masters are usually act as microcontrollers, here is what can happen.

Let’s consider the case, that two microcontrollers connected to the I2C Bus and they want to exchange the data (microcontrollers A and B are masters).

A microcontroller A wants to sand data and a microcontroller B wants to send data, than both of them want to receive data and there is no slaves in this system, so there are no slaves to fulfill tasks. Each of them can initiate the transfer and it makes a chaos

This entry was posted in Computers and Technolog. Bookmark the permalink.

Comments are closed.