| công cụ tìm kiếm bảng dữ liệu linh kiện điện tử |
|
AN2989 bảng dữ liệu(PDF) 22 Page - STMicroelectronics |
|
|
|||||||||||||||||||||||||||||
AN2989 bảng dữ liệu(HTML) 22 Page - STMicroelectronics |
|
22 / 28 page ![]() Interrupt generation AN2989 22/28 Doc ID 15761 Rev 1 5.4 Inertial wakeup The wakeup interrupt refers to a specific configuration of the INTx_CTRL registers that allow the interrupt generation when the acceleration on the configured axis exceeds a defined threshold (Figure 10). Figure 10. Inertial wakeup interrupt 5.4.1 HP filter bypassed This paragraph provides a basic algorithm which shows the practical use of the inertial wakeup 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 (250 mg used in the example). The event which triggers the interrupt is latched inside the device and its occurrence is signaled through the use of the INT1 pin. 1 write 2Fh into CTRL_REG1 // Turn-on the sensor and enable X, Y and Z // ODR = 100 Hz 2 write 00h into CTRL_REG2 // High-pass filter disabled 3 write 00h into CTRL_REG3 // Latched interrupt active high on INT1 pad 4 write 00h into CTRL_REG4 // FS = 2g 5 write 00h into CTRL_REG5 // Sleep to wake disabled 6 write10h into INT1_THS // Threshold = 250 mg 7 write 00h into INT1_DURATION // Duration = 0 8 write 0Ah into INT1_CFG // Enable XH and YH interrupt generation 9 poll INT1 pad; if INT1=0 then goto 8 // Poll RDY/INT pin waiting for the // wakeup event 10 read INT1_SRC // Return the event that has triggered the // interrupt 11 (Wakeup event has occurred; insert your code here) // Event handling 12 goto 8 |
|
Link URL |
| Cho đến nay ALLDATASHEET có giúp ích cho doanh nghiệp của bạn hay không? [ DONATE ] |
Alldatasheet là | Quảng cáo | Liên lạc với chúng tôi | Chính sách bảo mật | Liên kết đến bảng dữ liệu | Trao đổi link | Tìm kiếm theo nhà sản xuất 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 |