Quote Originally Posted by boroko View Post
Does that help this make sense a bit more?
Yes it does.

Since you don't have anything in the Main loop, you can probably get away with it.
But the PULSOUT statement uses PBP system vars. So if you add anything to the the Main loop, something will need to be changed.

I'm wondering how you got past the GPIF/GPIE problem. Should have been something like this ...
Code:
ASM
RBIF = GPIF
RBIE = GPIE
INT_LIST  macro    ; IntSource,    label,  Type, ResetFlag?
        INT_Handler    RBC_INT,  _EncChg,   ASM,  yes
    endm
As for the main problem, the only thing I can see that might cause it is the Scratch = GPIO at the end of the handler.

The mismatch is cleared in the first line New_Bits = GPIO & (%001111)

Reading it again at the end of the handler, may be causing it to miss changes on the port. Try commenting it out.

Still looking.
<br>