With its 5x5 LED matrix, a binary coded decimal (BCD) clock is easy to create.


BCD is pretty easy - each column represents a digit, with the individual LEDs equating to 1, 2, 4 and 8.

If the first two LEDs in a column are lit then that means the digit is 3 (the sum of 1+2).


Here is a BCD example from wikipedia that represents the time 10:37 in BCD:


With the codebug I decided to build a 12-hour clock and to use the center LED to indicate the seconds:



When powered up, the default time is 1:00. To tweak the accuracy you may need to adjust the delay in the code.

To try it out or to modify and adapt to your taste,  click here for the BCD Clock.

Here is an example photo - excuse the quality!