Hello everyone,
I follow the project "MMA8652FC - Bare metal example project", link
But if I want to use the sensor configured to use 8 bits, how do I calculate the offset values?
I get the Xout_8_bit, Yout_8_bit, Zout_8_bit. And I know the sensitivity:
SENSITIVITY_2G_8bits 64
SENSITIVITY_4G_8bits 32
SENSITIVITY_8G_8bits 16
So how to get:
X_offset_2G_8_bit = ?
Y_offset_2G_8_bit = ?
Z_offset_2G_8_bit = ?
X_offset_4G_8_bit = ?
Y_offset_4G_8_bit = ?
Z_offset_4G_8_bit = ?
X_offset_8G_8_bit = ?
Y_offset_8G_8_bit = ?
Z_offset_8G_8_bit = ?
Thanks.
Regards,
Sérgio
Hello Sérgio,
SENSITIVITY_2G_8bits 64
SENSITIVITY_4G_8bits 32
SENSITIVITY_8G_8bits 16
±2g:
X_offset_2G_8_bit = Xout_8_bit * 8 * (-1);
Y_offset_2G_8_bit = Yout_8_bit * 8 * (-1);
Z_offset_2G_8_bit = (Zout_8_bit - SENSITIVITY_2G_8bits) * 8 * (-1);
±4g:
X_offset_4G_8_bit = Xout_8_bit * 16 * (-1);
Y_offset_4G_8_bit = Yout_8_bit * 16 * (-1);
Z_offset_4G_8_bit = (Zout_8_bit - SENSITIVITY_4G_8bits) * 16 * (-1);
±8g:
X_offset_8G_8_bit = Xout_8_bit * 32 * (-1);
Y_offset_8G_8_bit = Yout_8_bit * 32 * (-1);
Z_offset_8G_8_bit = (Zout_8_bit - SENSITIVITY_8G_8bits) * 32 * (-1);
Best regards,
Tomas
Hello Tomas,
Thanks for all the help.
Regards,
Sérgio