[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]
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?
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
funny the first commentator on kenneth’s post is the guy featured in this article, praising kenneth’s design
“doing weed”?
and sleeping! ;-)
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!”
This post is sexist.
“but it still blows the accuracy of using a microcontroller as an RTC out of the water”
Nope.
@Sprite_tm:
Save your negative comments for your full-time job: flooding YouTube with them.
@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?
Too bad his date is off ;)
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.
Seriously, The First Comment-Guy is a 100% pure Troll. No doubt about it.