![]() | ![]() | ![]() |
| | |||||||
| Micro Controllers Discuss all aspects of micro controllers - building them, coding them, etc. All controllers are welcome - PIC, BASIC, Z8 Encore!, etc. |
| | LinkBack | Thread Tools | Display Modes |
| | (permalink) |
| Suppose an interrupt occurs and a table is called initially in the ISR..The table directs the micro to do an appropriate action defined within the ISR itself.. During its execuiton we have cleared both RBIF and INTF flags to allow more interrupts.. Now suppose we are still in the ISR(doing that 'appropriate' action).. 1.Will another interrupt cause the PC to direct at the table? 2.Or is it necessary that our program has to be out of the ISR(using retfie) to enable further interrupts? Thanks in advance... | |
| |
| | (permalink) |
| The GIE bit is cleared when an ISR is entered and is set when the retfie is executed. This makes it impossible for another interrupt to happen. You can allow re-entrant interrupts by setting the GIE bit in your ISR but you have to copy the w_temp variables etc into shadow locations first. BTW, this assumes 16F series chip. Mike. | |
| |
| | (permalink) |
| You have to be careful with that, nested interupts can get out of control fast and cause stack overflows.
__________________ "Because I be what I be. I would tell you what you want to know if I could, mum, but I be a cat, and no cat anywhere ever gave anyone a straight answer, har har." | |
| |
| | (permalink) |
| I would strongly suggest NOT doing it!. It's also fairly important to make ISR's as short and fast as possible, and preferably NOT to call subroutines within them - as the limited stack size means it's easy to overflow the stack, with disasterous results. | |
| |
| | (permalink) |
| Thanks a lot..... | |
| |
| Bookmarks |
| Thread Tools | |
| Display Modes | |
| |
| | ||||
| Title | Starter | Forum | Replies | Latest |
| Interrupts 16F88 | andrew12345678 | Micro Controllers | 4 | 13th September 2007 12:38 PM |
| Interrupts latency | atferrari | Micro Controllers | 21 | 15th June 2007 01:37 AM |
| Status of a comparator affecting interrupts. | 2camjohn | Micro Controllers | 7 | 19th July 2005 12:14 PM |
| Interrupts or not interrupts ? That is the question ! | ZERS | Micro Controllers | 9 | 1st March 2005 08:26 PM |
| PIC18F452 & ADC --> no interrupts : is it right ? | ZERS | Micro Controllers | 8 | 6th April 2004 10:32 AM |