Michael,
With the Port Change Interrupts ...
The PORT (GPIO) has to be read within the handler to end the mismatch condition. Otherwise it can't clear the interrupt flag and as soon as it exits the ISR it'll jump right back into another interrupt, essentially halting the main program.
You'll also receive interrupts on both the Rising and Falling edges, so you'll need to check the state of the PIN to know if it's been pressed or released.
And since you have to read the PORT to know which state the PIN is in, that qualifies as the port READ, and ends the mismatch.
Code:RBPortIntPBP: if GPIO.3 = 0 then TOGGLE GPIO.2 pause 10 @ INT_RETURN




Bookmarks