The use of external
oscillators and the design of oscillator circuits are not trivial. This 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 the assembly are not carefully considered
- The crystal circuit must 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 must be placed next to the crystal itself, on the
same side of the board. Any kind of sockets must 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 must be a solid
area covering the crystal circuit. The copper area on the top layer must
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