About Crystals and Ceramic Resonators

The typical crystal used for the AVR device is the AT-cut parallel resonant crystal. The ceramic resonator is very similar to the AT-cut parallel resonant crystal but is a low-cost, low-quality version of the crystal. The ceramic resonator has a lower Q-value, which is both an advantage and disadvantage. Due to the lower Q-value, the oscillator frequency of the ceramic resonator can more easily be tuned to the desired frequency. But, it is also more sensitive to temperature and load changes, causing undesired frequency variations. The advantage of the ceramic resonator is that it has a faster start-up than crystals.

In this section, the term resonator refers to both Quartz Crystals and Ceramic Resonator.

  Ceramic Resonator Quartz Crystal
Aging ±3000 ppm ±10 ppm
Frequency tolerance ±5000 ppm* ±20 ppm
Frequency temperature characteristics ±50 ppm/˚C* ±0.5 ppm/˚C
Frequency pull-ability ±350 ppm/pF* ±15 ppm/pF
Oscillator rise time 0.01 ms - 0.5 ms 1 ms - 10 ms
Quality factor (Qm) 100 - 5000 103 – 5 x 105
Note: The information provided in the table is to showcase the differences. For more details about the oscillator, refer to the device-specific data sheet.
Note: * The ppm variation in the ceramic resonator depends on the quality of the ceramic resonator.

The parallel resonator is used in circuits which contain reactive components such as capacitors. Such circuits depend on the combination of the reactive components and the resonator to accomplish the phase shift required to start and maintain the oscillation at a specific frequency. Basic oscillator circuits used for parallel resonators are illustrated in the following diagram. The part of the circuit above the dashed line represents the oscillator circuit present internally in the AVR device. Simply, the AVR device built-in oscillator circuits can be understood as an inverter-based oscillator circuit, as shown in the following figure.

Figure 1. Basic Inverter Circuits Equivalent to the Oscillator Circuits in AVR Devices
The circuit depicted in Figure 1 includes internal capacitive load (Ci), the stray capacitance (Cs) of a circuit, and the optional external capacitance (Ce) to match the capacitive load (CL) of the resonator.
Note: Some AVR devices may not include internal capacitors, or may have a fuse setting to enable/disable the internal capacitors. Always check the device data sheet before choosing the resonator.

When using resonators with the AVR device, it may be necessary to apply (external) capacitors according to the requirements of the resonator used. A parallel resonator will not be able to provide stable oscillation if an insufficient capacitive load is applied. When the capacitive load is too high, the oscillation may not start as expected due to drive level dependency of the load. The capacitive load of the crystal (CL), found in the data sheet of the resonator, is the recommended capacitive load of the resonator (viewed from the terminals of the resonator). To match the capacitive load (CL) the engineer must calculate the external capacitors (Ce) using Equation - 1. The closer the total capacitance of Ci, Cs, and Ce are to CL, the more exact the frequency one should get.

Equation - 1

ΣCL=(Ci1+Ce1+CS1)(Ci2+Ce2+CS2)Ci1+Ci2+Ce1+Ce2+CS1+CS2

Where Ce1 and Ce2 refer to the external capacitors seen in the figure above, and Cs1 and Cs2 are stray capacitances at the XTAL/TOSC pins of the AVR device, and Ci1 and Ci2 are the internal capacitances.

Assuming symmetric layout, so that Ci1 and Ci2 = Ci and Cs1 and Cs2 = CS (CS can be estimated to be 2 pF - 5 pF), and then the external capacitors can be determined by the following equation, with CL given by resonator data sheet.

Equation - 2

Ce+Ci=2CLCs

Examples are given in chapter Example Layout of ATxmega32A4 and ATmega324PB Devices.