Go Down

Topic: I2C device address changed [SOLVED] (Read 416 times) previous topic - next topic


May 06, 2014, 01:53 pm Last Edit: May 06, 2014, 02:27 pm by jokes_finder Reason: 1
Hello all,

I have a little problem here. I have purchased LSM303DHL which is a tilt compensated compass sensor. It's a module that consists of a compass and an accelerometer and communicates with the micro-controller over I2C communication protocol. The datasheet specifies that the address of the compass is 0x1E and the address of the accelerometer is 0x18 (This is also specified by the application note). I have built a sketch to fetch the compass readings only and it did work. However, trying to establish a communication with the accelerometer failed. After some debugging I came to realize that the accelerometer device address is 0x19 (I ran I2C scanner to know the connected devices). Well, I find this confusing!! can the accelerometer have different address other than the specified in the datasheet? I need some explanation for this issue if you please.

Sorry for my bad English. It's not my first language.
Thanks in advance.


Read the data sheet, the logic level on pin4 determins the least significant bit of the address.


The "Addr" input to the board will switch the accelerometer address from 0x18 (LOW or open) to 0x19 (HIGH).  Perhaps that changed somehow.

The magnetometer address defaults to 0x1E.
Send Bitcoin tips to: 1G2qoGwMRXx8az71DVP1E81jShxtbSh5Hp


Thanks :)

After reading the answers and getting back to the datasheet, I found the post is trivial. That being said, I think, for noobs like me, the post isn't bad for future search.

Thanks again. I found your answers useful for better understanding of electronix and datasheets.


Go Up