Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

Choosing a crystal

Status
Not open for further replies.
Re: Capacitor

CoTang said:
I recently purchased some smt crystal from digikey, on it it states the speed and also a capacitor value. ex. "CRYSTAL 4.000 MHZ 18PF" Now what is the 18PF does that mean I HAVE to use 18pf cap to have it running? and will that affect my PIC?

I've found the values of the capacitors to be very uncritical, I simply use two of the same value that I come across first - anywhere from 10pF-33pF seem perfectly OK.

18pF is probably the external capacitance required for the crystal to run exactly at 4MHz.
 
generally, the higher the capacitance of the capacitors, the more stable the oscillator, but has a slower startup.

As for using AVRs, don't. I wouldn't want to learn 118 different commands...this is for the midrange processors though...
 
udi_hakim said:
There are basicly 3 types of crystals:

<snip><snip>

E) This one is not a crystal but a full oscillator inside a metal case , its supply a very stable square wave, very good component if to use instead of an RC oscillator.
If you are using this one for you uC you should look in its specifications for connecting an oscillator instead of a crystal...
**broken link removed**

You can use either of the above but the cheapest solution is the standart crystal.

I bought one of these from my electronic supplier. It is a 20MHz oscillator, and it has 20.000 printed on the can. Actually, that is the ONLY thing printed on the can! However, it did not come with any documentation on how to wire it correctly. Any suggestions on where I can find proper documentation, or better yet, a datasheet?

BEEF 41
 
B) Delay and timings - Lets say you made a 1ms delay with a 4Mhz crystal, if you'll change the crystal from 4Mhz to 8Mhz the delay you set to 1ms will turn to be 0.5ms.

so...it also means that if i downgrade the crystal from 10Mhz to 4Mhz its original delay of 10ms will be 4ms in 4Mhz?

pic16f84a-10/p delay routine will still work fine in pic16f84a-04/p? just apply that computation!
 
i think

could be that way that the full occ (in the metal box always are conected the same way..??

do'n as the case a mark (a cut aquare or somethink..)
or are the distance between the feets teh same..???

i think the componetn is like a led there is a rule for it..

like almost every electronic part

also if you compare the normal crystal 2leads..including the 2 cap..

you stay at final whit 4 feets soww cant be sow hard i guess...

TKS
 
I've never had any problem with my PIC18 chips oscillating without caps. PCBs, protoboards, no problem. I add them sometimes, but it never failed to work without 'em.
 
What about ceramic resonators? They are the same thing except combined into one right. Thats what I have been using and have had some problems but I don't think its related to my oscillator. Its hard to tell though. Only crappy thing about them is they are 3 pins with ground in the center, they should have put it off to one side, would have plugged in perfectly with the pic them since Vss is right next to osc1 and 2.
 
Right- a "20MHz" PIC12,14,16 uses a 20MHz crystal, but instruction speed & all counters use 4 clocks per cycle.

Now you didn't mention if these could be a PIC18, which can be different. They're rated for 40MHz clock speed, but it cannot drive a crystal at this speed. It can take an external 40MHz OSCILLATOR, but it can only take a CRYSTAL at 20MHz max. There's a 4x PLL mode in the _CONFIG bits which will multiply the crystal speed, in which case you'd use a 10MHz (at most) crystal which gets multiplied inside the PIC to generate a 40MHz internal clock. Instruction cycle divides by 4 again to get 10MHz.
 
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top