| поискавой системы для электроныых деталей |
|
AN2381 датащи(PDF) 41 Page - STMicroelectronics |
|
|
|||||||||||||||||||||||||||||
AN2381 датащи(HTML) 41 Page - STMicroelectronics |
|
41 / 47 page ![]() AN2381 Application information 41/47 6.5 Inertial wake-up 6.5.1 HP filter bypassed This paragraph provides a basic algorithm which shows the practical use of the inertial wake-up feature. In particular, with the code below, the device is configured to recognize when the absolute acceleration along either X or Y axis exceeds a preset threshold (100mg used in the example). The event which triggers the interrupt is latched inside the device and its occurrence is signalled through the usage of the RDY/INT pin. 6.5.2 Using the HP filter The code provided below gives a basic routine which shows the practical use of the inertial wake-up feature performed onto high-pass filtered data. In particular the device is configured to recognize when the high-frequency component of the acceleration applied along either X, Y or Z axis exceeds a preset threshold (100mg used in the example). The event which triggers the interrupt is latched inside the device and its occurrence is signalled through the usage of the RDY/INT pin. 1 write C7h into CTRL_REG1 // Turn on the sensor and set DF=512 2 write 08h into CTRL_REG2 // Enables interrupt generation 3 write 08h into CTRL_REG3 // Set CTRL_REG3 to its default state 4 write 60h into FF_WU_THS_L register // Set the lower part of wake-up threshold 5 write 06h into FF_WU_THS_H register // Set the higher part of wake-up threshold 6 write 00h into FF_WU_DURATION register // No filtering/confirmation on the event 7 write 4Ah into FF_WU_CFG // Configure desired wake-up event 8 poll RDY/INT pad; if RDY/INT=0 then goto 8 // Poll RDY/INT pin waiting for the // wake-up event 9 read FF_WU_SRC register // Return the event that has triggered the // interrupt 10 (Wake-up event has occurred; insert your code here) // Event handling 11 read FF_WU_ACK register // Clear interrupt request 12 goto 8 1 write C7h into CTRL_REG1 // Turn on the sensor and set DF=512 2 write 08h into CTRL_REG2 // Enables interrupt generation 3 write 28h into CTRL_REG3 // Enable the HP filter and force HPc=512 4 write 60h into FF_WU_THS_L register // Set the lower part of wake-up threshold 5 write 06h into FF_WU_THS_H register // Set the higher part of wake-up threshold 6 write 00h into FF_WU_DURATION register // No filtering/confirmation on the event |
|
ссылки 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 |