Best Microcontroller Projects


[?] Subscribe To This Site

XML RSS
Add to Google
Add to My Yahoo!
Add to My MSN
Subscribe with Bloglines


Home
Forum
Problem?-Solution
Projects Showcase
LCD-KEYS OnePort
PIC Introduction
PIC Programmer
Schematic Tool
PIC Projects
Tips & Techniques
PIC Tutorials
C Course
Digital Downloads
Store
My SECRET
Oscilloscopes
About Me
Search This Site
Freebies
Articles
Books
Resource Links
Site Map
Video du Jour
Rant/Rave
Privacy Policy
Contact
Terms of Use


Custom Search

Sign up for MicroZine:
''The'' Microcontroller Newsletter


:
:
Don't worry -- your e-mail address is totally secure. I promise to use it only to send you MicroZine
Enter your first Name and primary email address in the form above:

And receive absolutely FREE a full project for:


"Measuring Analogue Voltages
Without An ADC"

(Using only one pin).

Instant Download:
You Can
Get It Right Now

Warning: This project could be Removed
at any time.  

It will NOT be
available indefinitely SO

To avoid
disappointment get it:

Now



Remember this is a project with full description and fully debugged C Source code - and it's not available from the main website.

You can only get it through this newsletter.


To get exclusive access Enter your first name Name and primary email address Now in the form above.:

But wait !

There's more...

You'll receive more
free and exclusive reports as well as site information and site product updates.

Scroll up to the form above and sign up NOW.  Don't forget it's FREE and if you don't like it you can unsubscribe at any time.

Click Here Now to use the form above to get your Valuable information absolutely free.



Social Bookmarking
Click & Add:
add to BlinkBlink
add to Del.icio.usDel.icio.us
add to DiggDigg
add to FurlFurl
add to GoogleGoogle
add to SimpySimpy
add to SpurlSpurl
Bookmark at TechnoratiTechnorati
add to YahooY! MyWeb
Readers comments

"I wanted to thank
you so so so much
for all the information
you have provided in
your site it's

SUPERB and FANTASTIC."


- Ranish Pottath


"This site really is
the best and my favorite.
I find here many useful
projects and tips."

- Milan

bursach<at>gmail.com

Learn PIC C Now
Wondering how to program your next project using C and need a great start?


"Awesome site,
very, very easy and nice
to navigate!"


- Matt
matt_tr<at>
wolf359.cjb.net


"I am a newbie to PIC
and I wanted to say
 how great your
site has been for me."


- Dave

de_scott<at>bellsouth.net

Learn Microcontrollers
"Interested in
Microcontrollers?"


Sign up for The
Free 7 day guide:

FREE GUIDE : CLICK HERE

"Your site is a great
and perfect work.
congratulations."


- Suresh

integratredinfosys<at>
yahoo.com

"I couldn't find the correct
words to define
yourweb site.

Very useful, uncovered,
honest and clear.

Thanks so much for
your time and works.
Regards."


- Anon





Making a binary clock using a PIC microcontroller.

 

"Download Your Essential
Guide To Logic Level MOSFETs"

"This is completely Free"

CLICK HERE to DOWNLOAD NOW

Sponsored Links...
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 ?

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).



LED Binary Clock block diagram

binary clock block diagram


Learn about the tool used for creating this diagram.

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 5x7 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.

PIC Microcontroller binary clock display hardware
(Click diagram to open a pdf)

binary clock hardware diagram


Learn about the tool used for creating this diagram.

Specification

Binary clock display Red 8x8 LEDs matrix (for convenience) you only really need a 6x4 LED matrix and you can only buy an 8x8 or a 5x7!

Binary Clock display project details.

PIC Microcontroller Binary Clock Project
Compiler Mikroelectronika C compiler V5.0.0.3 Free!
Target 16F88/16F84 (retargetable to other PICs that have an enough pins).
Software level Easy.
Software notes Multiplexing the display/clock algorithm.
Hardware level Easy.
Hardware notes No special notes
Project version 1.00 Initial release
Project files Enter your details to get the Download Link
and get the microcontroller newsletter:
:
:
(Note: Your email is safe it will never be sold or rented).
You will get All the C source code and hex file.

 

Essential
C Programming Course:

You can program the PIC in circuit through the ICSP connector.

PIC Micro Binary Clock Software

Project files for the dot matrix led display

Compiler project files
16F88-binary-clock.ppc

C Source files.
16F88-binary-clock.c

Header files.
types.h
bit.h

Output files
16F88-binary-clock.hex

Binary Clock code description.

16F88-binary-clock.c

This contains all the code except :

  • Bit manipulation routines found in bit.h
  • Type definitions in types.h

The code is simple to follow and everything is done in main().

The multiplexing method is the same for the led matrix project so have a look there for the software description of that method.

The only difficult part is to correctly control the time display but its not that difficult as you can see in the code.

Improvements

You can improve the project to make it into a full clock by adding a set of keys in the same way as the RTC project.  This would let you set and change the time.

PIC Microcontroller Accuracy

This project relies on the accuracy of the microcontroller's internal oscillator which is only 1% - and this is not very accurate at all.  You can expect to loose ~15 minutes per day!

For a better accuracy use a crystal as shown in some of the other projects but note that it is difficult to create a very accurate clock.

Using a crystal oscillator you can make a clock that is accurate to a few minutes per month.

Note: Even when using a standard crystal  the board layout is very important - i.e. it will be a lot better than 1% but won't be as good as watch crystal accuracy. 

You could use a DS1307 clock chip but even these are hard to make accurate as they rely on a 32kHz crystal - end these are even more difficult to use effectively.

Binary clock accuracy

Clock source Accuracy Error per Day Error per Month
Internal oscillator 1% 14 minutes 7 hours

Standard crystal

100ppm 8.64 seconds 4.32 minutes

Watch crystal

20ppm 1.73 seconds 51 seconds

You can find some interesting notes comparing ppm clock accuracies here.




Jump from binary clock to
Best-microcontroller-projects home page


Don't forget to Sign Up for your

Microcontroller Newsletter

With "Essential tips and techniques",

..."New Site Info" and more...

Including a free project :

How to drive an LCD and 12key keypad using "Only One 8 Bit Port" with no interface logic!...

(Works for any microcontroller)

This costs you : Nothing...
Just fill out the form below and you'll get full C source code and project schematic and description.



:
:
Don't worry -- your e-mail address is totally secure. I promise to use it only to send you MicroZine
Google
 
  Best Microcontroller projects.