| 数据搜索系统,热门电子元器件搜索 |
|
AN3308 数据表(PDF) 23 Page - STMicroelectronics |
|
|
|||||||||||||||||||||||||||||
AN3308 数据表(HTML) 23 Page - STMicroelectronics |
|
23 / 52 page ![]() AN3308 Inertial interrupt Doc ID 18198 Rev 1 23/52 6.3.1 Inertial wake-up Wake-up interrupt refers to a specific configuration of the INT1_CTRL register that allows interrupt generation when the acceleration on the configured axis exceeds a defined threshold (Figure 9). Figure 9. Inertial wake-up interrupt 6.3.2 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 the 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 signalled through the use of the INT1 pin. 1 Write A7h 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 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 Write 0Ah into INT1_CFG // Enable XH and YH interrupt generation 9 Poll INT1 pad; if INT1=0 then go to 8 // Poll RDY/INT pin waiting for the // wake-up event 10 Read INT1_SRC // Return the event that has triggered the // interrupt 11 (Wake-up event has occurred; insert your code here) // Event handling 12 Go to 8 |
|
链接网址 |
| ALLDATASHEET是否为您带来帮助? [ DONATE ] |
关于 Alldatasheet | 广告服务 | 联系我们 | 隐私政策 | 数据表链接 | 链接交换 | 制造商名单 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 |