| поискавой системы для электроныых деталей |
|
AN2335 датащи(PDF) 35 Page - STMicroelectronics |
|
|
|||||||||||||||||||||||||||||
AN2335 датащи(HTML) 35 Page - STMicroelectronics |
|
35 / 40 page ![]() AN2335 Application Information 35/40 9.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 (180mg used in the example). The event which triggers the interrupt is latched inside the device using FF_WU interrupt source 1 and its occurrence is signalled through the usage of the INT1 pin. At step 6, a dummy read at HP_FILTER_RESET register is performed to set the current/reference acceleration/tilt state against which the device performed the threshold comparison. This read may be performed any time it is required to set the orientation/tilt of the device as a reference state without waiting for the filter to settle. 1 write C7h into CTRL_REG1 // Turn on the sensor and set ODR=400 Hz 2 write 04h into CTRL_REG2 // High Pass filter enabled on FF_WU1, fcut- off= 8Hz 3 write 01h into CTRL_REG3 // FF_WU1 interrupt sent to INT1 pin 4 write 0Ah into FF_WU_THS_1 reg // Set wake-up threshold = 180 mg 5 write 00h into FF_WU_DURATION_1 reg // No filtering/confirmation on the event 6 read HP_FILTER_RESET register // Dummy read to force the HP filter to // actual acceleration value // (i.e. set reference acceleration/tilt value) 7 write 6Ah into FF_WU_CFG_1 // Configure desired wake-up event 8 poll INT1 pin; if INT1=0 then goto 7 // Poll INT1 pin waiting for the wake-up event 9 (Wake-up event has occurred; insert your code here) // Event handling 10 read FF_WU_SRC_1 reg // Return the event that has triggered the interrupt // Clear interrupt request 11 (Insert your code here) // Event handling 12 goto 8 |
|
ссылки 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 |