I have setup my code to get an interrupt when PortB's Pin 1 or Pin 0 gets triggered. I am using DT's Instant Interrupt and I have created and enabled interrupt processor for RBC_INT. The interrupt routine is called when either one of the pin is triggered (contact closure), however I can't tell exactly which pin was triggered. I am doing something like this:
TRIGGER0 VAR BIT
TRIGGER1 VAR BIT
TRIGGER0 = portb.0
TRIGGER1 = portb.1
However, both would read 1. Any idea what I am doing wrong?
Any help would be greatly appreciated.
P.S. I am a picBasic novice. Please go easy on me.
Bookmarks