EmbeddedRelated.com
Forums
The 2024 Embedded Online Conference

Variations on XTAL clock frequency

Started by Unknown February 19, 2005
Is there any published research/report about how much "uncertainity" and/or 
variations must be expected on a PC clock frequency ? 


[X-posted without a F'up2 concentrator.  Fixed.]

In comp.arch.embedded Sunwaesh wrote:
> Is there any published research/report about how much "uncertainity" and/or > variations must be expected on a PC clock frequency ?
I doubt there'll be much about PC clocks in particular --- but I'm sure there's plenty about crystal oscillator stability in general, which will apply to PCs quite seamlessly. -- Hans-Bernhard Broeker (broeker@physik.rwth-aachen.de) Even if all the snow were burnt, ashes would remain.
What you are asking would be dependent on the grade crystal materials that
they select for manufacturing them. The crystals have a thermo, and internal
pressure coefficient factor to deal with. They are also a bit voltage
sensitive, as in part of the feedback circuit employed in the design of the
oscillator that they are part of.

For home computers, they do not need to use an expensive high stability type
crystal, as such that is used for precision instrumentation. I would not be
surprised if the clocking frequency in a home PC machine is drifting about
1% to 2%. As long as everything keeps properly synchronized there will be no
problem, no matter what the master clocking frequency is.

The time keeping crystal in a PC is different from the one used for the main
system. The actual real time clock is a separate operation. It is read by
the main system, only at the times where it needs to get the time of day,
and the date data. The time of day accuracy of most computers is about the
same as any low cost quartz watch. I found the time of day on most computers
to drift as much as several minutes a month, if not corrected. A typical
Timex or Casio watch can do better than 15 seconds per month.

There are softwares available to re-set the clock automatically from some of
the various time standard services around the world. I believe that XP comes
with such a software. This can be done over the internet.

If you have the budget you can install a GPS time standard system, and
install the hardware and software in your computer to work with it. The GPS
antenna would have to be installed at a location where it can clearly see
the sky to receive the GPS satellite data. This type of installation would
result in the most possible accurate time of day standard for a PC computer.

-- 

Jerry G.
=====

<Sunwaesh> wrote in message
news:4217077d$0$1023$afc38c87@news.optusnet.com.au...
Is there any published research/report about how much "uncertainity" and/or
variations must be expected on a PC clock frequency ?



Jerry G.,

Thank you for your valuable  answer.
In a project I need to have time synchronization between a set of computers 
where some of them are networked together on a LAN (no internet) and some 
others are running stand alone. I am planning to use the 
one-pulse-per-second (1PPS) signal from the GPS receivers. The networked 
computers will have one GPS receiver and all the other stand alone computers 
will have their own GPS receivers. GPS receivers will generate 1PPS signals 
to interrupt the computers to set their internal time clocks. Applications 
will use the computer timer (get the time of the day). I want to model (some 
how, but I do not know how) the probable variation that a computer clock may 
have between 1PPS signals.

Would anyone comment/argue/recommend/suggest/propose how one can model the 
variation on a PC clock frequency ?

Regards,


> What you are asking would be dependent on the grade crystal materials that > they select for manufacturing them. The crystals have a thermo, and > internal > pressure coefficient factor to deal with. They are also a bit voltage > sensitive, as in part of the feedback circuit employed in the design of > the > oscillator that they are part of. > > For home computers, they do not need to use an expensive high stability > type > crystal, as such that is used for precision instrumentation. I would not > be > surprised if the clocking frequency in a home PC machine is drifting about > 1% to 2%. As long as everything keeps properly synchronized there will be > no > problem, no matter what the master clocking frequency is. > > The time keeping crystal in a PC is different from the one used for the > main > system. The actual real time clock is a separate operation. It is read by > the main system, only at the times where it needs to get the time of day, > and the date data. The time of day accuracy of most computers is about the > same as any low cost quartz watch. I found the time of day on most > computers > to drift as much as several minutes a month, if not corrected. A typical > Timex or Casio watch can do better than 15 seconds per month. > > There are softwares available to re-set the clock automatically from some > of > the various time standard services around the world. I believe that XP > comes > with such a software. This can be done over the internet. > > If you have the budget you can install a GPS time standard system, and > install the hardware and software in your computer to work with it. The > GPS > antenna would have to be installed at a location where it can clearly see > the sky to receive the GPS satellite data. This type of installation would > result in the most possible accurate time of day standard for a PC > computer. > > -- > > Jerry G. > ===== > > <Sunwaesh> wrote in message > news:4217077d$0$1023$afc38c87@news.optusnet.com.au... > Is there any published research/report about how much "uncertainity" > and/or > variations must be expected on a PC clock frequency ? > > >
What you need is not a 1 pps, but is to have the proper decoder to decoded 
the GPS time signal, and then feed the computers with a true time reference. 
There are Ethernet, and serial interfaces for this. You should get in touch 
with a manufacture of this type of equipment to find out about the necessary 
software, and matched GPS system for this.

Using a simple pps is not good, because of one computer jumps off time, it 
will not be corrected. It will stay the way is until it is manually 
corrected, or it may even jump out again. Sometimes the clock in a computer 
goes off time, because it hit a program glitch. The real time clock will not 
reset the computer until it is re-started, or until someone comes along and 
re-sets the clock.

There are two companies that I have dealt with for the hardware and 
software's to do what you want. There is Leitch Video 
http://www2.leitch.com/Custserv/products.nsf/WP/Reference , and Torpy Time 
http://www.torpeytime.com/main.htm

For our clients, I have used products from both of these manufactures for 
time keeping, and have had great satisfaction. We also use many of the 
Leitch broadcast systems products, and they are also excellent.

-- 

Jerry G.
======


<Sunwaesh> wrote in message 
news:4217214a$0$1998$afc38c87@news.optusnet.com.au...
Jerry G.,

Thank you for your valuable  answer.
In a project I need to have time synchronization between a set of computers
where some of them are networked together on a LAN (no internet) and some
others are running stand alone. I am planning to use the
one-pulse-per-second (1PPS) signal from the GPS receivers. The networked
computers will have one GPS receiver and all the other stand alone computers
will have their own GPS receivers. GPS receivers will generate 1PPS signals
to interrupt the computers to set their internal time clocks. Applications
will use the computer timer (get the time of the day). I want to model (some
how, but I do not know how) the probable variation that a computer clock may
have between 1PPS signals.

Would anyone comment/argue/recommend/suggest/propose how one can model the
variation on a PC clock frequency ?

Regards,


> What you are asking would be dependent on the grade crystal materials that > they select for manufacturing them. The crystals have a thermo, and > internal > pressure coefficient factor to deal with. They are also a bit voltage > sensitive, as in part of the feedback circuit employed in the design of > the > oscillator that they are part of. > > For home computers, they do not need to use an expensive high stability > type > crystal, as such that is used for precision instrumentation. I would not > be > surprised if the clocking frequency in a home PC machine is drifting about > 1% to 2%. As long as everything keeps properly synchronized there will be > no > problem, no matter what the master clocking frequency is. > > The time keeping crystal in a PC is different from the one used for the > main > system. The actual real time clock is a separate operation. It is read by > the main system, only at the times where it needs to get the time of day, > and the date data. The time of day accuracy of most computers is about the > same as any low cost quartz watch. I found the time of day on most > computers > to drift as much as several minutes a month, if not corrected. A typical > Timex or Casio watch can do better than 15 seconds per month. > > There are softwares available to re-set the clock automatically from some > of > the various time standard services around the world. I believe that XP > comes > with such a software. This can be done over the internet. > > If you have the budget you can install a GPS time standard system, and > install the hardware and software in your computer to work with it. The > GPS > antenna would have to be installed at a location where it can clearly see > the sky to receive the GPS satellite data. This type of installation would > result in the most possible accurate time of day standard for a PC > computer. > > -- > > Jerry G. > ===== > > <Sunwaesh> wrote in message > news:4217077d$0$1023$afc38c87@news.optusnet.com.au... > Is there any published research/report about how much "uncertainity" > and/or > variations must be expected on a PC clock frequency ? > > >
<Sunwaesh> wrote in message 
news:4217214a$0$1998$afc38c87@news.optusnet.com.au...
> Jerry G., > > Thank you for your valuable answer. > In a project I need to have time synchronization between a set of > computers where some of them are networked together on a LAN (no internet) > and some others are running stand alone. I am planning to use the > one-pulse-per-second (1PPS) signal from the GPS receivers. The networked > computers will have one GPS receiver and all the other stand alone > computers will have their own GPS receivers. GPS receivers will generate > 1PPS signals to interrupt the computers to set their internal time clocks. > Applications will use the computer timer (get the time of the day). I want > to model (some how, but I do not know how) the probable variation that a > computer clock may have between 1PPS signals. > > Would anyone comment/argue/recommend/suggest/propose how one can model the > variation on a PC clock frequency ? >
You should have mentioned your project in your first post. For the networked PCs you can use Network Time Protocol. Run an NTP server on your time standard PC and run clients on all the others. This learns the error rate of the PC clock and gently slews the time of the client to keep it in sync. This ensures that the time is monotonic (always goes forwards) and doesn't have discontinuities. It also has the great advantage that you just have to install it as everything has been written for it already. For the standalone PCs the simplest model that I can think of is that the PC clock runs at fairly constant but slightly incorrect speed. When you have measured the rate of time drift you can estimate what the offset you need for the correct time. You will have to average it out over a long time to get an accurate value. You should always be measuring the drift so that you can adapt to change in the rate of drift. This should be stable enough for anything that a PC needs to do. Peter
Sunwaesh wrote:
> Jerry G., > > Thank you for your valuable answer. > In a project I need to have time synchronization between a set of computers > where some of them are networked together on a LAN (no internet) and some > others are running stand alone. I am planning to use the > one-pulse-per-second (1PPS) signal from the GPS receivers. The networked > computers will have one GPS receiver and all the other stand alone computers > will have their own GPS receivers. GPS receivers will generate 1PPS signals > to interrupt the computers to set their internal time clocks. Applications > will use the computer timer (get the time of the day). I want to model (some > how, but I do not know how) the probable variation that a computer clock may > have between 1PPS signals. > > Would anyone comment/argue/recommend/suggest/propose how one can model the > variation on a PC clock frequency ? > > Regards, > > > >>What you are asking would be dependent on the grade crystal materials that >>they select for manufacturing them. The crystals have a thermo, and >>internal >>pressure coefficient factor to deal with. They are also a bit voltage >>sensitive, as in part of the feedback circuit employed in the design of >>the >>oscillator that they are part of. >> >>For home computers, they do not need to use an expensive high stability >>type >>crystal, as such that is used for precision instrumentation. I would not >>be >>surprised if the clocking frequency in a home PC machine is drifting about >>1% to 2%. As long as everything keeps properly synchronized there will be >>no >>problem, no matter what the master clocking frequency is. >> >>The time keeping crystal in a PC is different from the one used for the >>main >>system. The actual real time clock is a separate operation. It is read by >>the main system, only at the times where it needs to get the time of day, >>and the date data. The time of day accuracy of most computers is about the >>same as any low cost quartz watch. I found the time of day on most >>computers >>to drift as much as several minutes a month, if not corrected. A typical >>Timex or Casio watch can do better than 15 seconds per month. >> >>There are softwares available to re-set the clock automatically from some >>of >>the various time standard services around the world. I believe that XP >>comes >>with such a software. This can be done over the internet. >> >>If you have the budget you can install a GPS time standard system, and >>install the hardware and software in your computer to work with it. The >>GPS >>antenna would have to be installed at a location where it can clearly see >>the sky to receive the GPS satellite data. This type of installation would >>result in the most possible accurate time of day standard for a PC >>computer. >>
I'd consider installing a NTP service / daemon. It is able to slowly adjust the clock division ratio so that the timing stays put. Even without an external server, NTP is able to use your GPS 1pps tick as the reference clock. For more information, Google for NTP or Network Time Protocol. NTP is also excellent for keeping your networked computers in sync. -- Tauno Voipio tauno voipio (at) iki fi
The specifications of the crystal will tell you.

> For home computers, they do not need to use an expensive high stability > type > crystal, as such that is used for precision instrumentation. I would not > be > surprised if the clocking frequency in a home PC machine is drifting about > 1% to 2%. As long as everything keeps properly synchronized there will be > no > problem, no matter what the master clocking frequency is.
That would be a gigantic drift for even a very cheap crystal. I think 1/10,000 is more typical of what would be a large drift from a low-quality crystal.
>Jerry G., > >Thank you for your valuable answer. >In a project I need to have time synchronization between a set of computers >where some of them are networked together on a LAN (no internet) and some >others are running stand alone. I am planning to use the >one-pulse-per-second (1PPS) signal from the GPS receivers. The networked >computers will have one GPS receiver and all the other stand alone computers >will have their own GPS receivers. GPS receivers will generate 1PPS signals >to interrupt the computers to set their internal time clocks. Applications >will use the computer timer (get the time of the day). I want to model (some >how, but I do not know how) the probable variation that a computer clock may >have between 1PPS signals.
For those computers which are LAN'ed together, you should certainly consider running NTP. The commonly-used "ntpd" daemon for Unix and Linux and etc. will handle the inter-system coordination, and also has drivers for most GPS and similar external clock systems (including the PPS input). The PPS pulses are infrequent enough, and subject to enough jitter, that the drivers will need to do a fairly significant amount of low-pass filtering before using the pulse information to calibrate the internal clock.
>Would anyone comment/argue/recommend/suggest/propose how one can model the >variation on a PC clock frequency ?
As I understand it, you're going to be dealing with at least two separate "clocks" per PC. One is the on-board date/time-of-day clock chip, which is typically driven by (or drives) a 32.768 kHz quartz low-power "watch crystal". These usually seem to have accuracies in the 10-15 seconds per month range, like a cheap wristwatch. This part of the hardware is designed to provide a coarse setting of the date and time when the system is booted, and as I understand it the interface to the chip usually does not provide a way to read or set the time to any precision greater than +/- 1 second. The other is the system's main CPU or bus oscillator, which is divided down and generates interrupts at a predictable rate (many per second) and/or is used to run a high-speed counter within the CPU itself. This is also a quartz-crystal oscillator. It has a higher readout precision than the clock chip, but you have to be careful about using it... if you try to track the time-of-day by counting clock interrupts (as I believe Linux does) you can "lose time" if another device driver, or the BIOS itself, locks out interrupt processing for more than a few milliseconds. These two clocks/oscillators are not correlated with one another as they're driven by separate quartz crystals. Both are subject to error and drift due to temperature changes, but there's no guarantee that the two crystals have identical or even similar temperature coefficients of change. The Unix "ntp" daemon software is able to estimate a given system's amount of clock error and keep a record of the amount of drift (in parts per million), and will load this value and use it to tweak the clocking when the system is booted. As to modelling the error you see on a PC's clock: you're going to have to deal with several sources of error. To a first approximation, you can consider the PPS data to be "short-term jittery, but long-term stable". The 60 Hz powerline frequency is similar... jittery in the short term due to noise, somewhat drifty over the course of a day, but quite stable in the average over the long term. The PC's quartz crystal oscillators are probably at about the opposite end of the spectrum - quite stable in the short term, with a fairly constant amount of error (in PPM) in the long term, and some amount of temperature-related drifting around in the middle. You might find it useful to review the information on Brooks Shera's page at http://www.rt66.com/~shera/index_fs.htm - he discusses the construction of a system which uses a GPS receiver's PPS signal to discipline a high-stability quartz crystal oscillator. -- Dave Platt <dplatt@radagast.org> AE6EO Hosting the Jade Warrior home page: http://www.radagast.org/jade-warrior I do _not_ wish to receive unsolicited commercial email, and I will boycott any company which has the gall to send me such ads!
Hello Sunwaesh,

If it is a modern PC or laptop keep in mind that clock frequencies are 
often purposely dithered. That way the spectral energy spreads and the 
manufacturer often gets around an EMC nightmare.

Regards, Joerg

http://www.analogconsultants.com

The 2024 Embedded Online Conference