Hi everyone,
it's just a simple question....
Is it right the program that I've written to handle an interrupt on RB5?
The output on PORTC must be always 255 except when it receive a high signal on RB5, when it has to do the procedure written in "loop".
I've not written here the loop cause it's not useful.
At the end of the loop it must return to 255 and wait at this value for the next high value on RB5.
The program is this:



TRISB.5 = 1
TRISC = 0
TRISA = 0
PORTC = 0
PORTA = 0

on interrupt goto loop
INTCON = %00001000

main:

PORTC = 255
goto main

disable

loop:
..........
............

INTCON.0 = 0
resume
enable


Thank you very much!!!!