Crystal frequency for PIC

Hi all,

I'm confused as how to choose a proper frequency crystal for my PIC uC like....16f84a,f628,f877 and so on... I have few question and confusion, here it goes.....

1.Which is better to use, A high frequency crystal(say 10Mhz) or low frequency(like 4Mhz). Most common one I've seen is 4Mhz, I want are the considerations as to decide which frequency should be used.

2.I have read that you can crack up your PIC up to 20Mhz. Is that right? Will this cause overheating and large current drain, similar to overclocked cpu?

Thanks

Reply to
Jack// ani
Loading thread data ...

It depends on the application. If you need the speed, go with the higher frequency. However, see below.

Exactly the same thing happens. CMOS, which is what the PIC and you computer CPU is made out of, requires power only during the logic transitions (except leakage). Thus, there is a roughly linear relation between power consumption and speed. That's why desktop CPUs are requiring better heatsinks and fans as they get faster.

Here is the best tip, though: you should learn to read the datasheet. They are fairly simple, freely available from microchip, and have information about this kind of thing, suggested crystal circuits, etc. Also, they are a good resource for the assembler. Just go to

formatting link
and look at the technical information section. If there are things you don't understand, you can ask them with their support, or ask here.

--
Regards,
   Robert Monsen

"Your Highness, I have no need of this hypothesis."
     - Pierre Laplace (1749-1827), to Napoleon,
        on why his works on celestial mechanics make no mention of God.
Reply to
Robert Monsen

In article , Jack// ani wrote:

Reply to
Byron A Jeff

--
The clock speed needs to be no faster than that required to accomplish
the verious tasks the µC has to do in the time it needs to accomplish
them.  For example, a timer with a granularity of 1µs would require a
clock 1000 times faster than a timer with a granularity of 1ms
executing the same sequence of instructions.
Reply to
John Fields

Tiny tip - I found that the 16F877A I was using had a 4MHz max in xtal mode, but would go to 20MHz in RC mode. It did say in the data sheet, but I had to read carefully to find it. Tried a 10MHz xtal out of curiosity, and it didn't work. hth Neil

Reply to
Neil

"Byron A Jeff" wrote

Hey Byron,

You have an error on that page. You specify (incorrectly) that CMCON and ADCON1 must be initialized to turn off the analog. The 16F88 actually powers up with these two registers ready for digital i/o. CMCON starts with a value of 0x07 and ADCON1 starts with 0x00.

OTOH, ANSEL must be initialized as (for some ignorant reason) it does power up with all the ADC pins set as analog.

Reply to
Anthony Fremont

Thanks for all replies.

Reply to
Jack// ani

In article , Anthony Fremont wrote: <

Reply to
Byron A Jeff

ElectronDepot website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.