Introduction: Smallest Binary Clock

Picture of Smallest Binary Clock

This is the Smallest Binary Clock that show the time with just 4 leds.
The brain in this clock is PIC16F84A,The time will be displayed when the 'show' pushbutton is pressed. The digits of the time are displayed in BCD on the four LEDs. Tens of hours is displayed followed by hours, tens of minutes and then minutes.

Step 1: Parts

Picture of Parts

For this project you will need:

2.Crystal 32.768khz(you may find in ordinary clocks)
3.Four leds any color
4. Resistors 4x270 ohm
5. Ceramic cap 2x33 Pf
6. Push Buttons 3 peaces

Step 2: Programming and Wireing

Picture of Programming and Wireing

First you must program the chip,I use the software ICprog and here is hex code: SmallestBc.
The schematic and wiring you can see here  they are very simple to understand.

Step 3: Finish Clock

Picture of Finish Clock

Here is my 4 leds binary clock,is too fun to have it,I love this clock you may make too be clock watch.
Also I have upload a gif image too see how can you make too look the clock.
Here is my links:


ShouqShwayyat (author)2016-08-15

I can't download the code.. could someone please reupload it ??

Suraj Grewal made it! (author)2015-08-12

made it with a clap switch for remix 2.0

gip_mad (author)2009-10-09

I'm sorry, but it's not the smallest.. Mine is smaller!! ;D<br /><a href=""></a>

macobt (author)gip_mad2009-10-09

Sorry I found the code but,can you have it  in hex?And what number is the chip?

gip_mad (author)macobt2009-10-10

Schematics and code are on my website, but since it's a very old project I don't actually remember the chip name and I don't know where to find the hex... Sorry! :(

Suraj Grewal (author)gip_mad2014-03-24

isn't it same sized as this -

accept the one in link is not on pcb,otherwise its same sized

Suraj Grewal (author)gip_mad2013-02-08

sorry to say but ^macobt's^ one is smaller it appears bigger in photo, his one can be made as small as the chip itself using smd leds

macobt (author)gip_mad2009-10-09

This is good watch,Bravo.Can you post me the schematic and code for this project.
Regards macobt

techno guy (author)2014-01-05

how do you cut the tops off the LEDs

Suraj Grewal (author)techno guy2014-03-24

Recently I bought blue 5mm(and only blue leds were available) leds with flat tops

lburns4 (author)2013-06-18

About how much does it cost to make?

Suraj Grewal (author)lburns42014-03-24

costs about 4$ for me

Suraj Grewal (author)2013-06-11

My final version with cr2032 can run 3 days with full accuracy,(after that it looses accuracy)

macobt (author)Suraj Grewal2013-06-11

Very good job suraj.

mrmerino (author)2013-03-16

If I want to use a crystal with a different value, could I change something in the code to accommodate?

macobt (author)mrmerino2013-04-13

No you cant use difrent crystal,the time will speed up or speed down

mrmerino (author)macobt2013-04-13

Okay, so I can't just tell the code to act differently?

Suraj Grewal (author)2013-02-16

I made one too-

last time i burnt the crystal this time all went ok

vanwazltoff (author)2012-12-03

have you tried surface mount resisters? it would give a much cleaner look

Suraj Grewal (author)2012-05-05

I tryed this,pic written properly and confermed data,
but when connected to circuit given by you, ic gets hot and gets destroyed even at 3volts
but i liked your idea and will try to troubleshoot.
this thing made me crazy and even I dont know from where i got to arrange the 3 pics
ive got i just got them arranged some how.
I really want to make this thing

Late reply, I know, but did you fix the problem? What was wrong?

i've tried it third time
but the same chip i reprogrammed to make macobt's other clock
ill make a video on it also onse i make it compact
its a single digit numeric clock

mmenendez (author)2012-07-05

hey do i need to program it, i think i do so with which am i suppose to program is it Arduino Uno? thanks also is there a way to make it without programming? thanks

macobt (author)mmenendez2012-09-01

This is PIC microcontroller,its not arduino.

Suraj Grewal (author)mmenendez2012-09-01
this worked for me

jdorne (author)mmenendez2012-08-11

This is not an Arduino chip, it is a PIC. There are many different programmable microcontrollers around, Arduino just happens to be the easiest for beginners.

Silentz (author)2011-02-06

Hi, just wondering what battery you'd need to use to run this? Thanks

Silentz (author)Silentz2011-02-06

Also, would this work with any 18 pin PIC chip?

c1c2c3 (author)Silentz2012-07-30


macobt (author)Silentz2011-02-06

This clock works with PIC16F84 microcontroller,and voltage is 5 volts.

explodingsodium (author)2012-06-13

How should I download the program on the micro-controller? Do I need to connect it to a breadboard or something?

macobt (author)2012-05-08

First you press ''set'' button than with ''select'' button you set the numbers,remember that the clock is set in opposite way I mean first you set the last number,minutes than hours.

macobt (author)Suraj Grewal2012-05-05

First you will need to use new pic,because if the pic get hot that mean that the pic is dead :( As you can see the circuit is very simple,check your programmer its ok.
Or send me some pictures to

Suraj Grewal (author)macobt2012-05-07


mg9990 (author)2011-12-09

could you maybe help me? im trying to make a clock very similar to this accept the led changes every hour and it shows 12 leds (one for each hour) Could i do this in a similar way to yours?

16zzundel5 (author)2011-10-22

Here are pictures of my board design and Eagle schematic. If anyone would like these files, please email me. I just placed an order with BatchPCB and Futurlec for the board and components, respectively. I am very excited for this project! If anyone would like me to program their PIC, I can do that.

macobt (author)16zzundel52011-10-23

great job,just keep going with good work.

16zzundel5 (author)macobt2011-10-24

I can't get your hex code to download. It says it is an incorrect link.

macobt (author)16zzundel52011-10-25

Here is new link

mwagner63 (author)2011-08-08

What programmer should i use for this that is not a jdm programmer

techno guy (author)2011-06-20

You should put this on top of a wrist band and you can make a wrist watch like that.

chinx (author)2010-10-06

can you please give me the code for this project?pls....

macobt (author)chinx2010-10-07

The hex code for the clock is in step 2(programming and wireing)

robot1398 (author)macobt2011-06-14

do i have to load the rar file

yaly (author)2011-05-26

hi i have all the components but when i plug my micro controller to be programed it gives me an error. the pic16f84a i have is brand new and i tried several programing softwares and serial and usb programming boards i even tried different hex files please help.

yaly (author)2011-05-26

hi i have all the components but when i plug my micro controller to be programed it gives me an error. the pic16f84a i have is brand new and i tried several programing softwares and serial and usb programming boards i even tried different hex files please help.

botronics (author)2011-05-19

I got the hex code to load with the pickit 2. What ever the problem i had earlier was my ICD on my other programmer got confused. The compiled .ASM code matches the hex file. So nothing funny is "buried" in the code. I set up a protoboard to test the pic. It seems to run. One problem I see is this. You really can't tell which digit is being flashed out. 01:00 can look the same as 00:01. There is nothing to tell what digit position is indicated. We need an extra led to show the pacing of the leds.

botronics (author)2011-05-19

When I load the hex code with pickit2, it says its not a valid hex code. If you click on the hex file, a box opens and asks how to set up a comport. What is going on with this file? A true hex file is just a list of hexadecimal characters, should not have code to cause a comment box to open. It might be better to run the .asm file thru mplab and do a quick build (which I'm going to do now) and make the .hex code. By the way, a 16f628 is not exactly like a 16F84A. The allocation of memory and ports may be different. Just depends on the application.

KeganBlaydes (author)2011-04-05

i have a quick question to ask. after assembling the clock and (correctly) transferring the .hex file onto the pic 16f84a, the clock itself doesnt do a thing. when connected to the battery, it only sits there, like it probably should. but after you press any button, nothing happens. they only thing that i can make it do is to quickly flash all 4 LEDs when i connect it to 12V+. and even that only happens with 2 second delay. any clues what might be wrong here?

macobt (author)KeganBlaydes2011-04-05

the clock is not working on 12 volts,its working on 5volts,if you connect the microcontroller on 12 volts its gona burn.

About This Instructable




Bio: My name is marjancho and I love electronics,makeing gadgets,hack and pranks.
More by macobt:Creepy Halloween Pumpkin PrankMonster 10,000 Lumens 1000w equiv.LED FlashlightHow To Make 3D Hologram Projector - No Glasses
Add instructable to: