Simple clock uses RTC chip and character display

[Giorgos Lazaridis] just finished building a simple clock on a breadboard. It uses a common real time clock chip, the DS1307. This is less expensive that its full-featured older brother, the DS3232. The difference between the two is that the 1307 requires an external 32.768 kHz crystal and it is not temperature compensated. This means it will not be quite as accurate over the long-haul (it may wander as much as one minute per month), but it still blows the accuracy of using a microcontroller as an RTC out of the water and includes a backup battery which will keep time when the rest of the circuit is switched off.

This design uses a PIC 16F1937 to display the time and date on a 16×2 character LCD screen. Six buttons are dedicated to incrementing one specific chunk of data (ie: one button changes the year, another the day, etc.). A seventh button can be held down when using the other six in order to decrement the setting. We’re always interested in how the button code is written. [Giorgos] did share his code, but he wrote it in assembly so it’s of little use to us as we tend to stick to C code.

See the walk through video after the break.

Comments

  1. Sprite_tm says:

    Seriously? You’re going to run an article about someone connecting a RTC and an LCD to a PIC? Good for the maker, no doubt, everyone has to begin somewhere, but why feature an article about something 99% of the visitors here can whip up while blindfolded, one-handed, drunk, doing weed and sleeping?

  2. I’m more concerned by the claim that 20ppm blows a controller-based RTC out of the water. I use uC RTCs for projects all the time. The key is using a crystal and not just relying on the internal RC oscillator, and making sure you have the counter CCR set correctly (now is it 32768, or 32767?). Example that runs about 30 seconds slow per month from a salvaged crystal:
    http://kennethfinnegan.blogspot.com/2011/02/low-power-lcd-clock.html

  3. Panikos says:

    funny the first commentator on kenneth’s post is the guy featured in this article, praising kenneth’s design

  4. Dan says:

    “doing weed”?

  5. and sleeping! ;-)

  6. Jac Goudsmit says:

    You can bitch however much you want, but this would probably be an awesome beginners project; something I can do together with my grandkids to spark their interest in more serious stuff. Or maybe as demonstration of how much accuracy matters in some cases.

    So basically just a different category of “good stuff!”

  7. dext3r says:

    This post is sexist.

  8. Pete says:

    “but it still blows the accuracy of using a microcontroller as an RTC out of the water”

    Nope.

  9. pRtkL xLr8r says:

    @Sprite_tm:

    Save your negative comments for your full-time job: flooding YouTube with them.

  10. @pRtkL…: To be fair, HaD has already run at least 10 DS1307 connected to a display articles by my count. At what point is it an answered question?

  11. DNA says:

    Too bad his date is off ;)

  12. Sean says:

    A DS1307 does not necessarily blow a microcontroller-based RTC out of the water. With a proper crystal and good timekeeping code a microcontroller can perform very well as an RTC. I’ve built a few nixie clocks this way.

  13. Blastar says:

    Seriously, The First Comment-Guy is a 100% pure Troll. No doubt about it.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Follow

Get every new post delivered to your Inbox.

Join 92,441 other followers