1M resitor between the 16MHz kristal on the atmega328

I want to make a standalone arduino.
In the schematic I see an 1M resistor between the XTAL1 and XTAL2.
But why is there a resistor, is this necessary for my standalone arduino?

In the schematic

Post a link to the schematic.

It is not necessary. That resistor is necessary on discrete oscillation circuits to "bias" the oscillation, i.e., get things going. On the ATmega's the resistor is built-in to the chip. If you look at Figure 8-2 of the ATmega328P datasheet you see that resistor is not there in the recommended circuit.

--
The Rugged Circuits Yellowjacket: 802.11 WiFi module with ATmega328P microcontroller, only 1.6" x 1.2", bootloader

RuggedCircuits:
It is not necessary. That resistor is necessary on discrete oscillation circuits to "bias" the oscillation, i.e., get things going. On the ATmega's the resistor is built-in to the chip. If you look at Figure 8-2 of the ATmega328P datasheet you see that resistor is not there in the recommended circuit.

--
The Rugged Circuits Yellowjacket: 802.11 WiFi module with ATmega328P microcontroller, only 1.6" x 1.2", bootloader

That's weird - can we get any word on why it is included in the official schematics, if it a) isn't needed, and b) is part of the ATMega328?

Was it put in the schematic to somehow trip up non-sanctioned clones from China and elsewhere...?

It may have been needed for earlier Arduino designs using earlier AVR chips. Or it may have been force of habit on the designer's part. It can't hurt, its job is to provide DC bias for the oscillator and its impedance has negligible effect at xtal resonant frequency.

Some microcontrollers go further and have programmable capacitance on chip for the oscillator so that the only external component needed is a xtal.

Yes, the 'official' Uno schematic is a bit of a mess, possibly skitzoid even. They show resonators at the chips (Y1 and Y2) and at the lower section of the drawing show resonators Q1 and Q2. Probably due to the fact that the first release of the Uno board seemed to have used crystal resonators and then later changed to ceramic resonators. Now add the (needed or unneeded) resistors R1,R2, and R3 and the drawing raises as many questions as it might answer. :smiley:

I had an ATmega8 Arduino with resonator fail to start the oscillator using the fuse-settings from "somewhere."
I ended up changing the fuse settings, but perhaps the resistor expands the variety of resonators/crystals that can be supported. Also, I believe the Uno design had some additional effort applied to reducing RF emissions so that the board would meet FCC/etc requirements. It's possible that the resistor helps with that (although I'm not sure how.) Note that these resistors were NOT present on designs prior to the Uno.

My "original" Uno (with one crystal and one resonator) has the resistor actually mounted at both positions.