Home
JAQForum Ver 20.06
Log In or Join  
Active Topics
Local Time 09:45 05 May 2024 Privacy Policy
Jump to

Notice. New forum software under development. It's going to miss a few functions and look a bit ugly for a while, but I'm working on it full time now as the old forum was too unstable. Couple days, all good. If you notice any issues, please contact me.

Forum Index : Microcontroller and PC projects : CMM - 1307 RTC vs internal RTC...

Author Message
Grogster

Admin Group

Joined: 31/12/2012
Location: New Zealand
Posts: 9066
Posted: 03:10pm 03 Dec 2014
Copy link to clipboard 
Print this post

Hi folks.

While playing around with my CMM board, and having removed the DS3232 RTC chip way back when I thought it might be causing strange restarts(see my other thread), I have just been playing around with the CMM's built-in RTC.

This is the one that runs if MMBASIC cannot find an external RTC to work with on the I2C lines.

Then the thought occurs to me - would the internal RTC to the PIC32 not be more accurate long-term then the 1307?

As my system has full battery backup anyway, a separate accurate and battery backed RTC chip is not really needed, as the backup gel-cell battery will take over automatically if there is a power cut, so the system board should never be without power in normal circumstances, hence you'd set the RTC in the PIC32 once, then you should be able to forget about it, unless there is a power cut and the gel-cell goes flat.

The practical upshot of this, is that my thinking is now along the lines of dropping the DS3232 and backup cell, and just using the internal RTC.

I have set the RTC and am going to leave the board running like this for 48 hours or so, so I will be interested to see if there is any drift like with the 1307. Due to the oscillator accuracy of the PIC32, I would expect that it will remain more accurate long-term then a 1307 would.

Yes?
No?

As I am also updating the RTC every 250mS, would not getting the date and time from the internal RTC be quicker then via an external I2C RTC that MMBASIC would have to poll for the data?

That might be false logic, in that it takes time to query an I2C RTC, and it likewise takes time to query the internal one too, so it might work out the same.
Smoke makes things work. When the smoke gets out, it stops!
 
TassyJim

Guru

Joined: 07/08/2011
Location: Australia
Posts: 5913
Posted: 03:54pm 03 Dec 2014
Copy link to clipboard 
Print this post

My internal clocks on the various Maximites are within a couple of seconds a day which is the same as a 'normal' RTC.
Both use a standard crystal for their timebase so they should be similar.

If you need better than that, a high precision RTC is needed but even then, I would only worry about setting the internal RTC every few hours.

Depending on how you use the time data, I think using the internal time$ would be the fastest.

For my DAQ system, I adjust 4 times a day from the PC and the PC is set from the Internet every 6 hours.

Jim

VK7JH
MMedit   MMBasic Help
 
Grogster

Admin Group

Joined: 31/12/2012
Location: New Zealand
Posts: 9066
Posted: 04:52pm 03 Dec 2014
Copy link to clipboard 
Print this post

I just update the clock every 250mS, to provide a seconds tick-timer on-screen.

I guess there is no real need for that, it just looks cute to have it.
I'm not setting, just reading it for the OSD.
Smoke makes things work. When the smoke gets out, it stops!
 
WhiteWizzard
Guru

Joined: 05/04/2013
Location: United Kingdom
Posts: 2794
Posted: 09:43pm 03 Dec 2014
Copy link to clipboard 
Print this post

Regarding RTCs and trying to get them 'accurate' (i.e. less drift) then don't rule out other technology!
Obviously it depends on each individual application / requirement but there are two other methods that have been done here on the forum.

One is the NTP clock - this simply uses the cheap ESP8266 for a wireless access to accurate time (so only good if your project is within reach of a useable wireless connection). Requires a bit of power while 'syncing' time but the module can be switched off (either through the PowerDown pin, or by using a MOSFET)

The other method is to use the GPS signal. This is the method I use around the house. In fact what I have done is to have one GPS unit (uBlox8) connected to a MicroMite which also has a RF transmitter connected. I process the incoming GPS data, extract the Date/Time and perform Geoff's DayLight saving code to correct the time for here in the UK (last Sunday of March & October). Then I RF Tx the 'correct' Date/Time. So for any 'project' around the house that needs Date/Time, I simply add a cheap RF Receiver and read the signal whenever I need it. My LED matrix clocks use this method - working for many months now . . . .

This is just to provoke different thoughts that may be of use to some of you

WW
For everything Micromite visit micromite.org

Direct Email: whitewizzard@micromite.o
 
viscomjim
Guru

Joined: 08/01/2014
Location: United States
Posts: 925
Posted: 03:12am 04 Dec 2014
Copy link to clipboard 
Print this post

WW, kind of like your own timer server, server. Very cool idea...
 
Print this page


To reply to this topic, you need to log in.

© JAQ Software 2024