2
\$\begingroup\$

Can you run an ATmega328 only using an 16Mhz crystal, so without the capacitors?

\$\endgroup\$
  • \$\begingroup\$ Even if your crystal doesn't require load caps, you should always have a ceramic bypass capacitor between power and ground as close as possible to a microcontroller. \$\endgroup\$ – Nick T Dec 26 '13 at 1:27
  • \$\begingroup\$ Why would you want to go without the capacitors? What problem are you trying to solve? \$\endgroup\$ – jippie Dec 26 '13 at 10:34
2
\$\begingroup\$

Sort of - set the fuses so it runs off the internal oscillator and it shouldn't care what's connected to the xtal pins. You won't need the crystal either.

\$\endgroup\$
7
\$\begingroup\$

If you mean a two pin crystal like this one

enter image description here

then the answer is no. This type or crystal requires the two capacitors in order to oscillate.

On the other hand if you mean a 4 pin crystal oscillator like

enter image description here

then it can work fine because this is a complete oscillator that only needs power to generate the clock.
In order to use it you have to set the clock source of the AVR to external clock (CKSEL3..0 = 0000) and feed the clock signal to XTAL1 pin.

\$\endgroup\$
  • \$\begingroup\$ It's worth noting that it's generally a good idea to bypass canned-oscillators like the one in the second image with a 0.1 uF capacitor, though you may be able to get away without it. \$\endgroup\$ – Connor Wolf Dec 26 '13 at 0:05
  • \$\begingroup\$ Also, some MCUs have internal load capacitors for an external crystal, so they may not require external capacitors (Parallax Propeller MCU comes to mind). \$\endgroup\$ – Connor Wolf Dec 26 '13 at 0:05
1
\$\begingroup\$

You don't need an external oscillator and the caps if you use the internal one (8MHz)

If you have an Arduino this might help: Lower part

enter image description here

\$\endgroup\$
1
\$\begingroup\$

You can try. You might get lucky thanks to stray capacitance in the prototype wiring and the pins of the CPU itself. Or it might not oscillate. Or it might oscillate at its 3rd harmonic; the CPU may not work reliably at 48 MHz.

Even if you do get lucky, when you move from a hand-wired prototype to a nice tight PCB, the stray capacitances will change and it will probably stop working... So, not recommended.

\$\endgroup\$

Your Answer

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