Forum Index
HomeZBasic Home   Forum RulesForum Rules   Forum FAQForum FAQ   MemberlistMemberlist   UsergroupsUsergroups   RSS FeedRSS Feed
Site SearchSite Search   LinksLinks   DownloadDownload   Digests and SubscriptionsDigests and Subscriptions
ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in   RegisterRegister
Keeping time/date application hints
Goto page Previous  1, 2
 
Post new topic   Reply to topic    Forum Index -> ZBasic Language
Author Message
DH*
Guest





Posted: 16 April 2006, 18:41 PM    Post subject: Reply with quote

Quote:
I have mentioned here before that I designed a little RTC/FRAM board that interfaces on the I2C bus.
I'm curious why you just didn't use one of the Ramtron chips which include FRAM and RTC (plus a couple of 16-bit counters)? I have to question whether the slight gain in accuracy is worth it. Both the integrated Ramtron chip and the ST chip I recommended earlier will be accurate to about ±1 min per month from 0-40°C. I suspect few applications will see that much temperature fluctuation.
Back to top
Genesis



Joined: 15 Jan 2006
Posts: 28

Posted: 17 April 2006, 22:59 PM    Post subject: Reply with quote

I use a DS1307 for this; works fine, is cheap, keeps time almost forever with a cheap lithium battery.

Plus has 56 bytes of battery-backed RAM for other parameters....
Back to top
spamiam



Joined: 13 Nov 2005
Posts: 689

Posted: 17 April 2006, 23:27 PM    Post subject: Reply with quote

dhouston wrote:
Quote:
I have mentioned here before that I designed a little RTC/FRAM board that interfaces on the I2C bus.
I'm curious why you just didn't use one of the Ramtron chips which include FRAM and RTC (plus a couple of 16-bit counters)? I have to question whether the slight gain in accuracy is worth it. Both the integrated Ramtron chip and the ST chip I recommended earlier will be accurate to about ±1 min per month from 0-40°C. I suspect few applications will see that much temperature fluctuation.


Hmmmm, good question. I presume you are referring to the Ramtron FM31256-G. One reason is that I wanted the opportunity to have more than 256Kbits of FRAM. Although I must admit that I am currently using only one unit of the 256Kbit FRAM right now. More importantly, for my needs, I needed a square wave output, preferably at 1000Hz precisely. I never did get the 1000Hz, but I did get precise.

I COULD have used the FM31256-G "processor companion" with the Dallas DS32KHZ precision oscillator thich could feed to both the RTC, and an interrupt on the processor. A counter on the processor could have been set to increment the RTC every 32 hz of the oscillator giving me a 1024Hz clock tick.

I chose a design using the DS3231 which incorporates the precision oscillator, and has a programmable square wave output. Then I separately included pads for up to 4 pieces of the FRAM. In this manner one can have only as much FRAM as necessary. THese FRAM chips are not TERRIBLY expensive, but they are enough so that it is nice to avoid unnecessary

You are correct, supreme accuracy over a long time is not all that important to many/most people. For my specific needs, I wanted a clock that was within a second over a couple of days, and could do it over the temperature range the inside of a car might see if sitting outside in the elements. So, 1-2 minutes per year (within an industrial temp range) is right in the range I was looking for. It so happened that the DS3231 and (to a lesser extent) the DS32KHz give that accuracy. Not many other chips did.

-Tony

P.S. I do have some samples of the Processor Companion that I will be trying out some time. They seem GREAT for what they are.
Back to top
DH*
Guest





Posted: 18 April 2006, 0:14 AM    Post subject: Reply with quote

spamiam wrote:
You are correct, supreme accuracy over a long time is not all that important to many/most people. For my specific needs, I wanted a clock that was within a second over a couple of days, and could do it over the temperature range the inside of a car might see if sitting outside in the elements.
OK - I understand your choice now. I use FRAM only where I need its erase/write endurance.
Back to top
spamiam



Joined: 13 Nov 2005
Posts: 689

Posted: 18 April 2006, 17:19 PM    Post subject: Reply with quote

dhouston wrote:
OK - I understand your choice now. I use FRAM only where I need its erase/write endurance.



I take advantage of that aspect too! In that specific application, I would not mind being able to store some volatile info. If there is a momentary power loss, I can restart the system with at most a second delay (plus the power loss time).

Since this system might be used in an unusually harsh automotive environment (ProRally), momentary power loss COULD happen.

Therefore, every time I update the drivers "heads up" display, I also store about 30 bytes of critical data to FRAM. These updates occur either every second, or every 600 milliseconds, depending on certain settings. I think 600mS is overkill, and I am considering cutting back to 1200mS on that setting. The problem is that I will need ANOTHER clock counter (a variable XOR 1) to update the FRAM every other time. Not a problem, just annoying.
Back to top
Display posts from previous:   
Post new topic   Reply to topic    Forum Index -> ZBasic Language Time synchro. with the server - Timezone/DST with your computer
Goto page Previous  1, 2
Page 2 of 2

 


All content Copyright © 2005-2012 Elba Corp. All Rights Reserved.
Opinions expressed in posts are those of the author and not necessarily those of Elba Corp.
Powered by phpBB © 2001, 2005 phpBB Group