Sorry, but another interrupt problem
I'm a newbie just can't seem to get this working. I've checked the other posts but I don't see what I'm doing wrong. I'm trying to receive an interrupt from push button connected to portb/0. I am using a PIC16F84A and here is the code:
Include "modedefs.bas"
CLEAR
LOW 7
TRISB.0 = 1
INTCON = %10010000
ON INTERRUPT GOTO handleInterrupt
main:
PAUSE 1
GOTO main
DISABLE
handleInterrupt:
HIGH 7 ' turn on LED so I know it worked
PAUSE 1000
LOW 7
INTCON.1 = 0
RESUME
ENABLE
END
If the problem isn't in the code, it might also be how I've got the push button hooked up. (Like I said, I'm a newbie.) I've tried several things, but right now I have one lead on the push button connected to 5v+ and the other lead connected to portb/0. I've tested the LED and switch separately, and they both work and the code compiles as well.
Any help is GREATLY appreciated.