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.

[youtube=http://www.youtube.com/watch?v=fnpLzQwNQco&w=470]

13 thoughts on “Simple Clock Uses RTC Chip And Character Display

  1. 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. 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!”

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

Leave a Reply

Please be kind and respectful to help make the comments section excellent. (Comment Policy)

This site uses Akismet to reduce spam. Learn how your comment data is processed.