Searching \ for 'what capacitors to use with an 8mhz crystal?' in subject line. ()
Make payments with PayPal - it's fast, free and secure! Help us get a faster server
FAQ page: www.piclist.com/techref/index.htm?key=what+capacitors
Search entire site for: 'what capacitors to use with an 8mhz crystal?'.

Truncated match.
PICList Thread
'what capacitors to use with an 8mhz crystal?'
1999\02\15@182720 by Ry Lato

picon face
I have been using 22pf capacitors with a 4-mhz crystal for my PIC
designs up until now. I want to run a PIC at 8-mhz. What value
capacitors should I use? The crystal is an 8-mhz 20pf paralell resonant.

Thanks



______________________________________________________
Get Your Private, Free Email at http://www.hotmail.com

1999\02\15@185422 by dave vanhorn

flavicon
face
At 03:25 PM 2/15/99 -0800, Ry Lato wrote:
>I have been using 22pf capacitors with a 4-mhz crystal for my PIC
>designs up until now. I want to run a PIC at 8-mhz. What value
>capacitors should I use? The crystal is an 8-mhz 20pf paralell resonant.

You need a total of 20pF load at each side of the crystal. I'd guess 5pF
for chip, board, and socket, and use 15pF. The really nice way to determine
this is to use a shortwave receiver with SSB/CW capability, and adjust the
caps to get it dead on frequency. Then, any other copies you build, you can
just use the values you got in the radio experiment.  You can also tune in
24 MHz and see how badly your circuit radiates, 3rd harmonic, 5th, 7th,
9th, 11th, and on up.

15pF is a good starting point.

1999\02\16@055033 by Stefan Sczekalla-Waldschmidt

flavicon
face
dave vanhorn wrote:

> You need a total of 20pF load at each side of the crystal. I'd guess 5pF
> for chip, board, and socket, and use 15pF. The really nice way to determine
> this is to use a shortwave receiver with SSB/CW capability, and adjust the
> caps to get it dead on frequency. Then, any other copies you build, you can
> just use the values you got in the radio experiment.  You can also tune in
> 24 MHz and see how badly your circuit radiates, 3rd harmonic, 5th, 7th,
> 9th, 11th, and on up.
>
> 15pF is a good starting point.

Hi,

can you eventually explain in a more detailed what the criterias are to
optimize the oscilator circuit regarding emittation ?

Which harmonics will be visible in which case ?

Kind regards

       Stefan

1999\02\16@084402 by Alan Hall

flavicon
picon face
In article <4.1.19990215184917.03c46b00@192.168.0.1>, dave vanhorn
<spam_OUTdvanhornTakeThisOuTspamCEDAR.NET> writes
>At 03:25 PM 2/15/99 -0800, Ry Lato wrote:
>>I have been using 22pf capacitors with a 4-mhz crystal for my PIC
>>designs up until now. I want to run a PIC at 8-mhz. What value
>>capacitors should I use? The crystal is an 8-mhz 20pf paralell resonant.
>
>You need a total of 20pF load at each side of the crystal.

Surely the crystal load specification refers to the overall capacitance
as seen across the crystal terminals? Since the caps at either end of
the crystal in this type of circuit are effectively in series, then the
capacitance seen by the crystal is:

C = (C1*C2)/(C1+C2)

which for the common case where C1=C2 becomes:

C = (C1)/2

So that for a 20pF crystal one would be looking at maybe 33pF each end?

As to juggling the ratio of the caps to achieve correct drive levels
etc, that is another matter, you will need to consult a witch doctor.
--
Alan Hall, Ipswich, UK

1999\02\16@113054 by dave vanhorn

flavicon
face
>can you eventually explain in a more detailed what the criterias are to
>optimize the oscilator circuit regarding emittation ?
>
>Which harmonics will be visible in which case ?
>
>Kind regards
>
>        Stefan


Odd harmonics are the worst. Most digital stuff is square waves, and as
Fourier showed us, they consist of all the odd harmonics. I take each
crystal frequency, and scan each odd harmonic up to 1GHz with an Icom
R-8500 receiver. The FCC tests you from 30-1000 MHz on radiated noise.

To keep the oscillator quiet is really very simple.
Use the right loading caps. This also means that your xtal will be "singing
the right tune"
Connect the caps at the crystal, and run a single track back to the uP
ground pin.
Don't dump it into a plane, and don't let anything else use this track.
Make the crystal tracks paralell, as short as possible, and as close to
each other as possible.
I also route exclusively with curved traces, which limits the impedance
discontinuities at corners. This is a real small effect, but curved tracks
are free, so I just do it.

The worst EMI to track down is a poor ground path.  Usually your micro is
feeding other chips, and each time it changes state on an output lead, the
input capacitance on some remote device is charged or discharged. This
means that there is, in the first moments, some appreciable current flowing
from the micro out to this remote chip.  That current MUST return to it's
source. In fact it WILL, and you'd better control which path it takes.
Planes would be fine if you had a plane layer with no holes in it, but in
the real world, your plane may have large holes in it, and you don't want
the return current having to run around a large hole in the plane (can you
spell ANTENNA?)  Run a fat track from every peripheral chip that's driven
by the micro, back to the micro. Then you can plane the rest, knowing that
you have assured a low Z path back to your micro.

NEVER NEVER NEVER put a cap on a signal lead to ground "to make it quiet".
All you're doing is forcing the driving chip to draw MORE current to
achieve the transition, plus that current is also dumped into the ground
system, and it's got to go somewhere.. If you absolutely must, you can add
a series resistor to slow down the edges. This should be done as close to
the driving chip as possible, usually 120 ohms will be good. You don't want
to make the edges too soft. This has to be verified with a scope in each
case, to make sure that you aren't violating any timing specs. It's a
viable option for distributed clock lines, or other fast signals that must
be sent around the board.

Power:  Each chip should have a bypass cap, located at it's ground pin.
Power runs from the chip's power pin(s) to the cap, and from the cap to
system power bus.  The "gridded" layout you see so often is a total
disaster. Think about what happens when a chip on a grid draws power.

It's all about current, and in every case, this rule applies:  PUT IT BACK
WHERE YOU GOT IT FROM.

1999\02\16@113903 by dave vanhorn

flavicon
face
>>You need a total of 20pF load at each side of the crystal.
>
>Surely the crystal load specification refers to the overall capacitance
>as seen across the crystal terminals? Since the caps at either end of
>the crystal in this type of circuit are effectively in series, then the
>capacitance seen by the crystal is:
>
>C = (C1*C2)/(C1+C2)
>
>which for the common case where C1=C2 becomes: C = (C1)/2
>
>So that for a 20pF crystal one would be looking at maybe 33pF each end?

Interesting question. I've always used the method I described, and
attributed any adjusting that had to be done to board, chip, and stray C.
I've not seen a hard description from an xtal mfgr that really spelled it
out either way. You could be right though.

>As to juggling the ratio of the caps to achieve correct drive levels
>etc, that is another matter, you will need to consult a witch doctor.

Drive level is done by the chip, you need to get the right rock for the
job. (there's a lot more to it than just frequency and paralell/series) The
good news is that most chips seem to get along with most xtals pretty well.
The really nasty ones are the little watch crystals. All crystals can be
mechanically damaged by too high a drive level, but they are so small that
they often specify a max of about a microwatt.  If in doubt, scope the
output waveform (not the driving side) through at least a 10X probe. If the
waveform is very far from a sine wave, then start digging for more specs.

As for operating frequency, just consult any decent shortwave receiver,
tune in WWV or your local standards station to make sure the readout's
right, and adjust till it sings the right tune.

1999\02\17@042318 by Stefan Sczekalla-Waldschmidt

flavicon
face
dave vanhorn wrote:

> Odd harmonics are the worst. Most digital stuff is square waves, and as
> Fourier showed us, they consist of all the odd harmonics. I take each
> crystal frequency, and scan each odd harmonic up to 1GHz with an Icom
> R-8500 receiver. The FCC tests you from 30-1000 MHz on radiated noise.
>
> To keep the oscillator quiet is really very simple.
> Use the right loading caps. This also means that your xtal will be "singing
> the right tune"
> Connect the caps at the crystal, and run a single track back to the uP
> ground pin.
> Don't dump it into a plane, and don't let anything else use this track.
> Make the crystal tracks paralell, as short as possible, and as close to
> each other as possible.
> I also route exclusively with curved traces, which limits the impedance
> discontinuities at corners. This is a real small effect, but curved tracks
> are free, so I just do it.

Thanks a lot vor your very comprehensive explanation in getting a
circuit quiet.

So when I use the right load caps for the xtal I4ll get the smallest
amplitdes at the odd harmonics ?

Kind regards

       Stefan

1999\02\17@093600 by dave vanhorn

flavicon
face
>So when I use the right load caps for the xtal I4ll get the smallest
>amplitdes at the odd harmonics ?

It's not that simple, the circuit layout has a lot more to do with that
than the cap values, but the more distorted the drive waveform, the more
odd harmonics there will be.

1999\02\18@142830 by John Payson

flavicon
face
>Surely the crystal load specification refers to the overall capacitance
>as seen across the crystal terminals? Since the caps at either end of
>the crystal in this type of circuit are effectively in series, then the
>capacitance seen by the crystal is:
>
>C = (C1*C2)/(C1+C2)
>
>which for the common case where C1=C2 becomes: C = (C1)/2
>
>So that for a 20pF crystal one would be looking at maybe 33pF each end?

|Interesting question. I've always used the method I described, and
|attributed any adjusting that had to be done to board, chip, and stray C.
|I've not seen a hard description from an xtal mfgr that really spelled it
|out either way. You could be right though.

I just had an odd thought... if what matters is the capacitance
across the crystal (at least once the thing is running) then it
would seem that using a circuit like this:

          .----XTAL------.
          |              |
OSCOUT ----+--C1--+---C2--+--- OSCIN
                 |
                 C3
                 |
                Gnd

with C3 much larger than C1 or C2 (e.g. 10:1) would be about the
same as having C3 shorted, **BUT** it would be possible to see
and measure the differential current in C1 and C2.  Since any
differential current between C1 and C2 has to be returned through
the ground lead, it would seem like minimizing that would be the
goal, and a setup like the above would provide an easy way to do
that.

Note that if the PIC is programmed with something like:

       movlw   254
       tris    PORTB
Loop:
       bsf     PORTB,0
       bcf     PORTB,0
       goto    Loop

the edges of PORTB would make it possible to determine whether the
signal on C3 was in phase with OSCOUT or OSCIN; this in turn would
indicate which cap (C1 or C2) should be made larger/smaller.

How does that sound for an idea?

1999\02\18@162933 by Gerhard Fiedler

picon face
At 13:29 02/18/99 -0600, John Payson wrote:
>How does that sound for an idea?

it's an idea... :)

are the differences between crystals of the same kind so small that an
optimization like this one makes sense for production, or are you thinking
mainly of highly optimized one-of-a-kind units?

if somebody tries it, would you please post your observations?

i once had problems getting a resonator to work at 3.3V and 1MHz; at that
time i simply used a crystal and had no problem. do you think this circuit
would be useful with resonators also? (i'm kinda lost above 1MHz when it's
not digital... ;-)

ge

1999\02\18@163734 by steve

flavicon
face
> >can you eventually explain in a more detailed what the criterias are to
> >optimize the oscilator circuit regarding emittation ?

> To keep the oscillator quiet is really very simple.
> Use the right loading caps. This also means that your xtal will be "singing
> the right tune"

The caps on the crystal have almost no bearing on the emission of the
device (unless you are so far off it is jumping between frequency
nodes continually). The voltage/current in the analog part of the
oscillator  circuit is almost pure sine wave (with maybe one or two
harmonics many dB down) and is very low power. What more could the
FCC want ?

However, as soon as it gets squared up inside the chip then all of Mr
Fouriers nightmares are generated as a function of the risetimes. The
switching times determine how many harmonics get generated and they
also have much power behind them.

You can make marked improvements in emissions by using a part that is
only as fast as it needs to be. ie. Don't use a 20MHz part where a
4MHz part will do, even if you are only running at 1MHz. Of course,
if a manufacturer selects frequency grades at packaging, there isn't
much you can do about it.

For a graphic illustration of this, find an expanded micro circuit
and replace the 74HCxx parts with 74Fxx ones. Scan the emissions
before and after. It's a real eye opener.

Steve.
======================================================
Steve Baldwin                Electronic Product Design
TLA Microsystems Ltd         Microcontroller Specialists
PO Box 15-680, New Lynn      http://www.tla.co.nz
Auckland, New Zealand        ph  +64 9 820-2221
email: .....stevebKILLspamspam@spam@tla.co.nz      fax +64 9 820-1929
======================================================

1999\02\18@170441 by dave vanhorn

flavicon
face
At 01:28 PM 2/18/99 -0800, Gerhard Fiedler wrote:
>At 13:29 02/18/99 -0600, John Payson wrote:
>>How does that sound for an idea?
>
>it's an idea... :)
>
>are the differences between crystals of the same kind so small that an
>optimization like this one makes sense for production, or are you thinking
>mainly of highly optimized one-of-a-kind units?

The oscillator works because there's gain and phase shift applied across
the crystal.
I bet you a buck if you get it balanced, you'll be reading DC.

1999\02\18@171134 by dave vanhorn

flavicon
face
>> To keep the oscillator quiet is really very simple.
>> Use the right loading caps. This also means that your xtal will be "singing
>> the right tune"
>
>The caps on the crystal have almost no bearing on the emission of the
>device (unless you are so far off it is jumping between frequency
>nodes continually). The voltage/current in the analog part of the
>oscillator  circuit is almost pure sine wave (with maybe one or two
>harmonics many dB down) and is very low power. What more could the
>FCC want ?

That was the first of several points, and if your caps are far out, you
will have significantly more distortion in the waveform.. Hence more
harmonic content.  Keeping it from radiating is another battle, but the
less you have to start with, the better.

>However, as soon as it gets squared up inside the chip then all of Mr
>Fouriers nightmares are generated as a function of the risetimes. The
>switching times determine how many harmonics get generated and they
>also have much power behind them.

Yup, and it can be pretty impressive too!

>You can make marked improvements in emissions by using a part that is
>only as fast as it needs to be. ie. Don't use a 20MHz part where a
>4MHz part will do, even if you are only running at 1MHz. Of course,
>if a manufacturer selects frequency grades at packaging, there isn't
>much you can do about it.

Good point, that's what the series resistances are about.. I tested some
"LOW EMI" flip flops from national, that had about 10X the EMI of LS parts
in the same circuit.. I called the app engineer, their reasoning was that
the inputs are low C and therefore cause less EMI to drive the device. The
behaviour of the outputs, with beautiful hard edges and plenty of drive,
wasn't considered.

>For a graphic illustration of this, find an expanded micro circuit
>and replace the 74HCxx parts with 74Fxx ones. Scan the emissions
>before and after. It's a real eye opener.

For those without spectrum analyzers, measure  the rise of temperature in a
nearby chicken carcass :)

1999\02\18@191143 by Gerhard Fiedler

picon face
At 17:03 02/18/99 -0500, dave vanhorn wrote:
>The oscillator works because there's gain and phase shift applied across
>the crystal.
>I bet you a buck if you get it balanced, you'll be reading DC.

i only bet when i know i win :)

so i take you mean that going with the standard caps is just fine, ie. not
much to improve there? or, if you really want to do something, check on the
3rd and 5th harmonics?

ge

More... (looser matching)
- Last day of these posts
- In 1999 , 2000 only
- Today
- New search...