| поискавой системы для электроныых деталей |
|
AN4506 датащи(PDF) 29 Page - STMicroelectronics |
|
|
|||||||||||||||||||||||||||||
AN4506 датащи(HTML) 29 Page - STMicroelectronics |
|
29 / 47 page ![]() AN4506 Interrupt generation DocID026442 Rev 2 29/47 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 is 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 CTRL1 // Turn on the sensor and enable X, Y, and Z // ODR = 100 Hz 2 Write 00h into CTRL2 // High-pass filter disabled 3 Write 80h into CTRL3 // Interrupt driven to INT1 pad 4 Write 00h into CTRL4 // FS = 245 dps 5 Write 34h into IG_THS_XH // Threshold = 100 dps 6 Write 3Eh into IG_THS_XL // Threshold = 100 dps 7 Write 00h into IG_DURATION // Duration = 0 8 Write 02h into IG_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 IG_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 CTRL1 // Turn on the sensor and enable X, Y, and Z // ODR = 100 Hz 2 Write 00h into CTRL2 // High-pass filter in Normal mode 3 Write 80h into CTRL3 // Interrupt driven to INT1 pad 4 Write 00h into CTRL4 // FS = 245 dps 5 Write 05h into CTRL5 // Data in DataReg and FIFO are high-pass filtered. // High-pass-filtered data are used for interrupt // generation 6 Write 34h into IG_THS_XH // Threshold = 100 dps 7 Write 3Eh into IG_THS_XL // Threshold = 100 dps 8 Write 34h into IG_THS_YH // Threshold = 100 dps 9 Write 3Eh into IG_THS_YL // Threshold = 100 dps 10 Write 34h into IG_THS_ZH // Threshold = 100 dps 11 Write 3Eh into IG_THS_ZL // Threshold = 100 dps 12 Write 00h into IG_DURATION // Duration = 0 |
|
ссылки 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 |