Connect with us

Variations on XTAL clock frequency

Discussion in 'Electronic Components' started by Guest, Feb 19, 2005.

Scroll to continue with content
  1. Guest

    Guest Guest

    Is there any published research/report about how much "uncertainity" and/or
    variations must be expected on a PC clock frequency ?
     
  2. [X-posted without a F'up2 concentrator. Fixed.]
    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.
     
  3. Jerry G.

    Jerry G. Guest

    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
    Is there any published research/report about how much "uncertainity" and/or
    variations must be expected on a PC clock frequency ?
     
  4. Guest

    Guest Guest

    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,
     
  5. Jerry G.

    Jerry G. Guest

    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
    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,
     
  6. Tauno Voipio

    Tauno Voipio Guest

    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.
     
  7. mc

    mc Guest

    The specifications of the crystal will tell you.
    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.
     
  8. Dave Platt

    Dave Platt Guest

    Jerry G.,
    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.
    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.
     
  9. Joerg

    Joerg Guest

    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
     
  10. Robert Scott

    Robert Scott Guest

    Not true. You can buy a GPS receiver that produces 1 PPS with hardly
    any jitter at all. By using a PLL, a high-quality frequency standard
    can and has been made. You don't need a lot of low-pass filtering in
    that PLL.



    -Robert Scott
    Ypsilanti, Michigan
    (Reply through this forum, not by direct e-mail to me, as automatic reply address is fake.)
     
  11. Dave Platt

    Dave Platt Guest

    The PPS pulses are infrequent enough, and subject to enough jitter,
    Well, from what I've heard and read... it depends.

    For one thing, different GPS receivers have different amounts of
    jitter in their PPS pulses. Some (e.g. the Oncore series) are quite
    good, while others have a larger amount of variation in timing. This
    seems to be due to software/firmware design in the GPS receivers'
    controllers. In his discussion on GPS-disciplined oscillators at the
    site I mentioned, Brooks Shera notes that many GPS receivers' PPS
    pulses are too jittery to use as a source for PLL-disciplining a good
    oscillator.

    For another thing... most PCs don't have special-purpose PLL or other
    capture hardware to "catch" the exact timing of the PPS signal.
    Simple approaches usually seem to involve hooking up the PPS line to a
    parallel-port pin, to a serial-port CD pin, etc. and generating an
    interrupt. The interrupt service routine then captures the
    processor's high-resolution clock value. With most operating systems,
    there can be a large amount of jitter in the time needed to enter the
    ISR, depending on what other interrupt or kernel activity is taking
    place. If your PC is down deep in the network card's interrupt
    service routine and is handling heavy amounts of packet traffic, it
    could require many microseconds, or in some cases a millisecond or
    more, to enter the serial/parallel port ISR and sample the CPU clock.
    This source of jitter is likely to be much greater than the jitter in
    the GPS PPS pulse itself.

    Since the original poster asked about the timing error "between PPS
    pulses" and didn't mention the use of special-purpose low-jitter
    capture hardware, my guess is that this CPU/OS-induced jitter may very
    well be relevant to the problem.
     
  12. Robert Scott

    Robert Scott Guest

    I agree. I tried to make a high-quality frequency standard using a
    Sandpiper GPS receiver. The 1-PPS output was very low jitter on one
    edge but very high jitter on the opposite edge. Probably a flip-flop
    was being reset by software. I started out using the wrong edge and
    couldn't understand why my loop was so unstable. When I switched to
    the other edge, then everything worked out fine. This was
    special-purpose hardware, not just a digital input pin on a PC, so I
    agree also that unless you have special-purpose hardware, you really
    can't do much with that low-jitter pulse.


    -Robert Scott
    Ypsilanti, Michigan
    (Reply through this forum, not by direct e-mail to me, as automatic reply address is fake.)
     
  13. The Answer is that without knowing a whole lot of Factors (temperature of
    the crystal oscillator, specs of the oscillator etc) it is not easy to model
    or estimate the accuracy of a PC's internal clock beyond 'adequate for most
    scenarios' If accuracy is required a better clock is required.

    The Clock source from the GPS (if properly locked and implemented by the GPS
    manufacturer) should be close to a Cesium clock in terms of accuracy and
    will be several orders of Magnitude ( around 1 part in 1*10^12) better than
    the clock from the PC which will be around 100 Parts per million if the
    Temperature is kept constant at around 25c

    A few links FYI
    http://www.beaglesoft.com/stsystarcardspecs.htm#StarSync
    http://www.gpsclock.com
    http://www.aelcrystals.co.uk/
     
  14. Guest

    The battery-powered RTC clock is frequently VERY inaccurate, though.
    For reasons I've never had explained to me, they almost always have a
    trimcap on that xtal. Their Q/C processes to set that trimcap appear to
    be FUBAR.
     
  15. Graham W

    Graham W Guest

    What trimcap? I've never seen one in a PC RTC circuit and, golly, does
    it need it!
     
  16. Guest

    Maybe your motherboard collection differs from mine. But every board
    I've owned (except some of the laptops) has had a trimcap.

    Mystery why they bother to put such fine-tuning on there, since it is
    very common to get as much as 10 seconds drift per day!
     
  17. I would not have expected an un-trimmed Crystal to drift more than 100 Parts
    per Million or 86.4 mS per day, the Laptop I am using at the moment is still
    within a Second of the Talking clock and I set it 3-4 Months ago.
    I am sure I would have noticed if Clocks on any PC's I used were losing or
    gaining 10 Seconds a day
     
  18. MC

    MC Guest

    You're fortunate...
    I've only had one laptop out of 4 that didn't drift in time too much.
    My current one loses about 4 seconds per day., my previous one
    gained about 2 seconds per day.
    The PC battery-backed-up clock system was 'adequate' when it was
    created back in the mid 1980's, but unfortunately that part of
    the PC architecture hasn't changed much since then.
     
  19. Phil Allison

    Phil Allison Guest

    "Richard Freeman"

    ** 100 ppm = 1 part in 10,000.

    A day has 24 x 60 x 60 seconds or 86,400 seconds.

    So a 100 pm error is 8.64 seconds !!!

    You are only 1000 times out.


    ** Sure - drift is nearly all due the tempco of the crystal.

    If the AVERAGE temp value is steady from day to day then there is virtually
    no DRIFT.

    There may well be fixed setting error though.


    ** The tempco drift is only a few ppm *per degree C* for most crystals,
    over the range from 10 to 35 C.

    The indoor temp averaged over a month varies only a few degrees compared
    with the previous or next month.

    So, the month to month variation should be maybe +/- 10ppm or 0.86
    seconds.

    Seems about right to me.



    ................ Phil
     
  20. Phil Allison

    Phil Allison Guest

    "Phil Allison"


    ** Correction.


    .............. Phil
     
Ask a Question
Want to reply to this thread or ask your own question?
You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.
Electronics Point Logo
Continue to site
Quote of the day

-