ATMega 328p-au => how to connect an oscilator


For school i’m rebuilding a project (a bluetooth controllable LED-lamp => everything is available(scheme, BOM) to rebuild it.

But I have one problem, the BOM + the picture of the PCB show an oscilator “X1” with 4 PINS while the scheme only connects 2 PINS from te ATMega to the Xtal(and it doesn’t say which one)


Does anyone know wich 2 PINS of the 4 should be connected?



If you use a 4-pin SMD crystal, you can flip it 180 degrees and the same 2 corners will still mate to the same corner pads. (upper right, lower left). This looks to be the right size, measure the board to be sure.

If you use a larger, 2-pin part as is pictured at the Elektor site, the 2 legs connect to the 2 pads that have traces leading from them.

This is the oscilator I want to use.

So than I have to connect pin 2 and 4? And it doesn’t mather what pin connects to xtal1 or xtal2 on the ATMega?

Now, that is different. You need to connect power, and Gnd, and its enable signal to power. The output then goes to '328P pin PB6
“Depending on the clock selection fuse settings, PB6 can be used as input to the inverting Oscillator
amplifier and input to the internal clock operating circuit.”

You must also change the lower 4 bits of the Low Fuse Byte to 0000.
Easiest way is to change that in boards.txt for the board type you choose when you burn the bootloader.
For example, say you were using Uno under IDE 1.8.1:

uno.bootloader.low_fuses=0xFF << change to F0 for external oscillator