Continue to Site

Welcome to

Welcome to our site! is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

Question about RTC and crystal

Not open for further replies.


Junior Member level 1
Feb 9, 2002
Reaction score
Trophy points
Activity points

Hello everyone,

Recently I've a real time clock project, the objective is to generate an accurate 1Hz output using 32768Hz crystal.

At first I think it's a simple project, all I've to do is to create a 15-bit prescaler circuit ( 32768/(2^15)=1Hz ).

The problem is: our customer want to include a digital circuit to fine-tune the output frequency that may due to the environment variation impacting the crystal frequency. What's more they want the circuit to generate 1024Hz test output to make fine-tunning faster.

Here's my questions:
- Typically how accurate is 32768Hz crystal (e.g. +/-1Hz ? +/-0.1Hz ?) ?
- Does the crystal accuracy affect much by environment (e.g. 32767Hz@-25C & 32769Hz@125C) ?
- Is it practical to generate 1024Hz test output for fine-tunning ? (e.g. if crystal freq. = 32769Hz, then test freq. = 1024.03Hz, that mean it require ~50sec. to detect this 1Hz crystal freq. variation. The situation even get worst when detecting smaller crystal freq. variation)

Pls. feel free to reply If you've any suggestion. Thanks!



Would it be possible to choose another crystal frequency in the few MHz range instead of the 32.768kHz? I think that by wrapping up the some MHz crystal even in a cold-thermostat, its relative change in the output 1Hz frequency will maybe already acceptable after the longer division-chain.
Of course the question is how accurate the 1Hz should be... (ppm).
In general a crystal's precision much depends on the reactancies it is put into a circuit. Nevertheless, I would select crystals with very high Q values {Q>80000-120000!} (the cheap computer crystals do not have such high Qs).
The temp varia depends on the cut of a crystal, maybe the SC-cut is the less dependent on temperature. Yes, crystals'frequencies do depend on temp! Other factor to be considered is the driving power an oscillator forces on the crystal: to much/strong feedback may heat the crystal!

If you do a google search on crystal oscillators or circuits, (also on VCXO,TCXO) you can surely find further topics on these problems to your advantage.

Regards, unkarc

You don't need to build some complicated circuit just use 4060 ( CMOS IC). There is cristal oscilator and 14 level divider in it(with 32768Hz crystal it will provide 2Hz output). It's work well. If you need measure the deviation of low frequency signal you need to measure the period ( most counters have this option).It is general method of low frequency mesurment!
The answers of your question depends very much of exact type of crystal that you use . Some cheap types can br tuned +/-10Hz and even worse!!!

In fact you can use 4MHz crystal and single IC to obtain 1Hz signal. There is a lot of such IC, just search on motorola website for this...

Thanks for the suggestion.

Unfortunately I can't use crystal at MHz range :sad: Higher frequency means higher power consumption...

The crystal oscillator's frequency will surely deviate somewhat with the ambient temperature. Crystal's are usually intended to be loaded with a certain amount of capacitance. Should this capacitance be changed, then the crystal's resonance frequency (and the oscillator's too) will change also.

There exist ceramic capacitors of suitable capacitance range (approx 10-47 pF) which are made of different types of ceramic. I've seen solutions where ceramic capacitors with different temperature coefficients have been mixed and incorporated into a crystal oscillator circuit to counteract the temperature-dependent drift of the oscillator's frequency.

This is a cheap solution but requires good knowledge of the temperature coefficients of the crystal and capacitors used, so a lot of design efforts and/or simulations are likely required in order to get a good result.


Just go get the cheap, super-accuracy 32,768 Hz RTC chip from Dallas Semi. It so accurate over time and temperature your shoes will jump off your feet! Take a look.

BTW, can anyone tell me how to relate "ppm" with the crystal freq. in terms of "+/-Hz" ?

I've seen lots of spec. mentioning accuracy in terms of "ppm", but I don't know how to convert it into "+/-Hz" or "+/-sec per month"... etc. Thanks!


ppm is PartPerMillion, so 20 ppm means


Hi eefelix,

I suggest you to have a look to Kony quartz. I know they have good performances and low drift with temperature even for 32768Hz.

If you have a 32768Hz quartz with +/-1ppm the quaranted frequency is 32768Hz +/- 0.032768Hz.

Thanks for the explanation of "ppm".

I still have one question : when I look at those crystal spec. they usually have a parameter call "freq. tolerance" / "calibration tolerance", what's that mean ? If the value is say 100ppm@25C for 32768Hz crystal, is that mean :

A. each crystal may contain ~3Hz of freq. deviation due to manufacturing variation;

B. each crystal may contain ~3Hz of freq. deviation due to the loading cap. of the osc. circuit;

C. Other meaning ?

The anwser is A. This means frequency deviation for properly connected( may be optimal is better word) to the circuit quarz.

Thanks for answering.

I still have a question :razz:

Let's say if the 32768Hz crystal freq. is deviated by 100ppm (~3Hz) due to manufacturing & temperature variation. How can I fine tune or compensate the generated 1024Hz / 1Hz frequency ?

If I fine tune it using digital circuit, all I can do is "pulse deletion", it can only fine tune the 32768Hz in 1Hz inc/decrement precision.

If I want to fine tune the 32768Hz in say 0.1Hz precision, can I achieve it by tuning the loading cap. of the osc. circuit ? If yes, up to how many Hz I can fine tune ?


Hi Felix,

The general rule of thumb for the tunability/pulling of a crystal is that --depending on the activity of it and the chosen oscillator circuit-- it can be tuned by a few hundred Hertz for every MHz, usually with a series capacitor which can be partly or fully the recommended loading capacitor. This means for instance that if you have a 1MHz crystal, then you can tune it by 400-700Hz, maybe 1kHz without losing much stability. This is bad news for your 32.768kHz crystal, because this rule gives some 10-30Hz or so tuning possibility...
Nevertheless, you may test it by building your oscillator with CMOS gates like the one at h**p:// and you may replace the 39pf capacitor first with a variable trimmer to experience your crystals' pulling ability/activity. I mean the circuit with the title: "Crystal 32.768KHz CMOS Oscillator". If you are satisfied with the pullability, then you may replace the variable cap with a similar value varicap diode and see how you can tune with that.
So with your test circuit you could gain useful practical experience on your crystals.

The reason why I recommended a higher crystal frequency earlier was that the pullability increases with frequency and everything gets easier in this respect but in your case if the current consumption counts so much, then you are left with the harder way...

Good luck,


Not open for further replies.

Part and Inventory Search

Welcome to