cancel
Showing results for 
Search instead for 
Did you mean: 

Reading data from H3LIS331DL

MMacL.9
Associate

I was wondering about the format of the data from the H3LIS331DL accelerometer. At +/-400 scaling, 0.195 is listed as the scaling factor (in G). However, the data appears to be only 12-bit, left justified, since the lower 4 bits are always zero. After multiplying the result by 0.195, does it also need to be right-shifted 4 bits? If this isn't done, the stock G values at rest are quite high, anywhere from 5-10 G.

1 REPLY 1

Well (32767 * 0.195) / 16 = 399.36

I'd assume it is left justified to maintain the sign in an int16_t manipulation

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..