Raghunathan,
Your explaination of using the PICs interrupts is not quite fair. The limitations you mention are mostly a function of PIC BASIC Pro, not the PIC. Darrel touched on it, but here's a little more.
You can actually "find which interrupt had called the ISR" quite easly by tesing the Interrupt Flag in the ISR for the interrupts you expect. Additionally, the 16-bit PICs (18Fxxxx) have high and low priority interupts (which are usable by PBP). These vector to different locations, and as would be expected, a High Priority event can interrupt a Low Priority Interrupt, but no the other way around.Originally Posted by ra68gi
Yes, this is quite true. And the reason for this is that PIC BASIC Pro will finish executing the BASIC command before going to the ISR. And since each PIC BASIC Pro commands are made up of many ASM commands, there could be quite a large delay (especially if you had something like PAUSE 5000). The advantage though is that you can write your ISR entirely in PIC BASIC Pro, and don't have to worry about what's going on under the hood. But, if you can't afford any delays in your interrupts, you need to work the interrupts in ASM. Or use Darrel's Instant Interrupts.Originally Posted by ra68gi
As Russ mentioned, he "....walked [himself] through how [Darrel Taylor] does it. This is a worthwhile exercise". If you take the time, it's a great way to learn how to handle PIC interrupts (as well as the other neat tricks Darrel uses).
Steve


).


Bookmarks