The use of external
oscillators and the design of oscillator circuits are not trivial because of many
variables: VDD, operating temperature range, crystal type and manufacture,
loading capacitors, circuit layout, and PCB material. Some typical guidelines to help
with the basic oscillator circuit design are presented in this section.
- 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. Mount the load capacitors on the same side of the board and next to
the crystal. Do not use sockets.
- 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 be connected to the bottom layer area by 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, see the
following application notes:
- AN2648 - Selecting and Testing
32 kHz Crystal Oscillators for AVR® Microcontrollers
- AN949 - Making Your Oscillator
Work