English
Language : 

LSM303AH Datasheet, PDF (36/82 Pages) –
Functionality
LSM303AH
4.4.6
Module-to-FIFO
When the MODULE_TO_FIFO bit in the FIFO_CTRL_A (25h) register is set to '1', the 14-bit
magnitude of the vector of the current axes is sent as FIFO input instead of axes data. X-, Y-
and Z-axis data are replaced with 3 times the adjacent data generated by the module
routine, as shown in Figure 12, so a row of FIFO is written every 3 axes data ready.
The module routine must be previously enabled by writing to the FUNC_CTRL_A (3Fh)
register.
The module data in FIFO can be read as output data in the registers 28h-2Dh.
The LSM303AH calculates the vector sum of the acceleration of the X-, Y-, Z-axis using the
following formula:
module (14-bit) = Sqrt(x2+y2+z2)
The implementation is based on an approximation of this formula (error below noise level).
As shown in Figure 12, when module-to-FIFO is enabled, each row of FIFO contains 3
values of the module, related to 3 consecutive ODR.
Figure 12. Module-to-FIFO mode example
;
;1
;1
;1
),)2GDWDVORWV
<
<1
<1
<1
=
=1
=1
=1
),)2GDWDVORWV
;
<
=
0RGXOH1
0RGXOH1 0RGXOH1
0RGXOH1 0RGXOH1 0RGXOH1
0RGXOH1 0RGXOH1 0RGXOH1
4.5
Embedded functions
The LSM303AH embeds internal logic able to implement the following functions which are
applicable to the accelerometer only:
 Step detector
 Step counter
 Significant motion function
 Tilt function
Pedometer, significant motion, and tilt functions can work in parallel. Step detector, step
counter, tilt function, and significant motion function work at 25 Hz, so the user can
configure ODR at 25 Hz or higher.
ODR 1600 Hz
ODR < 1600 Hz
ODR 25-50 Hz
ODR 12.5 Hz
Table 18. ODR function settings
Pedometer
Tilt function
Y
Y
Y
Y
Y
Y
X
X
Event recognition
X
Y
Y
Y
36/82
DocID027766 Rev 6