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?
-
1BTW, the caps are for the "pierce oscillator" circuit. Only crystals and I believe ceramic oscillators need them. – Thomas O Jun 26 '11 at 23:39
-
@Thomas - ceramic usually come in 3-pin version, and they have them built-in. – stevenvh Jun 27 '11 at 00:26
-
2Those caps are not for decoupling - see http://en.wikipedia.org/wiki/Pierce_oscillator – Connor Wolf Jun 27 '11 at 04:21
-
Many ceramic resonators don't have capacitors built-in. – Leon Heller Jun 27 '11 at 09:48
2 Answers
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.

- 310,974
- 36
- 428
- 915
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.

- 38,774
- 2
- 60
- 96