If you want precise time keeping, an idea would be to use a cheap GPS module with PPS signal output (1 pulse per second).
Ioannis
If you want precise time keeping, an idea would be to use a cheap GPS module with PPS signal output (1 pulse per second).
Ioannis
I use on average a couple of thousand DS1307's annually. If it's better than 15 minutes per year (and that's matching it exactly with a 12.5pF xtal), you've got a good one. For the money you pay (say around $0.75 in quantity) they are totally rubbish.
I keep meaning to program up a 18F part with a secondary 32kHz xtal and have a background interrupt timekeeping program... finally consign the 1307 to anals (deliberate spelling) of History.
I haven't tried that part... my only external RTC usage is in old products that were designed some years back. I almost certainly won't go that route for future projects. The reasoning for that being...
(1) Most 18F Parts for example have heaps of spare capacity - both in program space and performance.
(2) You can select a micropower part that doesn't suck a lot of juice
(3) With little effort you can redesign your PSU so that it powers the PIC all the time, whilst powering-off the remainder of your device, so the PIC remains quiesced on just minimal residual backup Battery Power.
Ultimately the name of the game is to reduce the parts count...
(a) Removes the cost of the parts (which considering an RTC is half the price of a decent PIC doesn't give you a great deal of bang-for-buck).
(b) Makes the PCB smaller (thereby cheaper)
(c) Removes the Labour cost involved in mounting the parts, in ordering the parts and in inventory.
(d) If it's the only I2C device, you lose two pull-up Resistors as well.
Eight or even six years ago, the state of electronics was such that your microprocessor needed all the external help it could get. This has changed. Today, you chose the part that could do as much of the job at hand that you can possibly make it do. There isn't the budget for unnescessary extravagence - you need to leverage maximum profit and in so doing need to think clever.
Today if I have a production run of say 1000 pcs of a new product needing an RTC, I can earn an extra $750 in return for two hours worth of programming - I'll do it. Wouldn't you?
Last edited by Melanie; - 29th March 2010 at 15:27.
Melanie, I remember you bagging them in another RTC thread.
My use of Maxim/Dallas RTCs is 0.056 per year, but that figure might be rising
I wonder if the calender on the RTC can solve the problem of converting UTC time to a local time where the date is different for part of the day.
Best example is it's 1:00 am, 1st of March but to convert to local time I might
have to decrement the date and be left wondering if it is a leap year, etc.
Does the possibility exist of using the RTC to test for a valid date just by trying to set it?
Does that help?The date at the end of the month is automatically adjusted for months with fewer than 31 days, including corrections for leap year.
Dave
Always wear safety glasses while programming.
Bookmarks