Crystal, oscillator or ceramic resonator: which clock?
A crystal is ±120 ppm over ten years, a ceramic resonator ±1.1 %, an RC oscillator ±2 %, and each is right for something. What UART, USB and a radio need.
Three parts give a microcontroller its clock, and the datasheet numbers that separate them are three orders of magnitude apart. A quartz crystal holds its frequency to tens of parts per million; a ceramic resonator to about half a percent; the chip’s own RC oscillator to a couple of percent. Murata’s table of oscillator elements puts it as ±0.001 % for quartz, ±0.5 % for ceramic and ±2.0 % for LC or RC — and the same table says the ceramic part is “inexpensive”, “small” and needs no adjustment, while the crystal is “expensive” and “big”. An oscillator module is a crystal with its oscillator circuit sealed in beside it: the accuracy of a crystal, the convenience of a part that just outputs a clock, and a price and a supply current to match.
Which one a design needs is set by what consumes the clock. A UART tolerates about 2 % of frequency error, so a resonator serves it. A full-speed USB interface tolerates a quarter of a percent, so it wants a crystal. A Bluetooth or 802.15.4 radio, TI’s crystal selection guide says, is limited to 40 ppm — and a plain crystal cannot promise that over ten years either. This article is what each part is, how the accuracy figures stack, and how to read them against the interface that has to live with them. The crystal ppm calculator does the stack for any datasheet, and the baud rate error calculator is the UART side of the question.
What the three parts are
A crystal is a slice of quartz that resonates mechanically at one frequency, wired between two pins of a microcontroller whose internal inverter makes it oscillate — the Pierce circuit that TI’s SNAA065 describes with its “negative resistance model”, and that the crystal start-up article covers. It needs two load capacitors, sized from the datasheet’s CL, and it needs the microcontroller’s amplifier to have enough gain to start it. Its frequency is set by the cut of the quartz, and the quartz does not care much about anything else: Murata puts its temperature coefficient at “10−6/°C maximum”.
A ceramic resonator is the same idea in a different material. Murata: “Ceramic resonators use the mechanical resonance of piezoelectric ceramics (generally, lead zirconium titanate: PZT).” It sits in the same Pierce circuit, often with its load capacitors built in, and its temperature coefficient is “10−5/°C” — ten times the crystal’s, and a hundred to a thousand times better than the “10−3 to 10−4/°C for LC or RC oscillation circuits”. Abracon’s note gives the equivalent circuit for a 4 MHz part — L1 385 µH, C1 4.4 pF, C0 36.3 pF, R1 8 Ω, Q 1134 — which is “similar to the quartz crystal, but motional parameters are very different”: a much larger C1, so a lower Q and a frequency that is “very sensitive to load capacitance”.
An oscillator module — an XO — is a crystal and its complete oscillator in one package with a supply pin and a clock output. The microcontroller starts nothing; it receives a clock. The accuracy is the crystal’s, the start-up is the module’s own datasheet figure, and the part draws supply current continuously and costs several times what the bare crystal does.
An RC oscillator is the one already inside the microcontroller, and is free. Murata’s ±2.0 % is its class; a factory-trimmed one is better at room temperature and no better over temperature.
What the accuracy numbers mean
A clock’s error is not one number. SNAA065 lists the three that a crystal datasheet gives and what each is:
Frequency tolerance refers to accuracy and repeatability of the nominal crystal frequency across multiple devices for a fixed set of conditions (temperature, load, etc.) … Typical values may range from ±10 ppm to ±50 ppm. Frequency stability refers to the variation of the instantaneous operating frequency over temperature … Typical values may range from ±30 ppm to ±100 ppm … Finally, an aging tolerance addresses the effects of change in the crystal lattice over time … For example, an aging tolerance might be: ±5 ppm in year 1, and ±2 ppm/year thereafter.
— TI, SNAA065
They add. SNAA065’s worked case — “frequency tolerance = ±20 ppm, frequency stability = ±50 ppm, and aging = 5 ppm/year” — means “the loaded operating frequency of the crystal could differ from nominal by ±75 ppm after one year and ±120 ppm after ten years.”
A ceramic resonator’s datasheet has the same three lines with the decimal point moved. Abracon: “typical frequency tolerance is ±0.5 % max”, “standard frequency stability is ±0.3 %” over −20 to +80 °C, and “the aging is ±0.3 % max over 10 years”; Murata gives the same ±0.5 %, ±0.3 to ±0.5 % and ±0.3 %. Stacked, that is ±1.1 % worst case over ten years — about a hundred times the crystal. Murata adds the practical reading: “if the frequency precision needed for clock signal of a 1 chip microcomputer is approximately ±2 to 3 % under working conditions, CERALOCK standard type can be used in most cases.”
In seconds per day, which is what a clock error becomes in a product that keeps time: 120 ppm is 10 seconds a day; 1.1 % is 16 minutes.
What the interface needs
UART. A UART samples each bit near its middle, so the receiver’s clock may drift by nearly half a bit over the ten bits of a character before it samples the wrong one; between two ends that share the error, the budget is around 2 %, less whatever the baud-rate divider already wastes. A ceramic resonator’s 1.1 % fits, which is why resonators clock so many serial-port microcontrollers; a resonator plus an awkward divider ratio may not, and the baud rate error calculator adds the two.
USB. Full-speed USB tolerates 2500 ppm, a quarter of a percent, and high-speed 500 ppm. A ceramic resonator’s ±1.1 % is over by four times, so a USB device needs a crystal — or a microcontroller that trims its internal oscillator against the host’s start-of-frame packets, which is what the crystal-less USB parts do.
Radio. TI’s crystal selection guide: “For 802.15.4 (RF4CE), the max deviation in carrier frequency is limited to 40 ppm. For Bluetooth Low Energy, the limit is 40 ppm.” A crystal’s ±75 ppm after one year is already over that, which is why the guide’s table lists crystals with 10 ppm tolerance and 10 ppm stability, why radio chips trim the crystal with a capacitor array (the guide’s FREQTUNE, measured at −35 to −150 ppm of pull), and why a TCXO — a crystal with a temperature-compensation circuit — is the answer when the trim cannot cover it. A resonator is not a candidate.
Timekeeping. A watch crystal at 20 ppm is 1.7 seconds a day and a minute a month; a real-time-clock application needs a crystal and usually a trim. A resonator’s 16 minutes a day is a clock that is wrong by the afternoon.
Start-up, cost and size
The resonator’s low Q, which costs it accuracy, buys it speed. Murata: “it is noteworthy that the rise time of the ceramic resonator is one or two decades faster than a quartz crystal”, and Abracon: ceramic resonators “have superior resonant impedance than quartz crystal, which offer much better start-up time.” TI’s guide measured four 32 MHz crystals on its evaluation board at 208 to 408 µs to start, depending on the part and the supply; a resonator starts in tens of microseconds. For a device that wakes from sleep a thousand times a second, that difference is a measurable share of the power budget.
Cost and size go the same way. Murata: “the ceramic resonator is half the size of popular quartz crystals”, “mass produced, resulting in low cost”, and it needs no adjustment “unlike RC or LC circuits” because “ceramic resonators use mechanical resonance”, so the frequency “is not basically affected by external circuits or by the fluctuation of the supply voltage”. The oscillator module is the other end: the largest, the most expensive, the only one that draws current on its own, and the only one that cannot fail to start because the microcontroller’s amplifier was too weak — the failure the crystal article is about.
Choosing
- A radio, USB, Ethernet, or anything with a specified ppm budget: a crystal, sized by the crystal ppm calculator against the budget, with the temperature range and the years in service included; a TCXO or a trim loop where the crystal alone cannot reach it.
- A UART, an LCD driver, a motor controller, an appliance timer — anything that tolerates a percent: a ceramic resonator, with the microcontroller vendor’s IC-matching note read first, because Abracon’s list of what happens without it includes “not start-up or start-up at an unwanted frequency”.
- A clock shared by several chips, a fast start from a cold supply, or a microcontroller whose oscillator will not drive the crystal the design needs: an oscillator module, and the supply current it costs.
- A bootloader, a blinking LED, a bit-banged protocol with a generous budget: the internal RC, and nothing on the board at all.
Worked numbers
part tolerance temperature aging (10 y) total per day
crystal (SNAA065) ±20 ppm ±50 ppm ±50 ppm ±120 ppm 10 s
ceramic (Abracon) ±0.5 % ±0.3 % ±0.3 % ±1.1 % 16 min
RC / LC (Murata) ±2 % — — ±2 % 29 min
needs BLE / 802.15.4 40 ppm · USB FS 0.25 % · UART ≈ 2 %
start-up crystal 208–408 µs measured (SWRA372) · ceramic "one or two decades faster"
The crystal wins on every accuracy line and loses on every other; the resonator is the right part wherever the interface does not care about the difference, which is more places than the reflexive crystal suggests.