2018-07-30 09:49 AM
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.
2018-08-09 11:23 PM
Well (32767 * 0.195) / 16 = 399.36
I'd assume it is left justified to maintain the sign in an int16_t manipulation