I2C – addressing

i2cmicrocontrollertexas instruments

In the i2c protocol, I would like to know how the slave & master address are assigned. Most of the internet doc talk about how the protocol work, but i wasn't able to find doc about i2c slave & master addressing.

For instance, I want to communicate between my tm4c129 LP and a SparkFun light sensor datasheet. In the tivaware datasheet ( TI drivers), they set the master address as 0x3B.

Could I set an other legal address for that master device?

Same goes for the light sensor, the datasheet refer the device address has either 0x39 , 0x29 or 0x49? Can i change the slave address or it is build in the IC of the PCB?

Best Answer

The I2C address is set within the chip itself. There may be pins exposed to select an alternate address within a range, but there is no way to give it a completely different range short of reimplementing it from scratch.