Electronic – use ceramic resonator for ATmega328p

atmegaatmega328pcrystalresonator

https://lcsc.com/product-detail/Ceramic-Resonators_ABRACON_AWSCR-16-00CV-T_16MHz-0-5-22pF_C179647.html

I have been developing a project that includes ATmega328p-AU, So I have studied many circuits that use a 16 MHz crystal with 22 pF capacitors. So I thought why not use a ceramic resonator to save some space. So I want to know whether it would be better to use a ceramic resonator with the internal capacitance of 22 pF
or
crystal with external capacitors as given in the schematic?

ATmega328p schematic with 16 MHz external crystal

I have provided the link to the ceramic resonator that I am referring to.

Thank you.

Best Answer

A crystal is more accurate.

A ceramic resonator is more robust, smaller, and may be cheaper.

But which one is 'better'? Depends on what is more important for your application. Use a crystal if you need more accurate timing, eg. for a real-time clock, frequency counter etc. If accuracy isn't important then the ceramic resonator could be better because it is smaller.