| поискавой системы для электроныых деталей |
|
AN4505 датащи(PDF) 28 Page - STMicroelectronics |
|
|
|||||||||||||||||||||||||||||
AN4505 датащи(HTML) 28 Page - STMicroelectronics |
|
28 / 43 page ![]() Interrupt generation AN4505 28/43 DocID026441 Rev 1 Figure 15. No-move interrupt This paragraph provides the basics for the use of the selective axis movement detection feature. The example code which implements the SW routine for the selective axis movement recognition is given below. The code sample exploits a threshold set at 60 dps selective axis movement detection and the event is notified by the hardware signal INT1. At step 12, the INT1_DURATION register is configured like this to ignore events that are shorter than 1/DR = 1/100 ~= 10 msec in order to avoid false detections. Once the selective axis movement detection has occurred, a read of the INT1_SRC register clears the request and the device is ready to recognize other events. 1 Write 0Fh into CTRL_REG1 // Turn-on the sensor and enable X, Y, and Z // ODR = 100 Hz 3 Write 80h into CTRL_REG3 // Interrupt driven to INT1 pad 4 Write 00h into CTRL_REG4 // FS = 250 dps 6 Write 2Ch into INT1_THS_XH // Threshold = 60 dps 7 Write A4h into INT1_THS_XL // Threshold = 60 dps 8 Write 2Ch into INT1_THS_YH // Threshold = 60 dps 9 Write A4h into INT1_THS_YL // Threshold = 60 dps 10 Write 2Ch into INT1_THS_ZH // Threshold = 60 dps 11 Write A4h into INT1_THS_ZL // Threshold = 60 dps 12 Write 01h into INT1_DURATION // Duration = 10 ms 13 Write 65h into INT1_CFG // Enable XL, YL and ZH interrupt generation in AND // configuration. Interrupt latched 14 Poll INT1 pad; if INT1=0 then go to 8 // Poll INT1 pin waiting for the // wake-up event 15 Read INT1_SRC // Return the event that has triggered the // interrupt 16 (Wake-up event has occurred; insert your code here) // Event handling 17 Go to 15 |
|
ссылки 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 |