My understanding is, that although there are many sources of interrupts possible within the PIC's hardware, there is only one resulting interrupt condition. Either the processor has been interrupted or it has not. This leads me to believe that this interrupt condition has to be dealt with by a single interrupt handling routine which tells the interrupted processor what to do.
The interrupt routine, or interrupt handler, in its execution could, of course, determine the source of the interrupt by investigating the various interrupt flags and take specific action appropriate to the source, but there is only one routine and the point in the program (the label) where it is located is stated in the 'ON INTERRUPT GOTO' statement. Having more than one 'ON INTERRUPT GOTO', each with a different label, doesn't make sense to me, as that would mean that the interrupted processor could go to more than one routine to resolve the interrupt. How would it know which to go to ?
The flexibility allowed by MELabs by not predetermining the label in the command just means that you can call your interrupt handler what you like. It doesn't mean that there can be more than one and that they are differentiated by having different labels.
OK.. now to the question! The 'ON INTERRUPT' statement reference on MELabs PIC BASIC Pro support website, clearly states before giving the syntax example, that "More than one ON INTERRUPT may be used in a program"... Is this a typo or have I got it completely wrong?
Brian Walsh
Bookmarks