Subsection 12.3.5 Part 5: Settings for Basic Accelerometer Operation
We now know how to read the data out of the sensor. What we have not done yet is tell the sensor how to run. The accelerometer has six control registers, all reachable over I2C. Only two of them matter for us. The rest are about features we leave at their defaults.
| Register | What it governs |
|---|---|
CTRL_REG1_A |
Data rate, power mode (the LPen bit, low-power enable), axis selection. Ours to set.
|
CTRL_REG2_A |
High-pass filter configuration (§8.7); bypassed by default. |
CTRL_REG3_A |
Interrupt selection (none used; off by default). |
CTRL_REG4_A |
Full-scale range (±2, ±4, ±8, ±16 g) and the HR bit (high resolution); together with LPen in CTRL_REG1_A it picks the resolution mode. Ours to set.
|
CTRL_REG5_A |
Interrupt configuration (unused; defaults). |
CTRL_REG6_A |
Interrupt configuration (unused; defaults). |
Everything we did today assumed the ±2 g range; the sensitivity derivation used normal mode, and the worked conversions used low-power.
CTRL_REG1_A and CTRL_REG4_A are where both choices actually get made, and working out their settings from the LSM303AGR datasheet is part of tonight’s homework (Section 12.4).
