Ok so i'm not entirely sure if this is necessarily an arduino question, but i have finally decided to take the plunge and build my own board. I seem to be having a hard time understanding the math and such behind the crystal. I went into the a local store and bought a couple atmega328's. The only crystal they had in stock tho is the ABL-10.000MHZ-B2 datasheet here . I followed an adafruit guide for calculating the caps, but the part i'm having a hard time figuring out is the Equivalent series resistance ? Maybe im not using the right terms in google, but where would the resistor go ? I'm assuming that's what all that means ? Sorry if this is a stupid question im about a year in self taught.
ESR is a property of a crystal or capacitor. For typical applications you don't need to worry about it.
I have always just used caps of the value specified by the datasheet.
Crystals can be modeled as a combination of LR & C. The load capacitance and the equivalent series resistance are properties of a crystal. If you look at the datasheet for the 328, for a 10MHz crystal only a range of values for the external capacitors are suggested (12-22pF). So maybe it isn't too sensitive. But for the low frequency (32kHz) oscillator the datasheet has specific recommendations for the load capacitance and ESR of the crystal.
Ok thanks guys, using the formula on ada's page based on the 18pF load capacitance, i should be using 30pF caps no ? Which brings me to another question the datasheet for the crystal says, the max frequency is 70Mhz but the 328 says its max is 20Mhz ? Sorry i just want to understand what im doing before i start frying chips.
The datasheet is for range of parts.
If you bought a 10 MHz part, it will oscillate at 10 MHz.
The only crystal they had in stock tho is the ABL-10.000MHZ-B2 datasheet here . I followed an Adafruit guide for calculating the caps, but the part I'm having a hard time figuring out is the Equivalent series resistance?
Maybe I'm not using the right terms in google, but where would the resistor go?
In some cases such as the UNO, a 1M resistor is used across the ceramic resonator. This is to control the oscillator gain.
If the crystal specification is ABL-10.000MHZ-B2, it is not specifying a load capacitance so this defaults to 18 pF. If this is distributed across the two loading capacitors it comes to 36 pF each minus the pin capacitance of the Arduino and the trace capacitance of your PCB. The usual 22 pF sounds good enough.
Which brings me to another question the datasheet for the crystal says, the max frequency is 70Mhz
Which means you can buy any crystal up to 70 MHz. But you have a 10 MHz.
I just want to understand what I'm doing before I start frying chips.
You would need oil for that.