| поискавой системы для электроныых деталей |
|
AN4650 датащи(PDF) 53 Page - STMicroelectronics |
|
|
|||||||||||||||||||||||||||||
AN4650 датащи(HTML) 53 Page - STMicroelectronics |
|
53 / 102 page ![]() DocID027415 Rev 1 53/102 AN4650 Android embedded functions 102 In order to enable Significant Motion detection it is necessary to set to 1 both the FUNC_EN bit and the SIGN_MOTION_EN bit of the CTRL10_C register. The Significant Motion interrupt signal can be driven to the INT1 interrupt pin by setting to 1 the INT1_SIGN_MOTION bit of the INT1_CTRL register; it can also be checked by reading the SIGN_MOTION_IA bit of the FUNC_SRC register. If latch mode is disabled (LIR bit of TAP_CFG is set to 0), the interrupt signal generated by the Significant Motion function is pulsed: the duration of the pulse observed on the interrupt pins is about 60 s; the duration of the pulse observed on the SIGN_MOTION_IA bit of the FUNC_SRC register is 1/26 Hz. If latch mode is enabled (LIR bit of TAP_CFG is set to 1) and the interrupt signal is driven to the interrupt pins, once a ‘significant motion’ is detected, a reading of the FUNC_SRC register clears the request on both the pins and the SIGN_MOTION_IA bit of the FUNC_SRC register, and the device is ready to recognize the next event. If latch mode is enabled but the interrupt signal is not driven to the interrupt pins, the interrupt signal observed on the SIGN_MOTION_IA bit of the FUNC_SRC register is pulsed, with a fixed duration of 1/26 Hz. The embedded function register (accessible by setting to 1 the FUNC_CFG_EN bit of FUNC_CFG_ACCESS) used to configure the Significant Motion threshold parameter is the SM_THS register. The SM_THS_[7:0] bits of this register define the threshold value: it corresponds to the number of steps to be performed by the user upon a change of location before the Significant Motion interrupt is generated. It is expressed as an 8-bit unsigned value: the default value of this field is equal to 6 (= 00000110b). The Significant Motion function works at 26 Hz, so the accelerometer ODR must be set at 26 Hz or higher values. Hereafter a basic SW routine which shows how to enable the tilt detection function: In this example the SM_THS_[7:0] bits of the SM_THS register are set to 00001000b, therefore the Significant Motion threshold is equal to 8. 5.3 Tilt The Tilt function allows detecting when an activity change occurs (e.g. when phone is in a front pocket and the user goes from sitting to standing or standing to sitting): in the LSM6DS3 device it has been implemented in hardware using only the accelerometer. In order to enable the tilt detector it is necessary to set to 1 both the FUNC_EN bit of the CTRL10_C register and the TILT_EN bit of the TAP_CFG register. 1 Write 80h into FUNC_CFG_ADDRESS // Enable access to embedded functions registers 2 Write 08h into SM_THS // Set Significant Motion threshold 3 Write 00h into FUNC_CFG_ADDRESS // Disable access to embedded functions registers 4 Write 20h into CTRL1_XL // Turn-on the accelerometer // ODR_XL = 26 Hz, FS_XL = 2g 5 Write 3Dh into CTRL10_C // Enable embedded functions // Enable Significant Motion detection 6 Write 40h into INT1_CTRL // Significant motion interrupt driven to INT1 pin |
|
ссылки URL |
| Вашему бизинису помогли Аллдатащит? [ DONATE ] |
Что такое Аллдатащит | реклама | контакт | Конфиденциальность | Ссылка на техническое описание | обмен ссыками | поиск по производителю 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 |