O'Reilly logo

GNU/Linux Rapid Embedded Programming by Rodolfo Giometti

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

The I2C bus in Linux

Each I2C device has a well defined 7 bits address that the master must use in order to communicate with a device. This address is not assigned at runtime as for the USB devices, it's assigned by the board designer by setting some chip's pins.

Note

Typically the chip manufacturer set most significant 3 or 4 bits and the board designer can set remaining bits in order to suite his/her needs. I2C bus specifications are controlled by NXP (Philips) and they are the ones who allocate addresses to I2C devices.

Another thing to be outlined regarding the I2C bus is that for each message the master must specify if the message wants read or write data from the slave. This special action is done by adding a final bit (least significant bit) ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required