2017-09-21 02:49 PM
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,
FrancescoNOTE: the I2C bus is shared whit a MS5803 barometric sensor, that correctly works with his address (0x77)
Solved! Go to Solution.
2017-09-22 12:52 AM
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?
2017-09-22 12:52 AM
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?
2017-09-22 03:33 AM
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!