Subsection 12.6.3 The Data Format, and the Conversion in All Three Modes
Each axis’s reading is 16 bits (two data registers, low byte at the lower address), left-justified, two’s complement. The three resolution modes write 8, 10, or 12 valid bits into the top of the same 16-bit word, zeros below. Each mode’s conversion is: shift the zero bits off the bottom, then multiply by that mode’s step size at the chosen full-scale range. At the ±2 g range (4 g of span) the three modes are as follows.
| Mode | Valid bits | Shift | Step size at ±2 g |
|---|---|---|---|
| Low-power | 8 | ≫ 8 | 4 g / 2⁸ = 15.625 mg |
| Normal | 10 | ≫ 6 | 4 g / 2¹⁰ = 3.90625 mg |
| High-resolution | 12 | ≫ 4 | 4 g / 2¹² = 0.9765625 mg |
All three collapse to one formula, because the valid bits always start at bit 15: the shift and the step size cancel to 2¹⁶, giving \(a = \mathrm{FS} \cdot \mathrm{raw} / 2^{16}\) with FS the full-scale span (4 g here) and the raw value read as a signed 16-bit integer. Change the range and the constant changes with it: at ±4 g the span is 8 g, and so on, except at ±16 g, where the datasheet’s sensitivity table gives a larger value than this formula, so use the table there.
Here is a worked negative example, in low-power mode at ±2 g: the reading 0xC000 has bit 15 set, so it is negative. By the top byte: 0xC0 is −128 + 64 = −64, and −64 × 15.625 mg = −1000 mg. By the whole word: 0xC000 as a signed 16-bit integer is −32768 + 16384 = −16384, and 4 g × (−16384) / 2¹⁶ = −1000 mg. Both routes always agree; the collapsed formula is just the top-byte route with the shift folded into the constant.
