PDA

View Full Version : Crystals/Internal Clocks



trust issues
- 9th November 2004, 15:40
Hi all, Purchased a 40MHz oscillator (sp) crystal for use with my 18F252. I read else where on this forum that there may be an internal clock in the 18Fx series. Can anyone give me a circuit diagram of where to put my crystal, or do I even need to use one?
Trust

Melanie
- 9th November 2004, 18:32
You wasted your money. I'm sorry to tell you it's not going to run with a 40MHz crystal or external oscillator at that speed.

To run at 40MHz, use a 10MHz crystal and set the internal PLL to x4.

Make friends with section 2 of the Datasheet (it also shows you how to hook up your Oscillator, Crystal, resonator or whatever and what loading capacitances you might need.

trust issues
- 9th November 2004, 18:56
I'm going to cry soon, this damn PIC takes so much work and this is all before I've properly tested it! OK so I will be getting a 10MHz crystal instead. From the datasheet it says I need two capacitors (C1 and C2) from the link bellow.

http://img.photobucket.com/albums/v46/trustytrust/ex3.jpg

Can you please suggest values I should get for it to work at 10MHz and will there be any other cruticial components just to get the pain in the ass PIC working?
thank you

Melanie
- 9th November 2004, 20:50
It says 10-22pF, so pick 15pF as a starter... kinda midway...

It's not a critical PIC, hell, it'll work from a piece of wet string in RC mode. Anything will get this going... 4Mhz Ceramic resonator, whatever... remember it's a replacement for the 16F87x when you run out of steam... you drop this PIC in it's place, and as long as you didn't have a flaky design to start with, away you go...

trust issues
- 17th November 2004, 17:50
Right, got the capacitors and the 10MHz crystal, one last question, do these quatz crystal things have a polarity or have to go in a specific way. I mean on the case I find no markings for polarity and in the datasheet nothing also, so just double checking before I risk blowing it up!

mister_e
- 17th November 2004, 18:00
do these quatz crystal things have a polarity or have to go in a specific way.

absolutely not. like ceramic cap or crystal resonator. No polarity, no nothing.

regards