

A crystal is a passive electronic component that oscillates at a specific frequency when an electric current is applied. It is primarily used for frequency stabilization in oscillators, clocks, and timing circuits. Crystals are highly valued for their precision and stability, making them essential in applications such as microcontrollers, communication systems, and digital electronics.








Below are the general technical specifications for a standard quartz crystal:
| Parameter | Value |
|---|---|
| Frequency Range | 32.768 kHz to 100 MHz (typical) |
| Load Capacitance | 6 pF to 32 pF |
| Frequency Tolerance | ±10 ppm to ±50 ppm |
| Operating Temperature | -20°C to +70°C (standard) |
| Equivalent Series Resistance (ESR) | 30 Ω to 200 Ω |
| Drive Level | 1 µW to 500 µW |
Crystals typically have two pins, as shown in the table below:
| Pin | Description |
|---|---|
| Pin 1 | Crystal terminal 1 (connect to oscillator circuit) |
| Pin 2 | Crystal terminal 2 (connect to oscillator circuit) |
Note: Crystals are non-polarized components, so the pins are interchangeable.
The Arduino UNO uses a 16 MHz crystal for its clock. Below is an example of how to connect a crystal to an ATmega328P microcontroller (used in Arduino UNO):
The crystal itself does not require programming, but here is an example of how the Arduino UNO uses the crystal for timing in a basic blink program:
// Blink an LED connected to pin 13
void setup() {
pinMode(13, OUTPUT); // Set pin 13 as an output
}
void loop() {
digitalWrite(13, HIGH); // Turn the LED on
delay(1000); // Wait for 1 second (timing depends on crystal)
digitalWrite(13, LOW); // Turn the LED off
delay(1000); // Wait for 1 second
}
Note: The crystal ensures the microcontroller operates at the correct clock frequency, which directly affects the timing of functions like
delay().
Crystal Not Oscillating
Frequency Drift
Microcontroller Not Booting
Q: Can I use any crystal with my microcontroller?
A: No, you must use a crystal with a frequency and load capacitance compatible with your microcontroller's specifications.
Q: How do I test if a crystal is working?
A: Use an oscilloscope to check for oscillation at the crystal's specified frequency when connected to an oscillator circuit.
Q: What happens if I use the wrong load capacitance?
A: The crystal may oscillate at an incorrect frequency or fail to oscillate entirely.
By following this documentation, you can effectively use a crystal in your electronic projects and troubleshoot common issues.