cancel
Showing results for 
Search instead for 
Did you mean: 

IIS2DH Reading FIFO

apennell001
Associate II
Posted on April 13, 2017 at 01:08

With a 2g scale sampling @25Hz the FIFO fills with data and I am reading the contents up to the watermark. HR and LPen are disabled.

With the Z-Axis pointing toward earth I get the following data for the X-Axis using the H and L bytes:

DATX=128

DATX=128

DATX=128

DATX=-64

DATX=192

DATX=-128

DATX=-64

DATX=0

...

First, why are the values multiples of 32? Second, why the variability when the chip is still and not moving? I have been using the LIS3DSH for a couple years now so this IIS2DH is a real downgrade for sure, but I must be missing something. I have read over the manual several times now and can't find my issue. 

-AP

2 REPLIES 2
Miroslav BATEK
ST Employee
Posted on April 13, 2017 at 09:56

The values are actually multiples of 64, because the FIFO contains 10-bits values. 10-bits value are left adjusted in output register which is 16 bits.

You should divide the value by 64 and then multiply by the sensitivity.

The variation is caused by the inherent noise. There could be also small vibration of the desk where the sensor is places.

Posted on April 13, 2017 at 14:42

Ahh, of course...I was treating it like a 16bit value. The variance in the values also make more sense now. Thanks for the quick reply!