Hi Hans,
This the way INT1 worked for me on PIC18F26J50, I think your PIC is more or less the same, however each PIC has its own stupidity, so it might not work as expected...
You might want to set the pull-up resistor on your INT pin ( or not, as your schematic requires).
If you are not using dedicated INT pin and your PIC micro has the stupid PPS relocation, it will be additional headache, so check all of these...
good luck!
-- -------interrupt of change IOC-------------------------------------------------------
var bit MY_flag = low
procedure IOC() is
pragma interrupt
if INTCON3_INT1IF then
MY_flag = high
INTCON3_INT1IF = low
end if
end procedure
RCON_IPEN = low ; low priority interrupt, PIC16 compatibility
INTCON_GIE = high ; enable global interrupts
INTCON_PEIE_GIEL = high ; enable pheripheral interrupts
INTCON3_INT1IE = high ; enable INT1 on pin_RB5
INTCON2_INTEDG1 = high ; enable interrupt on rising edge
forever loop
-- use MY_flag for whatever
-- reset MY_flag
end loop