WTF with my computer clock?

But is there any real difference between a 'quartz' watch and a PC clock? They both rely on a low cost crystal?

--
*A journey of a thousand sites begins with a single click *

    Dave Plowman        dave@davenoise.co.uk           London SW
                  To e-mail, change noise into sound.
Reply to
Dave Plowman (News)
Loading thread data ...

Size? Temp?

Does a tiny watch xtal garner any more accuracy merely because of its size?

Does a watch xtal have a different temperature coefficient?

Reply to
Meat Plow

You are confusing the hardware clock and software clock in a computer.

The hardware clock is crystal controlled. It is used at boot time to set the software clock.

The software clock is incremented by the lowest priority interupts, which causes it to wander off.

There are various schemes to sync it with the hardware clock, but without an external source, e.g. NTP, the don't work very well as hardware clocks are not very accurate.

Geoff.

--
Geoffrey S. Mendelson, Jerusalem, Israel gsm@mendelson.com  N3OWJ/4X1GM
Reply to
Geoffrey S. Mendelson

The question asked was;

I had nothing confused.

Reply to
Meat Plow

Oh yes. The original Accutron was a steel tuning fork osillator. No crystal of any kind to drive it. It depended totally on mechanical stability.

Watch crystals come in a few flavors. The original version used Statek type quartz tuning forks. They're really a mechanical tuning fork made out of quartz:

They work nicely at low frequencies and do not require a large divider chain to drive the gears. 32.768Khz was the most common.

As IC technology progressed, it was more economical to use a big divider chain and a higher frequency crystal such as 3.57945Mhz. Meanwhile, someone figured out how to shrink the 32.768Mhz crystal, so the next generation went back to those. (This is a gross over simplification). The problem is that these relatively low frequency and small physical size crystals have a terrible temperature coeficient. Here's a typical data sheet:

The original IBM PC used a 14.31818MHz AT cut crystal. It was much more stable, but there was no mechanism for adjusting the exact frequency. There was also no temperature compensation or even the use of temperature stable capacitors. This sorta explains how it works and includes at series of curves for AT and SC cut crystals.

The IBM PC oscillator was somewhat of an improvement in stability over the typical watch crystal, but without an adjustment, it was nearly useless.

Since 1981, I've looked inside literally hundreds of computahs and SBC's. Not a single one has a tunable clock oscillator. One or two used replaceable modular oscillators, which could pre purchased as a TCXO, but which were usually supplied as a commodity clock oscillator.

These daze, the way to stabilize a TCXO is to first pre-age (beat-up) the crystal to reduce long term drift. The crystal oscillator is then characterized over the required temperature range. A table of frequency versus temperature is generated and saved in a PROM. A PIC controller on the oscillator takes the measured temperature, reads the table, and applies the necessary correcting voltage to a varactor to stabilize the oscillator over a very wide temp range. With this method, you can take a really awful crystal, and compensate it to impressive accuracies.

gotta run...

--
Jeff Liebermann     jeffl@cruzio.com
150 Felker St #D    http://www.LearnByDestroying.com
Santa Cruz CA 95060 http://802.11junk.com
Skype: JeffLiebermann     AE6KS    831-336-2558
Reply to
Jeff Liebermann

On 8/19/2009 12:49 PM Jeff Liebermann spake thus:

So I wonder if the lowly SX28, one of my favorite little machines to program (a PIC-like li'l guy) is an exception to this seeming rule?

I ask because, looking at the specs for this CPU, it has some configuration bits (marked IRCTRIM0-2) that trim the internal RC oscillator frequency, supposedly in steps of about 3%, up to a maximum of +/- 8% (yeah, I know, doesn't add up, but whatever). Is this what you would call a "tunable oscillator"?

So presumably what I just described is a varactor built into the SX28.

--
Found--the gene that causes belief in genetic determinism
Reply to
David Nebenzahl

Is that the Ubicom or Parallax SX28 processor? Dunno, I've never worked with these. (Reminder: I are not a programmist).

I can't tell for sure:

See Section 9.0 I don't see any internal or external compensation for temperature drift. It does have a real time clock, but again, no stabilization. There is a section in the RC oscillator (FUSE register) which sets the divider ratio from the RC oscillator. This is really a coarse adjustment to set the divider ratio to generate an assortment of frequencies between 31KHz and 4MHz. No way is it intended for fine tuning for temp compensation.

I don't think so. I couldn't see such a feature on the data sheet. Varactors are also chip real estate hogs, and would usually require substantial documentation and explanation to impliment. I don't see any of that in the data sheet.

I sorta blundered across this: "NTP temperature compensation"

Reply to
Jeff Liebermann

Re: Accutron watches

-- snippage --

I used mine for sports car rallies, and needed to synch it to WWV fairly often (weekend rallies), but it was damn hard to set to the nearest second even though I had the jeweler install the "hack" feature. I learned to adjust it to run just slow enough so that accidental knocks and so on would never put it ahead of time during the week. Then, simply by giving it a good "thump" on the edge, I could overdrive the fork briefly (it would do a three-tooth push on the driven gear instead of the usual two), which would make it gain a good fraction of a second. A few of those would get the thing spot on.

Bulova said it was air density.

As well as every other momentum-transfer effect that plagues tuning forks. Interestingly, they also affect those 32,768 Hz. crystals because they are physically shaped like tuning forks (that's the only oscillatory mode that can run that slowly in such a small piece of quartz).

John Harrison's marine chronometer, developed for the British navy in the mid-1700's, was good for about a minute a month, which was considered the lowest accuracy usable for navigation. The Accutron was the first "commercial" watch to have the same accuracy.

Isaac

Reply to
isw

Most do. In many cases, the actual "CPU clock" of a couple of GHz. or so, is derived from that same crystal, upconverted by a digital phase-locked loop.

Isaac

Reply to
isw

Putting a crystal in a temperature-stabilized "oven" is a well known technique for generating a stable frequency (the telco folks and the broadcast folks have been doing that for over 75 years, at least).

I have thought for a long time that it would be "neat" to glue a resistor to the crystal case, and use heat to control the frequency. You'd pulse-width modulate the power going to the resistor...

Isaac

Reply to
isw

Because of the oscillatory mode, low-frequency watch crystals are notoriously inaccurate.

Yes; poor, for the same reason.

Isaac

Reply to
isw

Yep. Motorola land mobile radios have had OCXO oscillators since the

1960's. However, in the mid 1970's, most land mobile radios switched to TCXO (temperature compensated xtal osc), which draw less power, and are less prone to burning out.

Yep. Some of the really cheap land mobile radios did that. There was a metal clip, holding a resistor, sometimes with some silicon grease. The problem with that scheme is that the lack of thermal insulation means the resistor is going to burn plenty of excessive power heating the nearby components and chassis. Same problem with a computah. Some styrofoam insulation and a plastic can, is usually sufficient insulation.

Note that there are quite small OCXO's that would work very nicely in a PC. The small size and internal vacuum insulation means very little heat loss and fairly fast warm up time.

Incidentally, one problem with using an OCXO is that it sucks quite a bit of power when the computah is turned OFF. If you kill the power to the oven, the clock oscillator will drift away merrily, and there goes your accuracy. I also don't think the EPA or Joe Sixpack will appreciate the power drain. It certainly won't qualify for an Energy Star rating.

--
Jeff Liebermann     jeffl@cruzio.com
150 Felker St #D    http://www.LearnByDestroying.com
Santa Cruz CA 95060 http://802.11junk.com
Skype: JeffLiebermann     AE6KS    831-336-2558
Reply to
Jeff Liebermann

ElectronDepot website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.