When you use a crystal as the clock you use a pair of capacitors on xtal1 and xtal 2. Do you still need them if you're using the internal resonator?

  • 1
    \$\begingroup\$ BTW, the caps are for the "pierce oscillator" circuit. Only crystals and I believe ceramic oscillators need them. \$\endgroup\$
    – Thomas O
    Jun 26 '11 at 23:39
  • \$\begingroup\$ @Thomas - ceramic usually come in 3-pin version, and they have them built-in. \$\endgroup\$
    – stevenvh
    Jun 27 '11 at 0:26
  • 2
    \$\begingroup\$ Those caps are not for decoupling - see en.wikipedia.org/wiki/Pierce_oscillator \$\endgroup\$ Jun 27 '11 at 4:21
  • \$\begingroup\$ Many ceramic resonators don't have capacitors built-in. \$\endgroup\$ Jun 27 '11 at 9:48

Yes you still need decoupling caps whether the internal oscillator or a crystal oscillator it used. No, you don't need the crystal caps if you're not using a crystal.

"Decoupling" refers to the caps that go accross power and ground close to the IC. Their purpose is to keep the power supply stable despite the fast current transients of the IC that the more distant power supply wouldn't be able to keep up with.

The crystal caps serve a completely different purpose. The one on the oscillator output pin reduces the high frequency harmonics in what would otherwise be a square wave. It also serves to lower the impedance of the oscillator output line as seen by the crystal. The second cap (the one after the crystal) is the primary crystal load cap. A crystal specified for parallel resonance needs a certain capacitive load to hit its frequency within the specified tolerance. Ideally the signal driving the input of the crystal has 0 impedance, in which case the crystal load is simply the capacitance on the output side. In practise the driving signal has some non-zero impedance, so the crystal load is that in parallel with the deliberate load cap.


No, they are only needed if you are using an external crystal or two-pin ceramic resonator. The internal oscillator uses an RC timing circuit, not a resonator. They are not decoupling capacitors, BTW.

Decoupling capacitors are required on the supply and ground pins, of course.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.