Further study of the data sheet shows:-
This implies 2**10 // 4 i.e. 256 is the scale factor needed to convert the integral value to a g value.
This implies that the 10 bit value represents ±2g i.e. 4g so each bit corresponds to g/256
(This may need to change if not in FULL_RES using higher resolution.)
Code:
Register 0x32 to Register 0x37 (DATAX0-DATAZ1)These … are eight bits each and hold the output data for each axis.The output data is twos complement. Code:
Register 0x31 (DATA_FORMAT)When the FULL_RES bit is … 0, the device is in 10-bit modeRange BitsThese bits set the g range.0 0 ±2 gThis implies that the 10 bit value represents ±2g i.e. 4g so each bit corresponds to g/256
(This may need to change if not in FULL_RES using higher resolution.)
Statistics: Posted by Milliways — Tue May 06, 2025 6:55 am