I want to configure my MMA8652FC with simple offset calibration method according to the AN4069.How can I get the values below.
±2g:
X_offset_2G_12_bit
Y_offset_2G_12_bit
Z_offset_2G_12_bit
±4g:
X_offset_4G_12_bit
Y_offset_4G_12_bit
Z_offset_4G_12_bit
±8g:
X_offset_8G_12_bit
Y_offset_8G_12_bit
Z_offset_8G_12_bit
Can anyone help me?
Best regards,
HJ
Hi HJ,
SENSITIVITY_2G_12bits 1024
SENSITIVITY_4G_12bits 512
SENSITIVITY_8G_12bits 256
±2g:
X_offset_2G_12_bit = Xout_12_bit / 2 * (-1);
Y_offset_2G_12_bit = Yout_12_bit / 2 * (-1);
Z_offset_2G_12_bit = (Zout_12_bit - SENSITIVITY_2G_12bits) / 2 * (-1);
±4g:
X_offset_4G_12_bit = Xout_12_bit * (-1);
Y_offset_4G_12_bit = Yout_12_bit * (-1);
Z_offset_4G_12_bit = (Zout_12_bit - SENSITIVITY_4G_12bits) * (-1);
±8g:
X_offset_8G_12_bit = Xout_12_bit * 2 * (-1);
Y_offset_8G_12_bit = Yout_12_bit * 2 * (-1);
Z_offset_8G_12_bit = (Zout_12_bit - SENSITIVITY_8G_12bits) * 2 * (-1);
Best regards,
Tomas