Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

Capacitors for crystal in PIC18F452

Status
Not open for further replies.

adwnis123

Full Member level 4
Joined
Jun 19, 2014
Messages
214
Helped
0
Reputation
0
Reaction score
1
Trophy points
18
Activity points
1,737
Hello, in a PIC18F452 running in 16MHz how will I calculate the capacitors I will solder along with the oscillator (crystal) in pins 13,14??? I see that many circuits use capacitors but I do not know how to calculate their value.
 

The answer is in the datasheet oscillator section.

I always use two 22pF capacitors, as this works with a wide variety of crystals.

Be sure to keep tracks lengths as short as possible and put the crystal and capacitors as close to the PIC as possible, or you may have problems.

... and yes, pins 13 and 14 if you are using the 40 pin package.
 

The perfect caps depends on how accurate you wish the crystal to be. The crystal is rated for a tolerance at 25'C when the rated load capacitance is applied If the input and output cap to ground are equal ,the load value is exactly half of each value based on series equivalent circuit as they are both in series with ground across the crystal.

Normally the in/out layout capacitance and buffer input capacitance is adds a few pF to this load which is factored into the rated value to determines the remainder that is applied to resonate at its centre frequency within the guaranteed tolerance at 25'C.

Thus if you used two 22pf Caps, this works as 11pf and added with 4pF input & layout capacitance so this might be optimal for a 16pF load rated crystal. If the Crystal was rated for 12pF it would operate a bit lower than 16MHz and if rated for 32pF would run a little hjgher. Since "Xtals" have a typical pull range of +/-100 ppm minimum your error would be much smaller than this and one tries to minimize the room temp offset by choosing the optimal values for the rated load.

If you don't care about +-100 ppm error, then it wont matter if you used both at 10 pf or both at 33 pF . Using a 27 pF and a 15 pF Cap would result in 9.6 pF which if the input capacitance is 4pF would result

As you can see from Digikey's site below, the 16 MHz crystals they supply come in a wide range of load capacitance.
To get different values, one might use a bigger one for the input (output of inverter and a smaller one for the outout of the filter which feeds the CMOS input of a self biased (1M ~10 typ) unbuffered inverter.

For 5V supplies and higher they tend to use a series resistor to limit the power dissipation to 10uW often the limit for motional power vibration. (Crystals are fragile and should never be used if dropped.)

xtal.png

IF you dont care about temperature drift any ceramic cap will do, if you want precision timing, only use C0G/NP0 read NP-zero often misread as NP-Oh because it is s easier to say but the zero stands for tempco . vs N100 or P100 which is -100 and +100 ppm per deg C. respectively.
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top