Go Down

Topic: Resonator Vs Crystal Vs Internal Resonator (Read 4 times) previous topic - next topic

MiB1986

Hello,

thankyou for the code, i will try this later,

based on the information above that the internal oscilator will only be 8MHz it will be too slow. But thanks for the comment, i will look i the datasheet later about the internal osciallator for future reference though.

So back to a Resonator VS Crystal, was plannig to use a 16Mhz crystal with 22pf caps, anyone got any better suggestions?

Will increaseing the caps to 39pf do anything really?, other than change the output wave shape a little. Has anyone tried changing the value of the caps if yes what happened?

Kindest Regards
Martyn

retrolefty

Quote
Will increaseing the caps to 39pf do anything really?, other than change the output wave shape a little. Has anyone tried changing the value of the caps if yes what happened?


  Changing the size of the loading capacitors will change the frequency very slightly up to the point where it may stop oscillating all together. Three terminal 16 MHz ceramic resonators have their caps built in so it can save component count and costs slightly at a slight cost of absolute frequency accuracy compared to a crystal resonator.


Lefty

Jack Christensen


So back to a Resonator VS Crystal, was planning to use a 16Mhz crystal with 22pf caps, anyone got any better suggestions?


Not sure if this is a better suggestion, or just different. It's what I do.

Know the recommended load capacitance for the crystal (on the datasheet), and calculate the load capacitors accordingly. Note that load capacitance is not the same thing as load capacitor value. See http://www.foxonline.com/techfaqs_cry.htm#a4

The crystals that I happen to use call for 18pF load capacitance, so depending on the assumption for stray capacitance (2-5pF), the load capacitors should be between 26pF and 32pF. I usually use 27pF. My crystals also seem to work fine with 18pF, 22pF, and even with no capacitors! But, I haven't done any measurements, nor have I tried varying temperature, voltage, etc. And I probably won't, unless I have problems. In the meantime, I'll stick with the manufacturer's recommendations.

I don't know where what I will call the "22pF myth" comes from, it seems to be the default value that everyone always uses. It doesn't help that the ATmega328 datasheet recommends "12 to 22pF". I do not understand how they can make such a recommendation without knowing the specs of the specific crystal in use. Atmel does a good job on their datasheets, but that part I do not get.
MCP79411/12 RTC ... "One Million Ohms" ATtiny kit ... available at http://www.tindie.com/stores/JChristensen/

retrolefty

Quote
The crystals that I happen to use call for 18pF load capacitance, so depending on the assumption for stray capacitance (2-5pF), the load capacitors should be between 26pF and 32pF. I usually use 27pF. My crystals also seem to work fine with 18pF, 22pF, and even with no capacitors!


I would think you would subtract the AVR stray capacitance value from the crystals recommended value, so 18 - (2 to 5) = 16 to 13 pf ? But as you said the actual value you use within a reasonable range doesn't seem to cause it not to oscillate. Only an accurate frequency counter with a very high impedenace (fet type) probe would give you the actual frequency it's running at.

Lefty


Jack Christensen


Quote
The crystals that I happen to use call for 18pF load capacitance, so depending on the assumption for stray capacitance (2-5pF), the load capacitors should be between 26pF and 32pF. I usually use 27pF. My crystals also seem to work fine with 18pF, 22pF, and even with no capacitors!


I would think you would subtract the AVR stray capacitance value from the crystals recommended value, so 18 - (2 to 5) = 16 to 13 pf ? But as you said the actual value you use within a reasonable range doesn't seem to cause it not to oscillate. Only an accurate frequency counter with a very high impedenace (fet type) probe would give you the actual frequency it's running at.

Lefty


See the formula in the link I included:
Quote
CL = ((C1 x C2) / (C1 + C2)) + Cstray


Now it's recommended that C1 = C2, so this reduces to:
       CL = (C / 2) + Cstray

Solve for C:
       C = 2(CL - Cstray)

Plug & chug:
       C = 2(18 - 5) = 26pF
MCP79411/12 RTC ... "One Million Ohms" ATtiny kit ... available at http://www.tindie.com/stores/JChristensen/

Go Up