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 ZealandPosts: 9066 |
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: AustraliaPosts: 5913 |
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 ZealandPosts: 9066 |
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 KingdomPosts: 2794 |
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 StatesPosts: 925 |
WW, kind of like your own timer server, server. Very cool idea... |
||||
Print this page |