sougata,
Thanks for all the advertising of Instant Interrupts. I hope I don't have to pay you. 
Jack,
The Instant Interrupts are really pretty easy, but you are correct. Understanding how interrupts work first is a good idea.
1. INTCON<7>, PORTB<:4>?This is just a way of showing the BIT's used in a register. INTCON<7> just means BIT number 7 within the INTCON register. It's the same thing as INTCON.7 in PBP.
PORTB<:4> probably had another number before the colon, like PORTB<7:4>. This shows a range of bits from PORTB.4 to PORTB.7 including 5 and 6.
2. How do I reset the interrupt flag for RB0?INTCON.1 = 0
3. If the program is executed sequentially, how does an 'Enable Interrupt' AFTER a resume statement ever get executed? Shouldn't the Disable be the first line of the ISR, and the Enable be the last line BEFORE the resume?The Enables and Disables are handled at Compile Time, and aren't executed at Run Time.
From the beginning of the program, or at the point of an ENABLE, PBP starts putting additional code in-between Each and Every line of code in your program that checks to see if an interrupt has occured. Then when it encounters a DISABLE, it's stops putting the checks in. There can be many ENABLES/DISABLES in the program, and only the areas that are ENABLEd can respond to an interrupt.
Bookmarks