Interrupt Counting
What should the interrupt routine do when I press the button? Well, to get this working and feel confident that it *is* working, it's a good idea to make the interrupt routine increment a counter and watch the counter variable in the debugger. That way one button press should be seen equal one counter increment. So my skeletal interrupt routine would be like:
unsigned long volatile counter = 0;
/* External Interrupt Function called when EXINT0 occurs */
void pressed (void) __irq {
counter++;
...
}



2 Comments:
Interesting blog which I'd like to follow, however, why no RSS Feed ?
Good question. I didn't find anything that would help me set this up on blogger.com . However the web team at Keil spotted your post while I was on vacation and have offered their assistance. So... "Watch this space!" for a solution, rather than wait to be informed that a solution has been found (for now at least). ;-)
Post a Comment
<< Home