Use a timer interrupt to design a easy digital clock. This clock will count only minutes and seconds, and start at 00:00 every time your program starts. The show on the screen should read
mm:ss
The display should be consider on one line, and should only update once a second. There will also be a ticking sound on the speaker once each second.
How should you make the clock? The specific method you use is up to you. Here are a few suggestions to get started:
- You can count interrupts to count seconds. For instance, if you use a 32 ms rate, one second is roughly 31 interrupts.
- When your clock reaches 59:59, reset the whole thing to 00:00 and start counting again.