| Author |
Message |
Chris Graham
Guest
|
Posted:
Tue Feb 08, 2005 7:23 am Post subject:
Choosing a Crystal for a Microcontroller |
|
|
I'm not clear on what the considerations are for choosing a crystal. I've
looked at electronics reference books and web sites but can't find a clear
answer. I know which microcontroller I want to use (in this case an
ATMEGA8). I also know the frequency (16 mhz).
How would I select a compatible crystal based on factors like the load
capacitance and ESR (equivalent series resistance)?
I this case I need to select the smallest surface mount crystal that will
work. Maybe a Citizen CS10?
Also, how would I determine the capacitors to use with the crystal?
Thanks.
|
|
| Back to top |
|
 |
Tony Williams
Guest
|
Posted:
Tue Feb 08, 2005 7:23 am Post subject:
Re: Choosing a Crystal for a Microcontroller |
|
|
In article <7wUNd.316145$8l.29646@pd7tw1no>,
Chris Graham <chrisgr@shaw.ca> wrote:
| Quote: | I'm not clear on what the considerations are for choosing a
crystal. I've looked at electronics reference books and web
sites but can't find a clear answer. I know which
microcontroller I want to use (in this case an ATMEGA8). I also
know the frequency (16 mhz).
How would I select a compatible crystal based on factors like the
load capacitance and ESR (equivalent series resistance)?
|
After some not very good experiences with the PIC
and crystals I shifted to using either a 3-legged
ceramic resonator, or a dil crystal oscillator.
--
Tony Williams. |
|
| Back to top |
|
 |
John Fields
Guest
|
Posted:
Tue Feb 08, 2005 7:53 am Post subject:
Re: Choosing a Crystal for a Microcontroller |
|
|
On Tue, 08 Feb 2005 01:23:15 GMT, "Chris Graham" <chrisgr@shaw.ca>
wrote:
| Quote: | I'm not clear on what the considerations are for choosing a crystal. I've
looked at electronics reference books and web sites but can't find a clear
answer. I know which microcontroller I want to use (in this case an
ATMEGA8). I also know the frequency (16 mhz).
|
---
Look in the µC data sheet
---
| Quote: | How would I select a compatible crystal based on factors like the load
capacitance and ESR (equivalent series resistance)?
|
---
Look in the µC data sheet
---
| Quote: | I this case I need to select the smallest surface mount crystal that will
work. Maybe a Citizen CS10?
|
---
Look in the µC data sheet
---
| Quote: | Also, how would I determine the capacitors to use with the crystal?
|
---
Look in the µC data sheet
---
--
John Fields
|
|
| Back to top |
|
 |
Leon Heller
Guest
|
Posted:
Tue Feb 08, 2005 8:21 am Post subject:
Re: Choosing a Crystal for a Microcontroller |
|
|
"Chris Graham" <chrisgr@shaw.ca> wrote in message
news:7wUNd.316145$8l.29646@pd7tw1no...
| Quote: | I'm not clear on what the considerations are for choosing a crystal. I've
looked at electronics reference books and web sites but can't find a clear
answer. I know which microcontroller I want to use (in this case an
ATMEGA8). I also know the frequency (16 mhz).
How would I select a compatible crystal based on factors like the load
capacitance and ESR (equivalent series resistance)?
I this case I need to select the smallest surface mount crystal that will
work. Maybe a Citizen CS10?
Also, how would I determine the capacitors to use with the crystal?
|
See page 25 of the data sheet.
Leon
--
Leon Heller, G1HSM
http://www.geocities.com/leon_heller |
|
| Back to top |
|
 |
Chris Graham
Guest
|
Posted:
Tue Feb 08, 2005 8:40 am Post subject:
Re: Choosing a Crystal for a Microcontroller |
|
|
"John Fields" <jfields@austininstruments.com> wrote in message
news:6p6g01lbissr07ve5jj71369gmnaqpag64@4ax.com...
| Quote: | On Tue, 08 Feb 2005 01:23:15 GMT, "Chris Graham" <chrisgr@shaw.ca
wrote:
I'm not clear on what the considerations are for choosing a crystal. I've
looked at electronics reference books and web sites but can't find a clear
answer. I know which microcontroller I want to use (in this case an
ATMEGA8). I also know the frequency (16 mhz).
---
Look in the µC data sheet
|
Don't be such a smartass. These answers aren't very helpful.
I did look in the Atmel data sheet. It gives a range of capacitor values
for each frequency. It doesn't mention the crystal "load capacitance" or
ESR.
When I look at Digikey's offerings I see that crystals are available with
load capacitances from 5pf to 50pf. Does it make any difference? If not,
why is it specified for crystals? The data sheet also doesn't mention ESR.
I've seen some data sheets that don't even suggest any capacitor values.
Can I just pick any crystal and be assured that it will oscillate with the
approproate capacitors, which I should choose by trial and error?
I can also see on DigiKey that there are "series" type crystals. Is there
any difference between these and other crystals?
| Quote: | ---
How would I select a compatible crystal based on factors like the load
capacitance and ESR (equivalent series resistance)?
---
Look in the µC data sheet
---
I this case I need to select the smallest surface mount crystal that will
work. Maybe a Citizen CS10?
---
Look in the µC data sheet
---
Also, how would I determine the capacitors to use with the crystal?
---
Look in the µC data sheet
---
--
John Fields |
|
|
| Back to top |
|
 |
Chris Graham
Guest
|
Posted:
Tue Feb 08, 2005 8:40 am Post subject:
Re: Choosing a Crystal for a Microcontroller |
|
|
Thanks Leon. I've been looking at page 25. Does this mean that ANY crystal
with any load capacitance will work as long as I use capactiors with those
values?
I see some crystals are even offered with more than one choice of load
capacitance, so would it matter if I choose one with say a 18pf capacitance
vs say a 25pf capacitance?
"Leon Heller" <leon_heller@hotmail.com> wrote in message
news:42082217$0$19162$cc9e4d1f@news-text.dial.pipex.com...
| Quote: | "Chris Graham" <chrisgr@shaw.ca> wrote in message
news:7wUNd.316145$8l.29646@pd7tw1no...
I'm not clear on what the considerations are for choosing a crystal.
I've looked at electronics reference books and web sites but can't find a
clear answer. I know which microcontroller I want to use (in this case
an ATMEGA8). I also know the frequency (16 mhz).
How would I select a compatible crystal based on factors like the load
capacitance and ESR (equivalent series resistance)?
I this case I need to select the smallest surface mount crystal that will
work. Maybe a Citizen CS10?
Also, how would I determine the capacitors to use with the crystal?
See page 25 of the data sheet.
Leon
--
Leon Heller, G1HSM
http://www.geocities.com/leon_heller
|
|
|
| Back to top |
|
 |
John Larkin
Guest
|
Posted:
Tue Feb 08, 2005 8:40 am Post subject:
Re: Choosing a Crystal for a Microcontroller |
|
|
On Tue, 08 Feb 2005 01:23:15 GMT, "Chris Graham" <chrisgr@shaw.ca>
wrote:
| Quote: | I'm not clear on what the considerations are for choosing a crystal. I've
looked at electronics reference books and web sites but can't find a clear
answer. I know which microcontroller I want to use (in this case an
ATMEGA8). I also know the frequency (16 mhz).
How would I select a compatible crystal based on factors like the load
capacitance and ESR (equivalent series resistance)?
I this case I need to select the smallest surface mount crystal that will
work. Maybe a Citizen CS10?
Also, how would I determine the capacitors to use with the crystal?
Thanks.
|
Unless it's for volume production and cost is critical, just use a
surface-mount oscillator. You can have a lot of trouble with uP
on-board oscillator circuit.
John |
|
| Back to top |
|
 |
Dave VanHorn
Guest
|
Posted:
Tue Feb 08, 2005 8:40 am Post subject:
Re: Choosing a Crystal for a Microcontroller |
|
|
| Quote: |
Also, how would I determine the capacitors to use with the crystal?
---
Look in the µC data sheet
|
Arrgghh..
The crystal manufacturers would disagree. The caps are selected, in order
to load the crystal to it's design value, taking into account the parasitics
in the circuit. |
|
| Back to top |
|
 |
Rich Grise
Guest
|
Posted:
Tue Feb 08, 2005 8:40 am Post subject:
Re: Choosing a Crystal for a Microcontroller |
|
|
On Tue, 08 Feb 2005 01:23:15 +0000, Chris Graham wrote:
| Quote: | I'm not clear on what the considerations are for choosing a crystal. I've
looked at electronics reference books and web sites but can't find a clear
answer. I know which microcontroller I want to use (in this case an
ATMEGA8). I also know the frequency (16 mhz).
How would I select a compatible crystal based on factors like the load
capacitance and ESR (equivalent series resistance)?
I this case I need to select the smallest surface mount crystal that will
work. Maybe a Citizen CS10?
Also, how would I determine the capacitors to use with the crystal?
|
Well, according to the data sheet,
http://www.atmel.com/dyn/resources/prod_documents/doc2486.pdf
it's just the standard uP crystal hook-up. If you take a crystal like
the Digi-Key 535-9103-1-ND, under "ABM3 Series 5.0 x 3.2 SMD Crystals",
http://dkc3.digikey.com/PDF/T051/0747-0748.pdf
you'l lsee that the recommended load capacitance is 18 pF. This is the
series combination of the two caps in the Atmel data sheet, so they'd be
36 pf, but 33 pf each should be close enough.
Should I bill you by paypal for my consulting fee? ;-)
Good Luck!
Rich |
|
| Back to top |
|
 |
Rich Grise
Guest
|
Posted:
Tue Feb 08, 2005 8:40 am Post subject:
Re: Choosing a Crystal for a Microcontroller |
|
|
On Tue, 08 Feb 2005 02:43:14 +0000, Chris Graham wrote:
| Quote: |
"John Fields" <jfields@austininstruments.com> wrote in message
news:6p6g01lbissr07ve5jj71369gmnaqpag64@4ax.com...
On Tue, 08 Feb 2005 01:23:15 GMT, "Chris Graham" <chrisgr@shaw.ca
wrote:
I'm not clear on what the considerations are for choosing a crystal. I've
looked at electronics reference books and web sites but can't find a clear
answer. I know which microcontroller I want to use (in this case an
ATMEGA8). I also know the frequency (16 mhz).
---
Look in the µC data sheet
Don't be such a smartass. These answers aren't very helpful.
I did look in the Atmel data sheet. It gives a range of capacitor values
for each frequency. It doesn't mention the crystal "load capacitance" or
ESR.
When I look at Digikey's offerings I see that crystals are available with
load capacitances from 5pf to 50pf. Does it make any difference? If not,
why is it specified for crystals? The data sheet also doesn't mention ESR.
I've seen some data sheets that don't even suggest any capacitor values.
Can I just pick any crystal and be assured that it will oscillate with the
approproate capacitors, which I should choose by trial and error?
|
Pick a crystal you like for freq. and package. The data sheet gives a load
capacitance. Use two capacitors the way they have them in the data sheet;
one on each side of the crystal, with the other ends of both caps grounded.
The _series_ combination of those two caps should equal that load
capacitance from the crystal spec. For example, if the crystal load
capacitance is 18 pF, two 36 pF caps in series give that result. 33 pF is
the closest common value, and that'll be close enough. Ordinary ceramics
are fine; I think in that size range the stable ones aren't that much more
expensive.
Good Luck!
Rich |
|
| Back to top |
|
 |
Roger Lascelles
Guest
|
Posted:
Tue Feb 08, 2005 8:40 am Post subject:
Re: Choosing a Crystal for a Microcontroller |
|
|
"Chris Graham" <chrisgr@shaw.ca> wrote in message
news:COVNd.318413$Xk.143400@pd7tw3no...
| Quote: | Thanks Leon. I've been looking at page 25. Does this mean that ANY
crystal
with any load capacitance will work as long as I use capactiors with those
values?
I see some crystals are even offered with more than one choice of load
capacitance, so would it matter if I choose one with say a 18pf
capacitance
vs say a 25pf capacitance?
|
Just about any 16 MHz crystal will work with the caps recommended by Atmel.
If there are no cap values in the datasheet, look at Atmel app notes etc and
use the values you see there.
Two crystals with different capacitances can be identical pieces of rock
ground in the same way. The only difference is that there is a slight
frequency difference between the two. It is when you put the specified
capacitances across the crystals that the frequency is tuned slightly to get
spot on to 16 MHz.
The caps perform impedance transformations, so you can't pick any value -
the manufacturer will give you recommendations, or you can look at other
people's circuits. Once you know your cap values, you calculate value of
the two caps in series, to get the capacitance spec of the crystal you will
buy.
Many microprocessor apps are non-critical. The "wrong" crystal may be
1000ppm off in frequency, but mostly you don't care.
Cheaper crystals and small package crystals tend to be more lossy or at
least have more variation in losses (ie Q factor). So you find that a
production run may have a few percent of non-start oscillators. You grab a
few of the non-starters and move the caps in value a bit until you find
values which work for all samples. Next production run, you have 100%
startup. On the testbench, mostly none of this matters. You wack in a
crytal and it goes. Once in a while you move a cap value up or down to get
it to run. Mostly, you don't care if it slightly off frequ.
Some microprocessors have more critical oscillators than others. I have
found the AVR parts to be non-critical.
Roger |
|
| Back to top |
|
 |
Pooh Bear
Guest
|
Posted:
Tue Feb 08, 2005 8:41 am Post subject:
Re: Choosing a Crystal for a Microcontroller |
|
|
Chris Graham wrote:
| Quote: | I did look in the Atmel data sheet. It gives a range of capacitor values
for each frequency. It doesn't mention the crystal "load capacitance" or
ESR.
|
Atmels' data sheets are a model of clarity.
If you are incapable of reading one and finding the answer, I suggest a new
career in manageemnt where your skills will be appreciated.
Graham |
|
| Back to top |
|
 |
Pooh Bear
Guest
|
Posted:
Tue Feb 08, 2005 8:41 am Post subject:
Re: Choosing a Crystal for a Microcontroller |
|
|
Chris Graham wrote:
| Quote: | I'm not clear on what the considerations are for choosing a crystal. I've
looked at electronics reference books and web sites but can't find a clear
answer. I know which microcontroller I want to use (in this case an
ATMEGA8). I also know the frequency (16 mhz).
How would I select a compatible crystal based on factors like the load
capacitance and ESR (equivalent series resistance)?
I this case I need to select the smallest surface mount crystal that will
work. Maybe a Citizen CS10?
Also, how would I determine the capacitors to use with the crystal?
|
How may times have we seen this question ?
*Read the damn data sheet for God's sake !*
Normally the uC manufacturer suggests a value for both Cs. Unusually that may
be be required to be changed to suit an unusual crystal. Try around 20 - 30
pF. That's usually fine for 16MHz. I use 33 pF for an 80C52 based design @ 16
MHz.
Graham |
|
| Back to top |
|
 |
Pooh Bear
Guest
|
Posted:
Tue Feb 08, 2005 8:41 am Post subject:
Re: Choosing a Crystal for a Microcontroller |
|
|
Dave VanHorn wrote:
| Quote: |
Also, how would I determine the capacitors to use with the crystal?
---
Look in the µC data sheet
Arrgghh..
The crystal manufacturers would disagree. The caps are selected, in order
to load the crystal to it's design value, taking into account the parasitics
in the circuit.
|
You mean most of the crystals they sell aren't designed to work in the uC
manufacturers' app circuits ?
I suggest you re-think.
What's wrong with a resonator btw ( low cost applications )
Graham |
|
| Back to top |
|
 |
Pooh Bear
Guest
|
Posted:
Tue Feb 08, 2005 8:41 am Post subject:
Re: Choosing a Crystal for a Microcontroller |
|
|
Chris Graham wrote:
| Quote: | Thanks Leon. I've been looking at page 25. Does this mean that ANY crystal
with any load capacitance will work as long as I use capactiors with those
values?
I see some crystals are even offered with more than one choice of load
capacitance, so would it matter if I choose one with say a 18pf capacitance
vs say a 25pf capacitance?
|
Stop agonising - stick some bloody caps in there and see it oscillate ! The
value is *non-critical* +/- about nearly 50%
It's *not* rocket science !
Graham |
|
| Back to top |
|
 |
|
|
|
|