| Electronic Components Datasheet Search |
|
LSM303AH Datasheet(PDF) 37 Page - STMicroelectronics |
|
|
|||||||||||||||||||||||||||||
LSM303AH Datasheet(HTML) 37 Page - STMicroelectronics |
|
37 / 82 page ![]() DocID027766 Rev 7 37/82 LSM303AH Functionality 82 4.5.1 Step detector/Step counter The step detector function generates an interrupt when a step is recognized, the step counter (automatically enabled when step detector is on) counts the number of the steps detected. Step Detector/Step Counter (SD/SC) are enabled by setting to ‘1’-logic the STEP_CNT_ON bit in the FUNC_CTRL_A (3Fh) register. Additional pedometer advanced configurations can be used if the FUNC_CFG_EN bit in CTRL2_A (21h) is set to "1". Details of the pedometer advanced configuration registers are available in Section 9: Advanced configuration register mapping and Section 10: Advanced configuration registers description. To disable the pedometer advanced configurations, the FUNC_CFG_EN bit in CTRL2 (3Fh) must be set to '0'. Refer to Section 10.4: CTRL2_A (3Fh). The “step detected” interrupt can be read in the FUNC_CK_GATE_A (3Dh) register and by writing the INT2 STEP DET bit to ‘1’-logic in the CTRL5_A (24h) register it can be routed on INT2. The number of steps detected can be read from STEP_COUNTER_L_A (3Bh) and STEP_COUNTER_H_A (3Ch) registers (65535 steps max). As default, SD/SC operates with data scaled at 2 g of full scale (device full-scale independent), but it is possible to make it work with a FS of 4 g by setting the PEDO4g bit to ‘1’-logic. The number of steps can be reset by writing the bit RST nSTEP to ‘1’-logic in STEP_COUNTER_MINTHS_A (3Ah): this is a synchronous reset activated at the first data valid and before the algorithm execution. The bit is auto-reset once the counter has been successfully set to 0000h. Note: This bit does not reset the algorithm and its variables. The algorithm and its variables can be reset just by writing the STEP_CNT_ON bit to ‘0’-logic, i.e. turning off the SD/SC routine. The RST PEDO bit in the FUNC_CK_GATE_A (3Dh) register signals that a SD/SC reset has to be done, so it goes high and remains at ‘1’-logic value until the algorithm ends the reset procedure, which is carried out at first execution after the SD/SC routine has been re-enabled, before the algorithm starts. 4.5.2 Significant motion The significant motion functionality can be used in location-based applications in order to receive a notification indicating when the user is changing location. This function has been implemented in hardware using only the accelerometer and works at 25 Hz, so the accelerometer ODR must be set at 25 Hz or higher values. The significant motion interrupt signal can be driven to the interrupt pin by setting to 1 the INT2_SIG_MOT bit of the CTRL5_A (24h) register; it can also be checked by reading the SIG_MOT_DET bit of the FUNC_CK_GATE_A (3Dh) register. The significant motion function generates an interrupt when the difference between the number of steps from its initialization is higher or equal than a threshold. The threshold value corresponds to the number of steps to be performed by the user upon a change of location before the significant motion interrupt is generated. The threshold has a default value equal to 6. This threshold is configurable in the SM_THS_A (34h) register in the advanced configuration registers (refer to Section 9: Advanced configuration register mapping and Section 10: Advanced configuration registers description). The significant motion threshold can be used if the FUNC_CFG_EN bit in CTRL2_A (21h)is set to "1". |
|
Link URL |
| Does ALLDATASHEET help your business so far? [ DONATE ] |
About Alldatasheet | Advertisement | Contact us | Privacy Policy | Link to Datasheet | Link Exchange | Manufacturer List All Rights Reserved©Alldatasheet.com |
| Russian : Alldatasheetru.com | Korean : Alldatasheet.co.kr | Spanish : Alldatasheet.es | French : Alldatasheet.fr | Italian : Alldatasheetit.com Portuguese : Alldatasheetpt.com | Polish : Alldatasheet.pl | Vietnamese : Alldatasheet.vn Indian : Alldatasheet.in | Mexican : Alldatasheet.com.mx | British : Alldatasheet.co.uk | New Zealand : Alldatasheet.co.nz |
|
Family Site : ic2ic.com |
icmetro.com |