| Os motores de busca de Datasheet de Componentes eletrônicos |
|
AN887 Folha de dados(PDF) 10 Page - STMicroelectronics |
|
|
|||||||||||||||||||||||||||||
AN887 Folha de dados(HTML) 10 Page - STMicroelectronics |
|
10 / 12 page ![]() 10/12 MICROCONTROLLERS MADE EASY 2.5 INTERRUPTS Polling. Polling is what you have to do if your microcontroller does not have interrupts or if what you want to do is not time critical. It is a software technique whereby the controller con- tinually asks a peripheral if it needs servicing. The peripheral sets a flag when it has data ready for transferring to the controller, which the controller notices on its next poll. Several pe- ripherals can be polled in succession, with the controller jumping to different software routines, depending on which flags have been set. Figure 14. Polling versus Interrupt Interrupts. Rather than have the microcontroller continually polling - that is, asking periph- erals (timers / UARTS / A/Ds / external components) whether they have any data available (and finding most of the time they do not), a more efficient method is to have the peripherals tell the controller when they have data ready. The controller can be carrying out its normal function, only responding to peripherals when there is data to respond to. On receipt of an in- terrupt, the controller suspends its current operation, identifies the interrupting peripheral, then jumps to the appropriate interrupt service routine. The advantage of interrupts, compared with polling, is the speed of response to external events and reduced software overhead (of con- tinually asking peripherals if they have any data ready). Most microcontrollers have at least one external interrupt, which can be edge selectable (rising or falling) or level triggered. Both systems have advantages. Edge is not time sensitive, but it is susceptible to glitches. Level must be held high (or low) for a specific duration (which can be a pain but is not susceptible to glitches). VR02101M TASK 1 POLLINGLOOP TASK 3 TASK 2 Event occurs POLLINGLOOP POLLINGLOOP PROCESS EVENT TASK 1 TASK 3 TASK 2 Event occurs INTERRUPT PROCESS EVENT Save State Restore State POLLING INTERRUPT TASK 4 TASK 4 |
|
|
Ligação URL |
| ALLDATASHEET é útil para você? [ DONATE ] |
Sobre Alldatasheet | Publicidade | Contato conosco | Privacy Policy | Link para a ficha técnica | roca de Link | Lista de Fabricantes 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 |