Step 4: The Final product and files

Picture of The Final product and files

here's a video of the clock in action and a zip file containing the Bascom AVR basic code, schematic and PCB. If you click on the schematic you can view it full size.

Here is a link to the Bascom code in HTML format and

Here is a link to the compiled HEX file of that (right click - save as). You should be able to program an AVR Mega16 with that using a programmer of your choice. Note, you'll need to set the fuse bits for 8MHz internal Clock.

Parts List:
Q1-Q3 BC548
LED1-LED3 5mm High Intensity Blue LED
LED4-LED12 5mm High Intensity Red LED
LED13-LED18 5mm High Intensity Orange LED
LED19-LED27 5mm High Intensity Green LED
R1-R4 100k 1/4w Resistor
Q4 32.768 kHz Crystal
C1 4.7uF 10V Electrolytic Capacitor
C2,C3 10pF Ceramic Capacitor
IC1 ATMEGA16 AVR Microcontroller
IC2,IC3 TD62304 Darlington Transistor Arrays (these could be replaced with standard transistors)
S1-S3 Momentary Push Buttons

Enjoy! and vote for me!

Remove these adsRemove these ads by Signing Up
What limits the current through the LEDs?
Is this not going to burn out the LEDs and / or the drivers?
gweeds (author)  Grumpy Mike1 year ago
Nothing does, to get maximum brightness I drive the LEDs with all the current they can source, but because they are multiplexed, they don't burn out. It is quite common to drive LED matrix displays this way to get more brightness. The clock has been running 24/7 since its inception in 2002, never crashed, never needed repair.
mofassir2 years ago
can you please tell me what the JP1 in the schematic is, this is my first time making something so i would appreciate the help
gweeds (author)  mofassir2 years ago
Hi there, JP1 is the main power connector. 5v DC. you can make this a proper DC plug style, or a 2 pin header or just solder the wires to the board.
JP2 is the programming connector
mofassir gweeds2 years ago
thanks, i actually wanted to know how to implement the JP2. for now i have made the connections as specified on the bread board. in place of the JP2 i have simple use the electrically linked vertical column. i hope that will work.
aessam12 years ago
really nice
this is the first time i see this kind of this clock
was it 12:34 then 12:35?
did i read it right?
gweeds (author)  aessam12 years ago
Thanks, yeah the time in the picture and the start of the video is 12:34
Fouzen gweeds2 years ago
Hi, I am having trouble finding the TD62304 Darlington Transistor Arrays IC(I live in Singapore). Do you have any other useful alternatives?
aessam1 gweeds2 years ago
this clock is better than normal digital clocks
i will try to make one like it
Alberss2 years ago
Very nice clock indeed.
I noticed that you only supply the .bas file in the zip.
To get the HEX file to program into the AVR, you will need the BASCOM (?) compiler to produce the HEX file.

Could you also supply the HEX file for the AVR?

As for the square grids, you prob could use those square led matrixes, sold on eBay or @ Sparkfun.

herehere2 years ago
Could you tell us how much do you spent?
Where do you bought the square reflector?On internet I can't find it :(
herehere2 years ago
Excuse me can you tell me how do you programme the clock, via usb?
atterack8332 years ago
holy crap thats awsome , when i first saw it i was all like why do you need 3 lights at the first part then i realized that it swiches the patern but the numbers are the same , i dont think i will ever be able to build this but i am verry amazed by it and i want one (i cant solder good or wire up pcb boards also i wouldnt be able to get the chips , good show though take a bow man take a bow
Feats2 years ago
I can't understand the first part :(
gweeds (author)  Feats2 years ago
Which part would you like clarification on?