| поискавой системы для электроныых деталей |
|
AN1602 датащи(PDF) 2 Page - STMicroelectronics |
|
|
|||||||||||||||||||||||||||||
AN1602 датащи(HTML) 2 Page - STMicroelectronics |
|
2 / 21 page ![]() 2/21 16-BIT TIMING OPERATIONS USING ST7262 OR ST7263B MCUs 1.1.1.2 Delay Compensation method The software delay introduced by the interrupt routine should be taken into account otherwise the measurement value can be corrupted. This happens if the ART counter rolls over from FFh to 00h while software is storing the TBUCV value after a valid input capture interrupt. In this case, the TBUCV is incremented and a wrong value occurs in the 8th bit of the 16-bit input capture value. The delay compensation method is described in the following flowchart (Figure 2). The first step consists of transferring both TBU and ART values into temporary variables (TmpTBU1, TmpART, TmpTBU2) to be used later on. Then in the second step we compare TmpART and ICxR. There are two cases to be considered: – TmpART >= ICRx: This means that the ART counter value was incremented by a few cycles but has not yet reached the maximum value (FFh). In this case we use TmpTBU1. – TmpART < ICRx:This means that the ART counter was incremented beyond the maximum value and has been reset. This means we should decrement TmpTBU2 once to get the right value of TBUCV. Figure 2. TBU Delay Compensation flowchart 1.1.1.3 Example of an interrupt capture routine The input capture interrupt routine given below can be used to get the precise value of the input capture interrupt instant on ICAP1 pin. It can be used to detect a rising or falling edge de- pending on the configured edge in ARTICSR. .Inp_Cap_Routine ;----------------------------------------; Ld A , TBUCV ;Load the TBU counter value Interrupt From ICAP1 or ICAP2 TmpART >= ICxR Read & Store the TBUCV in TmpTBU1 Read & Store the ARTCAR inTmpART Read & Store the TBUCV in TmpTBU2 TBUok= TmpTBU1 TBUok= TmpTBU2 - 1 Yes No 2 |
|
|
ссылки 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 |