Skip to main content

Subsection 12.5.1 Part 2: The Settings, Committed and Revealed

Today’s driver needs one byte in CTRL_REG1_A and one in CTRL_REG4_A. We’ll look once more at the four table images from the reading: the fields of CTRL_REG1_A (Figure 12.4.1), the data rates (Figure 12.4.2), the fields of CTRL_REG4_A (Figure 12.4.3), and the operating modes (Figure 12.4.4). We want readings at 400 Hz, in normal mode, on all three axes, over the ±2 g range, and everything needed to build the two bytes is in those four tables.

Activity 12.5.1. Compare the two settings at your table.

We want readings at 400 Hz, in normal mode, with all three axes enabled, over the ±2 g range. You’ll put the two bytes you worked out for homework into your driver later today.

(a)

Compare your CTRL_REG1_A byte with your table group, field by field: the four ODR bits, LPen, then Zen, Yen, and Xen. Settle any disagreement against the datasheet’s tables.

(b)

Do the same for CTRL_REG4_A, and agree on which operating mode your LPen and HR choices select in Table 14 of the LSM303AGR datasheet.