| поискавой системы для электроныых деталей |
|
AN4504 датащи(PDF) 24 Page - STMicroelectronics |
|
|
|||||||||||||||||||||||||||||
AN4504 датащи(HTML) 24 Page - STMicroelectronics |
|
24 / 41 page ![]() Interrupt generation AN4504 24/41 DocID026419 Rev 1 5.5.2 HP filter bypassed This paragraph provides a basic algorithm which shows the practical use of the wake-up feature. In particular, with the code below, the device is configured to recognize when the absolute angular rate along either the X-, Y-, or Z-axis exceeds a preset threshold (100 dps 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. 5.5.3 Using the HP filter The code provided below gives a basic routine which shows the practical use of the wake- up feature performed on high-pass filtered data. In particular the device is configured to recognize when the high-frequency component of the angular rate applied along either the X-, Y-, or Z-axis exceeds a preset threshold (100 dps 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 0Fh 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 80h into CTRL_REG3 // Interrupt driven to INT1 pad 4 Write 00h into CTRL_REG4 // FS = 250 dps 5 Write 2Ch into INT1_THS_XH // Threshold = 100 dps 6 Write A4h into INT1_THS_XL // Threshold = 100 dps 7 Write 00h into INT1_DURATION // Duration = 0 8 Write 02h into INT1_CFG // Enable XH interrupt generation 9 Poll INT1 pad; if INT1=0 then go to 8 // Poll INT1 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 1 Write 0Fh 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 in normal mode 3 Write 80h into CTRL_REG3 // Interrupt driven to INT1 pad 4 Write 00h into CTRL_REG4 // FS = 250 dps 5 Write 05h into CTRL_REG5 // Data in DataReg and FIFO are high-pass filtered // High-pass-filtered data are used for interrupt // generation 6 Write 2Ch into INT1_THS_XH // Threshold = 100 dps 7 Write A4h into INT1_THS_XL // Threshold = 100 dps |
|
ссылки 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 |