I'm playing with a 16F677 and have a question about interrupt on change.
I'd like the pic to set a flag in the background when the pin changes, but I don't want to re-direct the program execution at all whenever that pin change happens. I'm afraid of using interrupts because I'm not sure what to predict of them.
The data sheet says on pg. 62; 4.2.3 that the RABIF flag is set as soon as a mis-match happens. That's great, but is it going to interrupt the flow of my program? I don't want it to.
I'm allowing a pin to see a signal spike that may or may not happen over time. I want to just run around and do some other stuff with my program, and when a timer runs out (which my program will check on its own), I want to go manually look at this RABIF flag to see if it got set while I was doing other stuff; then I'll read from the pin to clear the mis-match then clear the flag, and repeat the whole process.
How do I handle this with the whole global interrupts thing? Anything special to code in picbasic?
Thanks!
Bookmarks