Hi, Could anyone please explain how the PIC16F84 will behave in the following situation ? (After reading the datasheets it still isn't clear...) Global interrupts = enabled Interrupt on RB0/INT = enabled Interrupt on TMR0 = enabled Situation (example): Timer generates an interrupt. ISR checks for cause and determines it was TMR0. Services interrupt for TMR0 cause. Clear TMR0 flag RETFIE Sometime during the ISR (after checking cause), RB0/INT signals an interrupt. What happens next ? (I expect in my application to have at most 2 interrupt signals on) Questions: 1) should I disable GIE in ISR or leave it on? 2) if I leave it on, if an interrupt occurs during ISR, it will call ISR again from start ? 3) i think this should be yes: at top of ISR I should disable GIE, save context, clear cause flag, reenable GIE ? 4) should the cause flag be cleared at the beginning or end of ISR? (related to #3 above) 5) if I disable GIE, after servicing the entire ISR, after RETFIE, a new interrupt will be generated by the active RB0/INT signal? Thank you. ===== ing. Andrei Boros Centrul pt. Tehnologia Informatiei Societatea Romana de Radiodifuziune __________________________________________________ Do You Yahoo!? Yahoo! Auctions - buy the things you want at great prices http://auctions.yahoo.com/ -- http://www.piclist.com hint: To leave the PICList mailto:piclist-unsubscribe-request@mitvma.mit.edu