Cheat sheet

Hello.

Please take a look at this thread:

And the one I link to from my post in that thread. The code there might help you accomplish what you’re trying to do, though it might need to be modified depending on which AVR your’re using. Please post if you have any questions or troubles getting it to work.

Also, external interrupts are somewhat easier to use than pin-change interrupts, so if you can choose an AVR pin that can be used as an external interrupt, it might make your task easier.

- Ben