Maker Pro
Maker Pro

what size of capacitors should I use with this crystal?

M

Michael Noone

Jan 1, 1970
0
Hi - I posted a few weeks ago regarding a similar question, but I must
admit I'm still somewhat confused on this topic. I plan on using this
crystal:

http://www.mouser.com/index.cfm?handler=displayproduct&lstdispproductid=
366319&e_categoryid=26&e_pcodeid=52003

watch the word wrap, and datasheet here:
http://www.ecsxtal.com/pdf3/HC_49US.pdf

With an Atmel ATMEGA16:
http://www.atmel.com/dyn/resources/prod_documents/doc2466.pdf
But the only thing I can't figure out is what size of capacitors to use
with the crystal. So in the crystal datasheet it says load capicatance
20pf, shunt capicatance 7pf. I'm not sure what to make of either of
these numbers. In the ATMEGA16 datasheet it simply reccomends a
capacitor of value between 12 adn 22 pf.

Any advice as to what I should use? Thanks!

-Michael Noone
 
T

Tim Wescott

Jan 1, 1970
0
Michael said:
Hi - I posted a few weeks ago regarding a similar question, but I must
admit I'm still somewhat confused on this topic. I plan on using this
crystal:

http://www.mouser.com/index.cfm?handler=displayproduct&lstdispproductid=
366319&e_categoryid=26&e_pcodeid=52003

watch the word wrap, and datasheet here:
http://www.ecsxtal.com/pdf3/HC_49US.pdf

With an Atmel ATMEGA16:
http://www.atmel.com/dyn/resources/prod_documents/doc2466.pdf
But the only thing I can't figure out is what size of capacitors to use
with the crystal. So in the crystal datasheet it says load capicatance
20pf, shunt capicatance 7pf. I'm not sure what to make of either of
these numbers. In the ATMEGA16 datasheet it simply reccomends a
capacitor of value between 12 adn 22 pf.

Any advice as to what I should use? Thanks!

-Michael Noone

This really requires a book, but here goes:

The shunt capacitance of a crystal is easy -- that's just the
capacitance due to the quartz as a dielectric and the electrodes as
plates. It's the capacitance of the crystal when measured at low
frequencies.

The load capacitance is the capacitance you need to present to the
crystal to make it resonate at the desired frequency. If you just had a
crystal and no amplifier you'd just put that across the crystal:

+---||---+
| |
---+--|X|---+---

Now if that's 20pF and you split it into two capacitors in series,
you'll need 40pF caps:

+---||---||---+
| |
---+-----|X|-----+---

Now if you ground the node between the caps you'll get:

---+----|X|----+---
| |
=== ===
| |
V V

The crystal doesn't know the difference. Now if you hang an amplifier
between the two ends of the crystal you'll get:

|\
+-| >-+
| |/ |
| |
+-+-|X|-+-+
| |
=== ===
| |
V V

If the amplifier is a perfect transconductance amplifier with infinite
input and output impedance then the crystal will resonate at the same
frequency and the output will grow until it stabilizes when the
amplifier output limits.

OK, that's cool -- but a real amplifier has some resistance and
capacitance at both input and output. If the amplifier will work it'll
have enough gain to overcome the input and output resistances. To make
the oscillation frequency right _you_ have to subtract the amplifier's
input and output capacitances from your 40pF capacitors -- and that's
why you see lower capacitances at those spots in real circuits.
 
A

Andrew Holme

Jan 1, 1970
0
Michael said:
Hi - I posted a few weeks ago regarding a similar question, but I must
admit I'm still somewhat confused on this topic. I plan on using this
crystal:

http://www.mouser.com/index.cfm?handler=displayproduct&lstdispproductid=
366319&e_categoryid=26&e_pcodeid=52003

watch the word wrap, and datasheet here:
http://www.ecsxtal.com/pdf3/HC_49US.pdf

With an Atmel ATMEGA16:
http://www.atmel.com/dyn/resources/prod_documents/doc2466.pdf
But the only thing I can't figure out is what size of capacitors to
use with the crystal. So in the crystal datasheet it says load
capicatance 20pf, shunt capicatance 7pf. I'm not sure what to make of
either of these numbers. In the ATMEGA16 datasheet it simply
reccomends a capacitor of value between 12 adn 22 pf.

Any advice as to what I should use? Thanks!

-Michael Noone

It's not that critical. It will probably oscillate with anything from 12 to
22pF. Choosing the "wrong" value will only put your clock a few parts per
million off the nominal frequency which isn't the end of the world.

The crystal oscillates within a specified tolerance of the marked frequency
when it "sees" the stated load capacitance which will be the series
capacitance of C1 and C2 in parallel with its own parallel shunt
capactiance, the input capacitance of the processor clock pin plus circuit
strays. The latter are hard to estimate.

If you want accuracy, replace C1 or C2 with a small trimmer and set it
using a frequency counter, or test your final circuit layout with pairs of
12pF, 15pF, 18pF and 22pF. Go with the pair that get you closest to the
marked crystal frequency.
 
M

Michael Noone

Jan 1, 1970
0
I don't understand, what is this amplifier you speak of? Would this be,
for my case, inside the Atmel AVR chip? (which the crystal will be
attached to) Where would I find information regarding the amplifier's
i/o capacitance? I'm not seeing anything in the datasheet, but being
that it's 351 pages long I'll allow that I'm not looking in the right
place! Thanks,

-Michael
 
A

Andrew Holme

Jan 1, 1970
0
Michael said:
I don't understand, what is this amplifier you speak of? Would this
be, for my case, inside the Atmel AVR chip? (which the crystal will be
attached to) Where would I find information regarding the amplifier's
i/o capacitance? I'm not seeing anything in the datasheet, but being
that it's 351 pages long I'll allow that I'm not looking in the right
place! Thanks,

-Michael

Yes, the amplifier is inside the AVR. I've just done a quick search through
that datasheet for "pF" and it doesn't give the input capacitance of the
clock pin. They do, however, quote 10pF for the capacitance of the I/O
pins. If we assume the clock input plus strays is about 10pF then we need
an additional 10pF to make the 20pF load required by the crystal. Since
this extra 10pF is supplied by C1 and C2 in series, I would try either
C1=C2=22pF or C1=C2=18pF. That should be about right.
 
F

Fred Bartoli

Jan 1, 1970
0
Andrew Holme said:
Yes, the amplifier is inside the AVR. I've just done a quick search through
that datasheet for "pF" and it doesn't give the input capacitance of the
clock pin. They do, however, quote 10pF for the capacitance of the I/O
pins. If we assume the clock input plus strays is about 10pF then we need
an additional 10pF to make the 20pF load required by the crystal. Since
this extra 10pF is supplied by C1 and C2 in series, I would try either
C1=C2=22pF or C1=C2=18pF. That should be about right.

No, 10pF strays makes for a total 5pF load for the crystal. Don't forget you
have both in series, like the regular additional load caps.

So a required 20pF load will need (20-5)*2 = 30pF capacitors. Try either 27
or 33pF.
 
A

Andrew Holme

Jan 1, 1970
0
Fred said:
No, 10pF strays makes for a total 5pF load for the crystal. Don't
forget you have both in series, like the regular additional load caps.

So a required 20pF load will need (20-5)*2 = 30pF capacitors. Try
either 27 or 33pF.

Michael, Fred is right.

Another way to to look at it would be to say the IC pins (including strays)
are 10pF each. That's an extra 10pF in parallel with each capacitor. So if
we could choose C1=C2=27pF then the crystal would see 37pF in series with
37pF which is 18.5pF. That's close enough to the recommended 20pF.

If you went for C1=C2=22pF (to keep inside the AVR datasheet recommend
range) the crystal would see 32pF in series with 32pF = 16pF which is also
close enough. A few pF either way doesn't matter.
 
A

Anthony C Smith

Jan 1, 1970
0
_snip-

we use the mega 16 with a pair of 22p cog caps at crystal frequencies from
4MHz to 16MHz- works every time- unless you forget to blow the internal fuse
which enables the crystal oscillator when programming -otherwise the shipped
default is to use the internal 1MHz RC oscillator
This caused major confusion when moving from the mega 161 which defaulted
to external xtal
Regards
Anthony
 
R

Reg Edwards

Jan 1, 1970
0
Its all very simple.
Just connect a pre-set capacitor in shunt with the crystal.
Maximum value a little greater than whatever it says in the specification.
And tweak it until the crystal oscillates at exactly the frequency you want.

The various values mentioned in the specification are there just to confuse
you and to demonstrate how clever the salesman is.
 
Top