| Electronic Components Datasheet Search |
|
AN1602 Datasheet(PDF) 6 Page - STMicroelectronics |
|
|
|||||||||||||||||||||||||||||
AN1602 Datasheet(HTML) 6 Page - STMicroelectronics |
|
6 / 21 page ![]() 6/21 16-BIT TIMING OPERATIONS USING ST7262 OR ST7263B MCUs Figure 6. Frequency Measurement In this example we will also use two 16-bit variables to hold the 16-bit timer value each time an input capture occurs (StartPeriod: for the first rising edge and EndPeriod for the second falling edge). In addition to these two variables, we will need an extra variable (FirstEdge) which is used to indicate the first rising edge or the second edge. – FisrtEdge =0: First Rising edge (PeriodStart) – FisrtEdge =1: Second Rising edge (PeriodEnd) In this case we will need only one input capture pin (ARTIC1) configured to detect only rising edge. The capture steps are shown in Figure 7. After selecting the timer frequency and the input capture edge we wait for an input capture interrupt. Depending on the FirstEdge value the input capture parameters (ICxR and the TBU) are transferred into PeriodStart or PeriodEnd. Figure 7. Input Capture Sequence Frequency= 1 / Period input capture No YES 0 1 - Configure Time clock frequency - Select sensitive edge on ICAP pins - Cascade PWMART & TBU, FirstEdge = 0 - Store the TBU (compensated value) in PeriodStartHR - Store the ICxR in PeriodStartLR - Store the TBU (compensated value) in PeriodEndHR - Store the ICxR Value in PeriodEndLR First Edge =? |
|
|
Link URL |
| Does ALLDATASHEET help your business so far? [ DONATE ] |
About Alldatasheet | Advertisement | Contact us | Privacy Policy | Link to Datasheet | Link Exchange | Manufacturer List 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 |