Re: RTC

Started by Art Church March 12, 2005
What is the expected accuarcy of the BasicX Real Time Clock ? -
I am currently adjusting register.RTCtick upwards by 1 every second and getting quite close which is 99.8%
I am assuming that this will be dependant on the actual crystal and may vary by unit.
...or I have something else going on ...
Art




--- In , "Art Church" <achurch@m...> wrote:
> What is the expected accuarcy of the BasicX Real Time Clock ? -

There are only two sources of error that I can think of: the accuracy
of the crystal (may vary with time and temperature) and your code if
it interferes with the handling of RTC interrupts (every 1.95ms).
There are several system library routines (e.g. PulseOut(), PlaySound
(), etc.) which may cause the RTC to miss ticks depending on their
parameters. You could also cause the RTC to be inaccurate or miss
ticks if you fuss with the Timer0 settings (using Register.TCCR0,
Register.TCNT0, Register.TIMSK, etc.).

The accuracy of a crystal is typically on the order of 30ppm or so.


> ... What is the expected accuracy of the Basic-X Real Time Clock?

You should see something on the order of 12ppmillion or better accuracy
if the RTC isn't changed or delayed by other functions that cause it to
miss ticks.

One of my early BX-24 apps keeps a local clock that is corrected by GPS
when its available. The code learns the RTC error rate and corrects it
by inserting or deleting a period of about 500uS as required, and it
learns a temperature correction curve. Photo "GALs for glue logic", in
the group's Photos section, shows the crystal and LM34 coupling in one
device. Typical learned error rates cause the 0.5mS correction to occur
once about every 20 or 30 seconds.

Your bump of one RTC tick per second is a huge error, by my experience,
Art, about 2000ppm; that should not be necessary. For perspective, the
typically-quoted one minute per month worst-case error of a wristwatch
is about 23ppm. Your BX-24 should be on that order. Tom
Tom Becker
--... ...--
www.RighTime.com
The RighTime Clock Company, Inc., Cape Coral, Florida USA
+1239 540 5700