Skip to main content
Francesco Murru
Associate
September 21, 2017
Solved

LIS2DH incorrect I2C address?

Posted on September 21, 2017 at 23:49

Hi all,

today I started a new project using the LIS2DH accelerometer (I2C mode). Previously I already used, very successfully, LIS3DH, always in I2C mode. Seeing the datasheets, in the basic functionatity, LIS2DH and LIS3DH are pratically the same object (the LIS3DH has just 3 extra ADC channels...): same registers, same setup and, theorically, same I2C Address, (0x18 when SA0 = 0, 0x19 when SA0 = 1). So, I was expect an easy porting of my code because, I repeat, theorically, LIS2DH and LIS3DH, are the same device. Theorically!

I don't know why, but using 0x18 (my SA0 is 0) the LIS2DH do not comunicates.

I was going crazy: I do three times a rework of the pcb (I was thinking that maybe the problem was the board): nothing, nothing and nothing.

So I had this idea: I checked all I2C's space address, from 0x00 to 0x7F. I got no response, as previously, at 0x18 but, incredible, I got a response at 0x29.

Mmmm...very strange but...Ok, I updated my .c library using this new address and...WOW, LIS2DH works!

But I still have a doubt: how is this possible??

The datasheet of LIS2DH no reports any errata about the I2C address...

Any idea?

Regards,

Francesco

NOTE: the I2C bus is shared whit a MS5803 barometric sensor, that correctly works with his address (0x77)

    This topic has been closed for replies.
    Miroslav BATEKBest answer
    ST Employee
    September 22, 2017
    Posted on September 22, 2017 at 09:52

    Are you sure it is LIS2DH? It would be possible that someone mix up the LIS2DH with LIS2DE which has the I2C address 0x28/0x29.

    But in this case the SA0 should be 1 to set the address to 0x29.

    May I know, where did you buy the part?

    2 replies

    Miroslav BATEKBest answer
    ST Employee
    September 22, 2017
    Posted on September 22, 2017 at 09:52

    Are you sure it is LIS2DH? It would be possible that someone mix up the LIS2DH with LIS2DE which has the I2C address 0x28/0x29.

    But in this case the SA0 should be 1 to set the address to 0x29.

    May I know, where did you buy the part?

    Francesco Murru
    Associate
    September 22, 2017
    Posted on September 22, 2017 at 10:33

    OPS! 

    A colleague has done the purchase for me, and yes, It has buy a LIS2DE!! Doh! His fault made me a fool!

    :(

     

    :(

    Thank you Miroslav, you solved the mystery!