Lesson #2: Read very carefully.
Quote:
|
Originally Posted by PIC12F683 datasheet
The user, in the Interrupt Service Routine, clears the interrupt by:
a) Any read or write of GPIO. This will end the
mismatch condition, then
b) Clear the flag bit GPIF.
A mismatch condition will continue to set flag bit GPIF.
Reading GPIO will end the mismatch condition and
allow flag bit GPIF to be cleared.
|
The key word in that is
then. "Any read or write of GPIO. This will end the mismatch condition,
then Clear the flag bit GPIF." That does
not mean that it will be cleared automatically when you read from GPIO. That means that GPIF needs to be cleared manually.
Now, when my batteries are recharged, I can test my decoding algorithm...