| Electronic Components Datasheet Search |
|
AN3260 Datasheet(PDF) 14 Page - STMicroelectronics |
|
|
|||||||||||||||||||||||||||||
AN3260 Datasheet(HTML) 14 Page - STMicroelectronics |
|
14 / 24 page ![]() Software description AN3260 14/24 Doc ID 17836 Rev 1 4.3.2 Interrupt function flowcharts Pushbutton acquisition Each time Button1 or Button2 is pressed, an interrupt is triggered and the PORTA_IRQhandler() function is called. The PORTA_IRQhandler() routine identifies which pushbutton has been pressed by testing port A input register and asserts the ButtonPressed1 or ButtonPressed2 flag accordingly (see Section 4.3.3: State machine flowchart). These flags trigger a change of state in the application state machine Figure 5 shows the flowchart of the PORTA_IRQhandler() function. Figure 5. PORTA_IRQhandler() function flowchart Timer-triggered acquisition TIMER3 is configured to generate an interrupt every 50 ms to trigger temperature acquisitions. After each conversion of ADC1 channel 2, the digital value is stored in the buffer array for further computations and ADC1 is powered down. A maximum of 16 samples are saved in the buffer array. This allows dividing by a power of two by performing a simple right shift, when calculating the average temperature over one-second period. TIM3_IRQHandler() calls the TRtc_CntUpdate() function which simulate a real time clock. It sets the flags representing seconds, minutes, and hours. This RTC routine is based on TIM3 50 ms timebase. Every second, the state machine automatically switches to state 3 (normal mode) (see Section 4.3.3: State machine flowchart). Figure 6 shows the flowchart of the TIM3_IRQhandler() function. |
|
|
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 |