Electrical – Choosing a capacitor capacitance for a quartz resonator (ATMEGA328P)

atmega328pcapacitancecrystal

I am designing a controller based on an ATMEGA328P-AU chip.

For the chip, I provided an external crystal oscillator at a frequency of 16MHz.

enter image description here

As a resonator I use YSX321SL
enter image description here

His description refers to load capacitors whose capacitance is equal to 12pF and ESR 60Ω (Max).
I plan to use two load SMD capacitors with a capacity of 22pF each.
The question is, did I choose the right capacity? Or is it worth reducing?

Best Answer

A 12 pF capacitor from each side of the crystal to ground will work just fine.

So like this:

enter image description here

C1 and C2 need to have a certain value (each capacitor being between 5 pF and 50 pF is normal) to make the oscillator work.

Use the wrong value capacitor and the oscillator circuit will not work reliably.

The only reason to change the values of the capacitors is if you need to make the oscillator work at a very precise frequency like 16.000000 MHz.

Then normally a trimmer 1 pf to 22 pF capacitor:

enter image description here

is used in parallel with the crystal.

But chances are that you don't need this.

The microcontroller doesn't care about the exact frequency of the crystal oscillator. The frequency you get when using 2 x 12 pF will be more than accurate enough for almost any purpose. Only if you're building a clock you might worry about this.

There is no need to use smaller capacitors, you will only increase the chance that the oscillator will stop working!

Also there is no need to worry about the ESR of the capacitors, any modern capacitor should just work.

So: just use two 12 pF capacitors connected like shown above, and stop worrying about this :-)

Related Topic