CCS C Software and Maintenance Offers
FAQFAQ   FAQForum Help   FAQOfficial CCS Support   SearchSearch  RegisterRegister 

ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

CCS does not monitor this forum on a regular basis.

Please do not post bug reports on this forum. Send them to CCS Technical Support

capacitors

 
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion
View previous topic :: View next topic  
Author Message
Bilal



Joined: 24 Apr 2010
Posts: 75
Location: Islamabad

View user's profile Send private message Send e-mail

capacitors
PostPosted: Wed Jun 30, 2010 10:24 am     Reply with quote

Hi i have a problem with the values of Capacitors with 20MHz. i am using 24pF but i think its speed is varied with change of physical position of my board...
_________________
...
Ttelmah



Joined: 11 Mar 2010
Posts: 19515

View user's profile Send private message

PostPosted: Wed Jun 30, 2010 2:43 pm     Reply with quote

Of course it will.
It'll also depend on what your crystal actually wants.
A crystal is specified for a particular load capacitace to give the right frequency, and gain behaviour.

Cl = load capacitance the crystal requires. Typically something between 8pF, and 30pF - find from the data sheet of the crystal

Cs = stray capacitance of the board and pins. The pin capacitance is in the PIC data sheet, and the board capacitance will depend on your design. Things to avoid - long leads, running ground planes right round the capacitor legs, etc. etc..
A well designed board, with the crystal close to the PIC, will have Cs, at perhaps 4 to 5pF. A badly designed board with a ground plane close round the crystal legs, and long leads to the chip, can easily go up over 20pF.

Then:

Creqd = (Cl-Cs)*2

The '*2', is because the crystal sees the capacitances _in series_.

So for a 16pF crystal, with 5pF of stray capacitance, the required capacitors become:

(16-5)*2 = 22pF

However double your stray capacitance, and the value drops to just 12pF.

So board layout is _critical_ if you want good accuracy, and reliability from the oscillator...

Best Wishes
Bilal



Joined: 24 Apr 2010
Posts: 75
Location: Islamabad

View user's profile Send private message Send e-mail

..
PostPosted: Thu Jul 01, 2010 2:09 am     Reply with quote

means I should use less then 22pF of Caps...
_________________
...
Bilal



Joined: 24 Apr 2010
Posts: 75
Location: Islamabad

View user's profile Send private message Send e-mail

..
PostPosted: Thu Jul 01, 2010 2:10 am     Reply with quote

thanks Ttelmah it will help..
thanks a lot..
_________________
...
SherpaDoug



Joined: 07 Sep 2003
Posts: 1640
Location: Cape Cod Mass USA

View user's profile Send private message

PostPosted: Thu Jul 01, 2010 6:25 am     Reply with quote

It also means you must be very careful of moving conductive surfaces near the crystal. These will cause the stray capacitance to change and the frequency to change. You may have to put a grounded metal "can" around the crystal circuitry, so that any movement is outside the can and shielded from the crystal.
_________________
The search for better is endless. Instead simply find very good and get the job done.
Bilal



Joined: 24 Apr 2010
Posts: 75
Location: Islamabad

View user's profile Send private message Send e-mail

...
PostPosted: Thu Jul 01, 2010 7:16 am     Reply with quote

OOo thanks SherpaDoug..
this point is more important i believe..
_________________
...
Bilal



Joined: 24 Apr 2010
Posts: 75
Location: Islamabad

View user's profile Send private message Send e-mail

..
PostPosted: Thu Jul 01, 2010 8:17 am     Reply with quote

15pF will work with 20MHz Crystal with few precautions??
_________________
...
Display posts from previous:   
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group