Page 1 of 1

Crystal selection advise required please

Posted: Wed Aug 10, 2011 8:35 pm
by Steve001
Evening ,

looking at my next project which uses a pic16f73 with lcd display and a pwm output to drive a resistor to generate heat for checking thermocouples, with a lm58 temp sensor for feedback.

Not too sure how to select the crystal size looking for some advice as 20 Mhz seems a bit excessive and possibly too fast ?
i don't need mega quick, how will a 3 or a 1 mhz crystal affect the pwm and the lcd display ? Timings
how do i size the capacitors for the crystals ?

a confused steve

Re: Crystal selection advise required please

Posted: Wed Aug 10, 2011 10:00 pm
by JohnCrow
Hi Steve.

Sounds an interesting project.
What sort of temperatures are you looking to generate?

Not used the LM58, I've done a few programs with the LM35, thats a nice simple device to use).

Re: Crystal selection advise required please

Posted: Thu Aug 11, 2011 7:23 am
by Steve001
Hi John,

Looking for 150 C the LM58, is simlar to the LM35 but higher temp

Steve

Re: Crystal selection advise required please

Posted: Thu Aug 11, 2011 10:04 am
by Benj
Hello,

Regarding crystals you must remember that the pic will run at 1/4 of the crystal speed and then things like PWM will run up to 1/4/16 times slower.

If your using Flowcode then the LCD timings will always be correct as long as you enter the correct crystal speed into Flowcode. Otherwise you need to setup loops to delay for the correct period when driving the LCD.

Capacitor values can be seen in the device datasheet under the oscillator section but I normally use 18 or 22pF for most crystals.