Sonsivri

Electronics => Projects => Topic started by: glenndr_15 on June 23, 2009, 12:28:32 00:28



Title: Crystal for PIC16F877A
Post by: glenndr_15 on June 23, 2009, 12:28:32 00:28
how to choose a crystal for PIC16F877A?
which to you prefer? and why?
4MHz
12MHz
20MHz

Best regards,
glenndr_15


Title: Re: Crystal for PIC16F877A
Post by: kcsoft on June 23, 2009, 02:14:32 02:14
Typical use 20MHz (this is the maximum frequency for mid-range pics)
But the are other cases with special needs
-you need to power the pic from a low voltage source (2v-3v)
in this case you can use 4Mhz@2v and 10Mhz at maximum @3v (there is a graph about this in the datasheet)
-you have serial communication
in this case its best to use baud-rate-generator quartz frequency, for example 18.432Mhz, when calculating the value for SPBRG register,
the error is 0%.
-your system must be energy economic
The higher the frequency, the higher the current consumption. In this case the frequency should be below 4Mhz

In some temperature conditions, the oscillator must less sensible to temperature change (ceramic one does it).


Title: Re: Crystal for PIC16F877A
Post by: oldvan on August 06, 2009, 07:52:00 19:52
For one-off projects where timing is not critical, I have many brand new odball frequency crystals I've gotten nearly for free by the bagful at Hamfests and on eBay.  The frequencies are often numbers that don't seem to mesh with anything common sense, 12.126 MHz, 13.982 MHz, etc.  Some of them are obvious in their original purpose, such as NTSC Colorburst crystals at 3.579545 MHz.  For the tiny price I paid for them, I can spend a minute or two on figuring out timing.  :-)  Besides, I feel real good for saving a few pennies here & there.

Where I need to have exact 1 Ms timing or maximum performance, I grab a 20 MHz crystal and away I go.  I keep a small supply of 20 MHz on hand for the 16F series, and a supply of 10 HMz on hand for 18F or DSPIC series with internal 4X PLL etc.


Title: Re: Crystal for PIC16F877A
Post by: dideco on August 07, 2009, 08:36:15 08:36
I think that using a low frequency crystal makes a microcontroller much more immune to noise (environmental, etc) problems. Causes less power, less heat and more stable operation...

Am I right?


Title: Re: Crystal for PIC16F877A
Post by: glenndr_15 on August 07, 2009, 09:54:58 09:54
I think that using a low frequency crystal makes a microcontroller much more immune to noise (environmental, etc) problems. Causes less power, less heat and more stable operation...

Am I right?

Yes I think so, I forgot where did I read that but try to think the Behavior of the current at Low frequency compare to High frequency.