Making a binary clock using a PIC16F88

You can use a PIC microcontroller and an LED matrix to create a binary clock (or if you prefer you can wire up individual LEDs).

This project uses an LED matrix block as it saves lots of wiring.  So what is it ?

binary clock using a PIC
Its an led clock that displays the time information as binary numbers…

…and it is a good way of learning how to read binary (well up to 9 any way!).

You can represent the numbers 0-9 using 4 binary digits so only four leds are needed for each time digit. There’s a binary-decimal conversion table here.

To display hours, minutes and seconds (2 digits each) you need 6 binary digits in total (depending on whether you use a 24 hour clock the top digit needs only 1 or 2 LEDs).

How to read a binary clock

To show the time 6 digits are needed:

 

Binary Clock digit defiinition

 

Hours
MSD 0-2
Hours
LSD 0-4
Minutes MSD 0-5
Minutes LSD 0-9
Seconds MSD 0-5
Secondss LSD 0-9

 

(MSD,LSD Most Significant Digit, Least Significant Digit)


Note: You could use a 5×7 led matrix as only the right hand 4 leds (also only 6 rows) are used in this project.

The black rectangle, in the diagram above, shows which leds you need to look at – the rest are not used in this project.  You read the clock starting from the top and read horizontal row of four LEDs as a binary number. Each LED that is on represents a one and each LED that is off represents a zero. You then use the conversion table to translate it into decimal until you become so good at it that you won’t need the table!

Hardware

This project uses the same hardware as the led matrix project using a 16F88 PIC microcontoller and an LED matrix.  Its worth taking a look there as the same hardware description applies on how to multiplex the display.

I’ll just say here that instead of using 64 output pins only 10 are needed to drive the display.

 

For more detail: Making a binary clock using a PIC16F88

About The Author

Ibrar Ayyub

I am an experienced technical writer holding a Master's degree in computer science from BZU Multan, Pakistan University. With a background spanning various industries, particularly in home automation and engineering, I have honed my skills in crafting clear and concise content. Proficient in leveraging infographics and diagrams, I strive to simplify complex concepts for readers. My strength lies in thorough research and presenting information in a structured and logical format.

Follow Us:
LinkedinTwitter