| công cụ tìm kiếm bảng dữ liệu linh kiện điện tử |
|
AN3308 bảng dữ liệu(PDF) 24 Page - STMicroelectronics |
|
|
|||||||||||||||||||||||||||||
AN3308 bảng dữ liệu(HTML) 24 Page - STMicroelectronics |
|
24 / 52 page ![]() Inertial interrupt AN3308 24/52 Doc ID 18198 Rev 1 6.3.3 Using the HP filter The code provided below gives a basic routine which shows the practical use of the inertial wake-up feature performed on high-pass filtered data. In particular the device is configured to recognize when the high-frequency component of the acceleration applied along either the X, Y, or Z 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 signalled through the use of the INT1 pin. At step 8, a dummy reading at the HP_FILTER_RESET register is performed to set the current/reference acceleration/tilt state against which the device performed the threshold comparison. This reading 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 A7h into CTRL_REG1 // Turn on the sensor, enable X, Y, and Z // ODR = 100 Hz 2 Write 09h into CTRL_REG2 // High-pass filter enabled on data and interrupt1 3 Write 40h into CTRL_REG3 // Interrupt driven to INT1 pad 4 Write 00h into CTRL_REG4 // FS = 2 g 5 Write 08h into CTRL_REG5 // Interrupt latched 6 Write10h into INT1_THS // Threshold = 250 mg 7 Write 00h into INT1_DURATION // Duration = 0 8 Read HP_FILTER_RESET // Dummy read to force the HP filter to // current acceleration value // (i.e. set reference acceleration/tilt value) 9 Write 2Ah into INT1_CFG // Configure desired wake-up event 10 Poll INT1 pad; if INT1 = 0 then go to 9 // Poll INT1 pin waiting for the // wake-up event 11 (Wake-up event has occurred; insert your code here) // Event handling 12 Read INT1_SRC // Return the event that has triggered the // interrupt and clear interrupt 13 (Insert your code here) // Event handling 14 Go to 9 |
|
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 |