• If you want a general crystal-controlled embedded system to
keep accurate time, you can choose to keep the device in an
oven (or fridge) at a fixed temperature, and fine-tune the
software to keep accurate time. This is, however, rarely
practical.
• ‘Temperature Compensated Crystal Oscillators’ (TCXOs)
are available that provide - in an easy-to-use package - a
crystal oscillator, and circuitry that compensates for changes
in temperature. Such devices provide stability levels of up to
±0.1 ppm (or more): in a clock circuit, this should gain or
lose no more than around 1 minute every 20 years.
TCXOs can cost in excess of $100.00 per unit...
• One practical alternative is to determine the temperature frequency
characteristics for your chosen crystal, and include
this information in your application.
For the cost of a small temperature sensor (around $2.00),
you can keep track of the temperature and adjust the timing
as required.