For interrupt-on-change you need to read the port to allow the interrupt flag bit to be
cleared. This takes a snap-shot of the port logic, and triggers the interrupt-on-change
again once the value on the port changes after the last read.
To prevent it from interrupting if you hold a button down too long, then release it, just
use a while/wend to wait for the button to be released. I.E. wait until the switch is
released before exiting your interrupt handler. Then only the change when your switch is
pressed should generate the interrupt.
Bookmarks