Site icon Iotguider

Using I2C (Inter-Integrated Circuit) in Arduino

Using I2C (Inter-Integrated Circuit) in Arduino

Learn using I2C in Arduino. I2C (Inter-Integrated Circuit) is a serial protocol for a two-wire interface to connect to low-speed devices like Micro-controller, EEPROMs, I/O Interfaces and other similar devices in Embedded Systems. Also, It can be said that I2C is a bus for communication between a master (or can be multiple masters) and a single or multiple slave devices.

I2C Interface

I2C Addresses

Each I2C Slave devices have 7-bit addressing or also can have 10-bit addressing. Addresses need to be unique on the Bus to determine the slave where to transmit the data. The master device needs no address since it generates the clock (using SCL) and addresses individual I2C Slave devices. The maximum number of Slave devices that can be used while using 7-bit addressing are 112 devices and the Maximum number of Slave devices used in 10-bit addressing is 1008 devices.


Working of I2C in Arduino

This shows the working of I2C in Arduino. In I2C data transfer occurs in Message Frames which are then divided into Frames of Data. A message contains the various number of Frames in which one frame contain the address of the slave, and remaining frames for data to be transmitted.

The message includes START/STOP Conditions, READ/WRITE Bits and ACK/NACK (Acknowledgement/No-acknowledgement) Bits between each data Frame. Working shown below,

Exit mobile version