| Datenblatt-Suchmaschine für elektronische Bauteile |
|
PIC16F570 Datenblatt(PDF) 50 Page - Microchip Technology |
|
|
|||||||||||||||||||||||||||||
PIC16F570 Datenblatt(HTML) 50 Page - Microchip Technology |
|
50 / 129 page ![]() PIC16F570 DS40001684E-page 50 2013-2014 Microchip Technology Inc. The following events happen when an interrupt event occurs while the GIE bit is set: • Current pre-fetched instruction is flushed • GIE bit is cleared • Current Program Counter (PC) is pushed onto the stack • Several registers are automatically switched to a secondary set of registers to store critical data. (See Section 8.12 “Automatic Context Switch- ing”) • PC is loaded with the interrupt vector 0004h The firmware within the Interrupt Service Routine (ISR) should determine the source of the interrupt by polling the interrupt flag bits. The interrupt flag bits must be cleared before exiting the ISR to avoid repeated interrupts. Because the GIE bit is cleared, any interrupt that occurs while executing the ISR will be recorded through its interrupt flag, but will not cause the processor to redirect to the interrupt vector. 8.12 Automatic Context Switching While the device is executing from the ISR, a secondary set of W, STATUS, FSR and BSR registers are used by the CPU. These registers are still addressed at the same location, but hold persistent, independent values for use inside the ISR. This allows the contents of the primary set of registers to be unaffected by interrupts in the main line execution. The contents of the secondary set of context registers are visible in the SFR map as the IW, ISTATUS, IFSR and IBSR registers. When executing code from within the ISR, these registers will read back the main line context, and vice versa. The RETFIE instruction exits the ISR by popping the previous address from the stack, switching back to the original set of critical registers and setting the GIE bit. For additional information on a specific interrupt’s operation, refer to its peripheral chapter. 8.13 Interrupts during Sleep Any of the interrupt sources can be used to wake from Sleep. To wake from Sleep, the peripheral must be operating without the system clock. The interrupt source must have the appropriate Interrupt Enable bit(s) set prior to entering Sleep. On waking from Sleep, if the GIE bit is also set, the processor will branch to the interrupt vector. Otherwise, the processor will continue executing instructions after the SLEEP instruction. The instruction directly after the SLEEP instruction will always be executed before branching to the ISR. Refer to the Section 8.10 “Power-down Mode (Sleep)” for more details. TABLE 8-7: INTERRUPT PRIORITIES Note 1: Individual interrupt flag bits may be set, regardless of the state of any other enable bits. 2: All interrupts will be ignored while the GIE bit is cleared. Any interrupt occurring while the GIE bit is clear will be serviced when the GIE bit is set again. 3: All interrupts should be disabled prior to executing writes or row erases in the self- writable flash data memory. Vector or In Sleep GIE WUR Wake-up and Vector Wake-up Reset Wake-up Inline Watchdog Wake-up Inline Watchdog Wake-up Reset 1 X X X X 1 1 1 1 1 1 0 0 0 0 |
|
Link URL |
| War ALLDATASHEET hilfreich? [ DONATE ] |
Über Alldatasheet | Werbung | Kontakt | Privatsphäre und Datenschutz | Link zum Datenblatt | Linktausch | Hersteller 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 |