I have started to learn about interrupts reading what I can.
I have a PIC16F628A with an LED on Port A1. I want to be able to apply ground or positive not sure which to Pin 6 (RB0/INT). Below is the code Im using however the LED remains off no matter if I set the Int to high or low.
Can anyone see what i'm doing wrong?
Thank you
Code: Select all
Program Interrupts
Sub procedure interrupt
If INTCON.INTE = 1 THEN
PORTA.1 = 1
INTCON.INTE = 0
End If
End sub
Main:
TRISB = 0x01
TRISA = 0x00
INTCON = 0x90
While (True)
PORTA.1 = 0
Wend
End.