The reason digital and analog grounds affect each other isn't because one is called digital and the other is called analog. Rather, they share the same elevator: ground. The shaft used by this elevator is the ground trace on the PCB. A printed circuit board (PCB) supports the circuit components and devices in electronic products, providing electrical connections between them. Many PCBs now no longer consist of single-function circuits but instead contain a mix of digital and analog circuits. Data is typically acquired and received in analog circuits, while bandwidth and gain control via software must be digitized. Therefore, digital and analog circuits often coexist on the same board, even sharing the same components.
So, should a crystal oscillator be connected to digital or analog ground in a circuit? Crystal oscillators are primarily connected to digital ground in the following scenarios:
1. Most digital systems: Connect to digital ground to ensure a low-noise power supply and compact layout.
2. Mixed-signal systems: Connect to digital ground, with a single-point connection to analog ground, prioritizing return current paths.
3. High-frequency/precision analog systems: Evaluate noise sensitivity, which may require analog ground connection or isolation.
In circuit design, the grounding of a crystal oscillator should be determined based on the specific application and system architecture. The following are key considerations and recommendations:
1. Crystal Oscillator Type Determines Grounding Method
For passive crystal oscillators (requiring external circuitry), it is generally recommended to connect them to the digital ground, as their driver circuits (such as the MCU's oscillator) are digital. High-frequency noise may couple through the ground plane, so a clean digital ground is essential. For active crystal oscillators (with their own oscillator circuit), if they provide a clock for a digital system, they should be connected to the digital ground. If they are used in analog circuits (such as RF, ADC), it is important to consider whether to connect them to the analog ground or isolate them with a ferrite bead/capacitor.
2. Mixed-Signal System Handling
If the system has both digital and analog grounds, the crystal oscillator (especially high-speed crystals) should be connected to the digital ground. A single connection between the digital and analog grounds should be established at the power supply input using a 0Ω resistor or ferrite bead to avoid ground loop noise.
For high-frequency crystal oscillators (e.g., >10MHz), a complete return path is required. Splitting the ground plane may result in impedance discontinuities, which in turn increases radiation. In this case, maintaining a complete ground plane and using layout isolation rather than splitting it is preferable.
3. Key Measures for Noise Reduction
Local decoupling: Place a 0.1μF + 10pF capacitor combination near the crystal oscillator power pin to form a low-impedance loop, allowing high-frequency noise to flow directly back to ground rather than coupling to other components. Keep crystal oscillator traces as short as possible, with a complete ground plane underneath to avoid crossing partitions. Keep clock signals away from sensitive analog circuits. For high-frequency or sensitive circuits, cover the crystal oscillator with a metal shield and connect it to ground to further suppress radiation.
4. Recommendations for Special Scenarios
High-frequency/RF systems: If a crystal oscillator is used as an RF local oscillator, it must be strictly connected to the analog ground and have independent power supply filtering to prevent phase noise degradation.
In multi-clock systems, the grounds of different crystal oscillators can be locally star-connected to a main ground point to reduce mutual interference.