3.1 Introduction
The AVR microcontroller's 32.768 kHz crystal oscillator driver is optimized for low power consumption, and thus the crystal driver strength is limited. Overloading the crystal driver may cause the oscillator not to start, or it may be affected (stopped temporarily, for example) due to a noise spike or increased capacitive load caused by the contamination or proximity of a hand.
Take care when selecting and testing the crystal to ensure proper robustness in your application. The crystal's two most important parameters are Equivalent Series Resistance (ESR) and Load Capacitance (CL).
When measuring crystals, the crystal must be placed as close as possible to the 32.768 kHz oscillator pins to reduce parasitic capacitance. In general, we always recommend doing the measurement in your final application. A custom PCB prototype containing at least the microcontroller and crystal circuit may also provide accurate test results. For initial testing of the crystal, using a development or starter kit (e.g., STK600) may suffice.
We do not recommend connecting the crystal to the XTAL/TOSC output headers at the end of the STK600, as shown in Figure 3-1, because the signal path will be very sensitive to noise and thus add extra capacitive load. Soldering the crystal directly to the leads, however, will give good results. To avoid extra capacitive load from the socket and the routing on the STK600, we recommend bending the XTAL/TOSC leads upwards, as shown in Figure 3-2 and Figure 3-3, so they do not touch the socket. Crystals with leads (hole mounted) are easier to handle, but it is also possible to solder SMD directly to the XTAL/TOSC leads by using pin extensions, as shown in Figure 3-4. Soldering crystals to packages with narrow pin pitch is also possible, as shown in Figure 3-5, but is a bit trickier and requires a steady hand.
As a capacitive load will have a significant effect on the oscillator, you must not probe the crystal directly unless you have high-quality equipment intended for crystal measurements. Standard 10X oscilloscope probes impose a loading of 10-15 pF and will thus have a high impact on the measurements. Touching the pins of a crystal with a finger or a 10X probe can be sufficient to start or stop oscillations or give false results. Firmware for outputting the clock signal to a standard I/O pin is supplied together with this application note. Unlike the XTAL/TOSC input pins, I/O pins configured as buffered outputs can be probed with standard 10X oscilloscope probes without affecting the measurements. More details can be found in Section 4, Test Firmware.