How to clear IOC interrupt condition on PIC18F26K22

click_here

Joined Sep 22, 2020
548
I'm not able to test this code, but I think that it might do what you want
Code:
void myISR(void)
{
    volatile unsigned char lastKnownPORTB;

    asm("MOVF PORTB,w");
    asm("NOP");

    INTCONbits.RBIF = 0;

    asm("MOVF PORTB,w");

    lastKnownPORTB = WREG;
}
 
Top