The clock function is a standard part of nearly every electronic system, with very few exceptions. Behind this simple-sounding, commonplace word, there is an array of complexity and subtlety in definition, performance, and design. Clocks are both vital and ubiquitous, so it is worth understanding the different functions they fulfill, they ways they can be implemented, and the factors which must be specified in different applications.
What is meant by a “clock?”
An idealized “clock,” Figure 1, can imply different functions:
- It can be as basic as a “real time clock” (RTC) which is simply responsible for establishing and possibly displaying the time of day, usually with resolution of a fraction of a second (at most), with timing derived from a relatively low-frequency source under 100 kHz.
- It can be the clock which paces a processor, ranging in frequency from a few MHz to tens of MHz.
- It can be a sampling clock which initiates A/D and D/A conversions for a data-sampling function, a wired link, or a wireless RF channel.
- It can establish the tuning of a synthesized oscillator in digital tuning, which is now the dominant form of channel selection in TVs, cell phones, transmitters and receivers, and data links.
- A clock may act as the equivalent of a master tuning fork for setting the frequencies of notes (pitches) in electronic musical instruments or the special tones of the landline phone DTMF (dual tone multifrequency) keypad.
For each of these situations, not only are there differences in which parameters are crucial, but also in the performance specifications needed for each one.
How can a clock be implemented?
There are many ways, and the preferred approach depends on the clock function and application. For the low-accuracy clock of a microcontroller in a simple consumer product such as a temperature sensor/display, the clock may use an integral oscillator circuit within the microcontroller with an external resistor/capacitor (RC) network—simple, cheap, and basic.
If the clock function is just for clock in the traditional sense of the word (such as for a desk or a home-appliance readout)t, the AC-power line (50 or 60 Hz) can be used, since it has more than adequate long-term accuracy while its short-term fluctuations (on the order of hundredths of a second) are not visible or critical in this application.
Most system and processor clocks use a quartz crystal, Figure 2, and the piezoelectric effect in an oscillator circuit, a technique which has been used in electronic circuits for almost 100 years (beginning with all-analog circuits). The accuracy and other specifications of the crystal itself can range from mediocre to extraordinarily good, depending on crystal cut, trimming, temperature-compensation considerations, mounting, frequency, and other factors.
What are the ways to build an RTC?
An RTC can be built in hardware or software. For a simple clock in a battery-powered device such as a desktop clock or watch, the crystal is part of a dedicated, hardware-only circuit which divides the crystal clock frequency down and counts resultant pulses. For a variety of historical and practical reasons, the crystal used in these applications is often 32.768 kHz: it is easy to divide this down to a 1-Hz output using a standard 16-bit counter acting as a countdown divider (note that 215 = 32768). The 1-Hz counter output which occurs once every 32,768 pulses is then used to drive the clock display or internal clock timestamp.
Some early systems used a crystal at 3.58 MHz nominal frequency (actually, 3.579545 MHz), since these were widely available at low cost, as they were used in color TVs (before digital TV) to synchronize and extract the color-encoded signal subcarrier riding “on top” of the main TV signal carrier.
In a programmable system, such as a personal computer or controller device, the RTC clock pulses are usually counted by a very short, interrupt-driven subroutine which is invoked once per second, triggered by the 1-Hz pulse-stream output of the counter
What circuitry is needed to use the quartz crystal as a clock source?
It depends on the performance needed and the type of crystal used. Quartz crystals can be used in a wide variety of oscillator topologies such as series resonant and parallel resonant, Figure 3, each of which has many sub-varieties. The electromechanical properties of the crystal must be compatible with the type of oscillator circuit used. As usual, simple circuits provide less consistent performance than more complicated ones, but the “quality” of the crystal itself and its mechanical fixture determines a large part of the ultimate performance.
What are the alternatives to quartz crystals?
In recent years, there has been a dramatic growth in clocks which don’t use a quartz crystal, but instead use a MEMS-based silicon component which mechanically vibrates at the desired frequency. These all-silicon clocks can excellent performance for many applications, and are smaller, more reliable (one IC) and cost-competitive, Figure 4. Further, since they are silicon components, they can be more than just a MEMS device, as they can also incorporate the associated circuitry needed for the oscillator function.
In contrasts, even the best quartz crystal still needs electronics to make use of its piezoelectric properties. Therefore, the bill of materials is longer and the PC-board footprint is larger than for a MEMS device. Also, a MEMS-based oscillator can have on-chip memory and logic, so calibration or correction circuitry which will make it even more accurate than the MEMS-resonator core itself. Nonetheless, quartz-based clocks are most widely used and highest performance clocks available.
Part 2 will look at the parameters which are used to assess clock performance, and how they are matched to different applications.
“MEMS-based Silicon Oscillators,” https://www.sitime.com/technology/mems-oscillators , SiTime Corp.
The post What is a clock and what are its critical parameters (Part 1)? appeared first on Analog IC Tips.