Searching \ for '[PIC] Capacitor for 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/microchip/devices.htm?key=pic
Search entire site for: 'Capacitor for crystal'.

Exact match. Not showing close matches.
PICList Thread
'[PIC] Capacitor for crystal'
2005\11\15@215935 by Padu

face picon face
I'm designing a circuit using a PIC18F452 that is going to communicate through USART at 115200bps. From the pic datasheet, I calculated that the ideal crystal for my app is 14.7456MHz (or 7.3728MHz, but I'll stick with the faster because I need the extra speed).

I selected the Abracon ABLS at exactly that speed (how convenient 8^D), and on its datasheet it specifies "Load Capacitance" at 18pF and Shunt capacitance at 7pF. My questions:

1-Should I use 18pF capacitors for my circuit? (I think the real question is what's the difference between load and shunt capacitance?)
2-What's the recommended type of capacitor in this case (ceramic, tantalun, electrolytic, etc). Is SMD fine?

Thanks

Padu

2005\11\15@222127 by rosoftwarecontrol

flavicon
face
I am using 20.2752MHz, and there must many other
suitable value for 18Fxxx.


----- Original Message -----
From: "Padu" <spam_OUTpaduTakeThisOuTspammerlotti.com>
To: "Microcontroller discussion list - Public." <.....piclistKILLspamspam@spam@mit.edu>
Sent: Tuesday, November 15, 2005 9:59 PM
Subject: [PIC] Capacitor for crystal


I'm designing a circuit using a PIC18F452 that is going to communicate
through USART at 115200bps. From the pic datasheet, I calculated that the
ideal crystal for my app is 14.7456MHz (or 7.3728MHz, but I'll stick with
the faster because I need the extra speed).

I selected the Abracon ABLS at exactly that speed (how convenient 8^D), and
on its datasheet it specifies "Load Capacitance" at 18pF and Shunt
capacitance at 7pF. My questions:

1-Should I use 18pF capacitors for my circuit? (I think the real question is
what's the difference between load and shunt capacitance?)
2-What's the recommended type of capacitor in this case (ceramic, tantalun,
electrolytic, etc). Is SMD fine?

Thanks

Padu

2005\11\15@223436 by Jinx

face picon face
www.piclist.com/techref/clocks.htm

http://www.dvanhorn.org/Micros/All/Crystals.php

http://ww1.microchip.com/downloads/en/AppNotes/00949a.pdf

http://ww1.microchip.com/downloads/en/AppNotes/00943A.pdf

http://ww1.microchip.com/downloads/en/AppNotes/00849a.pdf

http://ww1.microchip.com/downloads/en/AppNotes/00826a.pdf

http://ww1.microchip.com/downloads/en/AppNotes/00588b.pdf

> I am using 20.2752MHz, and there must many other
> suitable value for 18Fxxx.

Let me guess - with a 20MHz PIC ?

2005\11\16@014841 by David Van Horn

picon face
> I selected the Abracon ABLS at exactly that speed (how convenient
8^D),
> and
> on its datasheet it specifies "Load Capacitance" at 18pF and Shunt
> capacitance at 7pF. My questions:
>
> 1-Should I use 18pF capacitors for my circuit? (I think the real
question
> is
> what's the difference between load and shunt capacitance?)

Arrghh.. Pet peeve attack. :)

The caps are seen by the crystal as being in series, so start with a
value that is TWICE what is specified. In your case, 36pF. Now estimate
a value for stray capacitance on those leads in your circuit. A good
guess might be 5 pF or so. Subtract from the previous value, and round
to 30pF.  Start there.  Check a prototype, and see where the crystal is
oscillating. Trim the values to obtain dead-on frequency, and you're
there.

Will it "work" with 18pF?  Probably. Most of the time, under good
conditions.


> 2-What's the recommended type of capacitor in this case (ceramic,
> tantalun,
> electrolytic, etc). Is SMD fine?

You want caps that are stable over temperature, and relatively tight
tolerance.  Tantalum or electrolytic aren't even available in such low
values.  SMD multilayer ceramics would be a workable choice.



2005\11\16@014904 by David Van Horn

picon face
> http://www.dvanhorn.org/Micros/All/Crystals.php

This is my favorite :)




2005\11\16@023825 by Dmitriy Kiryashov

picon face
Hi David.

> > 2-What's the recommended type of capacitor in this case (ceramic,
> > tantalun,
> > electrolytic, etc). Is SMD fine?
>
> You want caps that are stable over temperature, and relatively tight
> tolerance.  Tantalum or electrolytic aren't even available in such low
> values.  SMD multilayer ceramics would be a workable choice.

C0G or NP0 to be exact.


WBR Dmitriy.

2005\11\16@074024 by olin piclist

face picon face
Padu wrote:
> I'm designing a circuit using a PIC18F452 that is going to communicate
> through USART at 115200bps. From the pic datasheet, I calculated that
> the ideal crystal for my app is 14.7456MHz (or 7.3728MHz, but I'll
> stick with the faster because I need the extra speed).

You probably don't need a crystal that allows hitting the baud rate exactly.
If you need the cycles, just use a 10MHz crystal with the 4x PLL.  You'll be
able to hit 115.2Kbaud close enough.  I've done this many times.  Also note
that you'd be better off with the 7.3728MHz crystal and 4x PLL than the
14.7456MHz crystal if cycles are important.

> I selected the Abracon ABLS at exactly that speed (how convenient 8^D),
> and on its datasheet it specifies "Load Capacitance" at 18pF and Shunt
> capacitance at 7pF. My questions:

There's a lot of misinformation and waving of dead fishes surrounding
crystal load caps.  The load capacitance spec means that this crystal is
rated for operation in parallel resonant circuits like a PIC crystal
oscillator.  18pF is the load the crystal needs to see accross its leads so
that it produces the required phase shift for a parallel resonant circuit at
the rated frequency.

The tricky part is "accross its leads", since that's not where you put the
load capacitor in a PIC oscillator circuit.  Another way to think of this is
that if the crystal were driven with a 0 impedence sine wave at the rated
frequency on one pin, the load capacitance would need to be from the other
pin to ground to get the right phase shift.  In this case the sine wave
voltage source and the load cap are in series from the crystal's point of
view, so their impedence's add.  Since the voltage source has 0 impedence by
definition, the effective impedence accross the crystal pins is just the
load capacitor.  This is closer to but not the same as a PIC crystal
oscillator, mostly since the PIC crystal driver output does not have 0
impedence, and it doesn't produce a pure sine either.

We usually put a capacitor directly on the PIC crystal driver output (OSCO
pin).  This serves both to reduce its effective impedence and to attenuate
harmonics (make the signal more a pure sine).  It makes it closer to the
ideal voltage source of above, but of course it doesn't get there.  Then we
put a "load capacitor" on the crystal output (OSCI pin) to hopefully adjust
the overall impedence the crystal sees accross its pins to the load
capacticance it is rated for.  However, calculating the true load
capacitance the crystal sees is not so easy.  On the input there is the PIC
driver impedence in parallel with OSCO capacitor.  This is in series with
the capacitor on the OSCI pin.  Then there is the OSCI pin input capacitance
to consider, plus various stray capacitances all around which are
significant since we're counting only a few pF.  In the end it becomes
impossible to calculate the best OSCI capacitance to add because too many
variables are unknown.

So I usually stick to the short answer and put 22pF on both OSCO and OSCI
and be done with it.  I'm sure your crystal rated for 18pF load will work
fine with 22pF to ground on each side.  Those two capacitors alone account
for 11 of the 18 required pF.  It seems about right that the non-zero
impedence of the OSCO driver and the various pin and stray capacitances can
make up the other 7pF.  Unfortunately "seems about right" is as close as
you're going to get.  Fortunately, the system is fairly forgiving of errors
on this value.

> 2-What's the recommended type of capacitor in this case (ceramic,
> tantalun, electrolytic, etc).

At 22pF you're not going to find tantalum or electrolytic.  Ceramic has
better characteristics anyway.

> Is SMD fine?

It's actually better since it has less stray inductance, assuming the
circuit is laid out well.


******************************************************************
Embed Inc, Littleton Massachusetts, (978) 742-9014.  #1 PIC
consultant in 2004 program year.  http://www.embedinc.com/products

2005\11\16@093708 by Mike Hord

picon face
> I'm designing a circuit using a PIC18F452 that is going
> to communicate through USART at 115200bps. From
>  the pic datasheet, I calculated that the ideal crystal
> for my app is 14.7456MHz (or 7.3728MHz, but I'll stick
> with the faster because I need the extra speed).

I'll take another tack, since you've had a number of
excellent answers about this from other folks...

Have you considered a three-pin ceramic resonator?
Accuracy is sub-crytal (~.5%), but much better than
internal oscillator or RC network.  Plus, the three pin
jobs have internal caps, so you just plug it in and go.
They're also more rugged than crystals.

My favorite is 81-CSTCC3.68MG-TC from Mouser.
Surface mount.  Run 3.68 into the PLL and you'll
get 14.72- sound familiar?

Mike H.

2005\11\16@101341 by Spehro Pefhany

picon face
At 08:37 AM 11/16/2005 -0600, you wrote:
{Quote hidden}

Doesn't that violate the maximum HS oscillator period specification of
250ns with PLL active? (Parameter 1/1A) Not that I doubt it usually works...

Best regards,

Spehro Pefhany --"it's the network..."            "The Journey is the reward"
speffspamKILLspaminterlog.com             Info for manufacturers: http://www.trexon.com
Embedded software/hardware/analog  Info for designers:  http://www.speff.com
->> Inexpensive test equipment & parts http://search.ebay.com/_W0QQsassZspeff


2005\11\16@113020 by Mike Hord

picon face
Indeed- thanks for pointing that out.

Mike H.

On 11/16/05, Spehro Pefhany <.....speffKILLspamspam.....interlog.com> wrote:
{Quote hidden}

> -

2005\11\16@162946 by Padu

face picon face
I lost track of the OP... sorry

>> http://www.piclist.com/techref/clocks.htm
>>
>> http://www.dvanhorn.org/Micros/All/Crystals.php

Very good and practical articles, thanks a lot.

>>
>> ww1.microchip.com/downloads/en/AppNotes/00949a.pdf
>>

Now this is a very methodic way of finding out the cap values, no marging
for "this should work" method. I'm home making my PCBs, it's not gonna be a
market product, so I wonder if I should go through something as detailed and
complete as this, but just by reading the AN it gave me a much deeper
insight of what's going on.


>> http://ww1.microchip.com/downloads/en/AppNotes/00943A.pdf

That's over my head, but it was good because it pointed two other ANs that
are more basic.

>>
>> ww1.microchip.com/downloads/en/AppNotes/00849a.pdf
>>
>> ww1.microchip.com/downloads/en/AppNotes/00826a.pdf
>>

Errr.. that you just pointed here.. Sorry, I was reading sequentially


>> ww1.microchip.com/downloads/en/AppNotes/00588b.pdf
>>


Very good one too, talks about most of the aspects of choosing crystal over
ceramic over RC etc.


2005\11\16@170800 by Padu

picon face
"Olin Lathrop" wrote
>
> You probably don't need a crystal that allows hitting the baud rate
> exactly.
> If you need the cycles, just use a 10MHz crystal with the 4x PLL.  You'll
> be
> able to hit 115.2Kbaud close enough.  I've done this many times.  Also
> note
> that you'd be better off with the 7.3728MHz crystal and 4x PLL than the
> 14.7456MHz crystal if cycles are important.
>

I knew that for lower baud rates, since I get 9600 with 4MHz very easily,
but I assumed that for higher speeds, I needed a very small error or no
error at all. Well, according to my estimates, 7.3MHz is enough to do the
kind of processing I'm gonna do, but I wanted to step up just to be sure.
Besides the additional power consumption, what other disadvantages there are
in using the 14MHz crystal? (cost is irrelevant as this will never make
production level quantities)

<snip>
{Quote hidden}

According to the datasheets and app notes I've been reading, there is room
to be really anal about the exact and precise value for the caps. One of the
app notes even suggests that I have several blank boards populated only with
the mcu, xtal circuit and power source to test it under several vdd/temp/cap
situations, but I prefer the short answer. Someone suggested 5pF for stray
capacitance. Assuming it is pretty close, then my caps should be 26pF, but
based on what I read so far, given it is within a certain range the precise
value is not critical.


>> 2-What's the recommended type of capacitor in this case (ceramic,
>> tantalun, electrolytic, etc).
>
> At 22pF you're not going to find tantalum or electrolytic.  Ceramic has
> better characteristics anyway.

Wuppps... my newbie birthmarks showing again

>
>> Is SMD fine?
>
> It's actually better since it has less stray inductance, assuming the
> circuit is laid out well.

Given that I am designing the circuit, that's a big assumption 8^D

Cheers

Padu

2005\11\16@170921 by Padu

picon face
Good suggestion, I'll investigate

Thanks

Padu

----- Original Message -----
From: "Mike Hord" <mike.hordspamspam_OUTgmail.com>
To: "Microcontroller discussion list - Public." <@spam@piclistKILLspamspammit.edu>
Sent: Wednesday, November 16, 2005 6:37 AM
Subject: Re: [PIC] Capacitor for crystal


{Quote hidden}

> --

2005\11\16@171750 by Jinx

face picon face
> Very good and practical articles, thanks a lot.

Yes, there's a lot of helpful information there. More than enough
for the average designer to make a good reliable oscillator, and
it doesn't hurt to have all the technical background

I tend to start with 22pF (for everything but 32kHz) as this
gets most crystals going. Then look at the waveform to check
there's no over-driving and also the frequency and adjust as
and if necessary. For applications that are more time-sensitive,
add a trimmer to get the frequency spot on

2005\11\16@173834 by Jinx

face picon face
> but I assumed that for higher speeds, I needed a very small error
> or no error at all

Error is relative to any speed - IOW 2% error at 300b is just as
good/bad at 115kb. 0% is the ideal, and you'll have no losses at
any speed for any length of packet. Where error becomes more
of a factor is as the packet lengthens. The slippage between the
UART sampling time/position and the bit centre is progressive and
cumulative and eventually, without correction (eg resetting the
UART at calculated and regular intervals), the UART and data
will get too far apart

> Well, according to my estimates, 7.3MHz is enough to do the kind
> of processing I'm gonna do, but I wanted to step up just to be sure

> Besides the additional power consumption, what other disadvantages
> there are in using the 14MHz crystal? (cost is irrelevant as this will
> never make production level quantities)

You may as well PLL the 7MHz up to 28MHz. Maximum common
crystal you could use with PLL on a 40MHz PIC would be 9.8304.
Don't know of any disadvantages, but you might want to consider
how the I/O interfaces at higher speeds (add or adjust delays for
capacitive loads for example). I can't think of any serious unfixable
problems I've ever had at 39-40MHz

2005\11\16@180649 by David Van Horn

picon face
> Error is relative to any speed - IOW 2% error at 300b is just as
> good/bad at 115kb. 0% is the ideal, and you'll have no losses at
> any speed for any length of packet. Where error becomes more
> of a factor is as the packet lengthens. The slippage between the
> UART sampling time/position and the bit centre is progressive and
> cumulative and eventually, without correction (eg resetting the
> UART at calculated and regular intervals), the UART and data
> will get too far apart

Errr.. Instead of "packet" you mean byte here.. Async serial resyncs on
the start bit.



2005\11\16@185108 by olin piclist

face picon face
Padu wrote:
> I knew that for lower baud rates, since I get 9600 with 4MHz very
> easily, but I assumed that for higher speeds, I needed a very small
> error or no error at all.

Smaller error in absolute time, but it's the same thing when considering
percentage error.


******************************************************************
Embed Inc, Littleton Massachusetts, (978) 742-9014.  #1 PIC
consultant in 2004 program year.  http://www.embedinc.com/products

2005\11\16@200522 by Jinx

face picon face
> Errr.. Instead of "packet" you mean byte here.. Async serial
> resyncs on the start bit

Of course, it does. I'm sure I must have been thinking of something else

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