AVR Chess Timer

This is a simple chess timer using a 20 pin AVR microcontroller.  It has up/down buttons on the front for adjusting the countdown time and an arcade button on top (for mashing on) to reset the coundown timer.  At 30 seconds a piezo buzzer outputs a 100ms beep to warn the user time is starting to run out.  At 5 seconds a double beep is output to warn that a chess move better be made immediately or the game will be over.  When time runs out the display flashes zeros and beeps repeatedly for a few seconds.  I have yet to add more features such as a mode for seperate opponent total game countdown times, louder piezo buzzer circuit with adjustable volume, low battery warning, pause, automatically save/load countdown times between power cycles.

I've included my C code which uses a 16 bit timer to fairly accurately keep track of time.  The quad seven segment display used was purchased for $2 from sparkfun.com.  It requires driving each segment with a common anode which requires flashing through the sequence of numbers fast so they all appear on simultaneously.  Driving the output display constantly while performing other operations posed a coding challenge.  You can view the code HERE.

Nice,neat, and elegant, I

Nice,neat, and elegant, I like it.

the clock is like a 3rd player in the game.



Thanks, I think it turned out well myself