Skip to main content
Visitor II
September 5, 2014
Question

LIS2DH Digital data readout conversion to G

  • September 5, 2014
  • 0 replies
  • 617 views
Posted on September 05, 2014 at 16:24

I'm struggling to understand the correct method/formula to convert the digital reading of the accelerometer to G units (LIS2DH). The data sheet states that The value is expressed as two’s complement left justified. I have the sensor running in high resolution mode. I'm not sure if my formula is correct as well.

#define SENSITIVITY 0.001#define OG_OFFSET 0.50 unsigned int X_16BIT_AXIS2 = (X_16BIT_AXIS >>4); char G_X_AXIS = SENSITIVITY*(X_16BIT_AXIS2-OG_OFFSET);

#lis2dh
    This topic has been closed for replies.