4.5 Connecting External Crystal Oscillators
The use of external oscillators and the design of oscillator circuits is not trivial. This is because there are many variables: VDD, operating temperature range, crystal type and manufacture, loading capacitors, circuit layout and PCB material. Presented here are some typical guidelines to help with the basic oscillator circuit design.
- Even the best performing oscillator circuits and high-quality crystals will not perform well if the layout and materials used during assembly are not carefully considered. Ultra low-power 32.768 kHz oscillators typically dissipate significantly below 1 μW, and the current flowing in the circuit is, therefore, extremely small. Also, the crystal frequency is highly dependent on the capacitive load.
- The crystal circuit should be placed on the same side of the board as the device. Place the crystal circuit as close to the respective oscillator pins as possible and avoid long traces. This will reduce parasitic capacitance and increase immunity against noise and crosstalk. The load capacitors should be placed next to the crystal itself, on the same side of the board. Any kind of sockets should be avoided.
- Place a grounded copper area around the crystal circuit to isolate it from surrounding circuits. If the circuit board has two sides, the copper area on the bottom layer should be a solid area covering the crystal circuit. The copper area on the top layer should surround the crystal circuit and tie to the bottom layer area using via(s).
- Do not run any signal traces or power traces inside the grounded copper area. Avoid routing digital lines, especially clock lines, close to the crystal lines.
- If using a two-sided PCB, avoid any traces beneath the crystal. For a multilayer PCB, avoid routing signals below the crystal lines.
- Dust and humidity will increase parasitic capacitance and reduce signal isolation. A protective coating is recommended.
- Successful oscillator design requires good specifications of operating conditions, a component selection phase with initial testing, and testing in actual operating conditions to ensure that the oscillator performs as desired.
For more detailed information about oscillators and oscillator circuit
design, read the following application notes:
- AN2648 - Selecting and Testing 32 KHz Crystal Oscillators for AVR® Microcontrollers
- AN949 - Making Your Oscillator Work