oscillator frequency

hi, how does one decide the operating frequency of a crystal oscillator required for a PIC18F452? is there any relation between the supply power and the frequency? the datasheet seems confusing. can anyone also kindly brief on the XT, HS, etc resonators mentioned in the datasheet?

Reply to
ron
Loading thread data ...

First of all, take into account that MICROCHIP recommends you to no use this PIC for new designs ... consider using PIC18F4520.

You must decide the frequency of the crystal depending on your application. The more velocity your application need to calculate or to do anything, the more xtal frequency you may use.

On PIC18F452 DS you could find the range of frequencies allowed by this device.

No. Supply power only affects you on POR situations because clock setup has an initial delay after POR that depends on supply voltage and on xtal frequency ... but it's really insignificant.

I'm not sure why you see this confusing ... is so clear how each mode (XT, HS, ...) works. Depending on the mode you select, you'd get some features or others ... for example, LP mode is the best for low-power/low-consuming applications but it's not recommended for fast calculations.

To configure the PIC with the oscilation mode you decide to use, you may setup correctly the "Configuration bits". That is, if you use MPLAB environment, on "Configure" main menu, the "Configuration Bits..." option. However, if you not use MPLAB, you can setup the configuration bits by code: see page 197 of PIC18F452 DS.

Regards,

Quitus.

Reply to
Quitus

Add a coda here. The above is true for the 18F452, but for the 18LF452, which can run at much lower supply voltages, the maximum supported frequency does drop with voltage. The same is true for the LF4520.

I suggest that the original poster, tries looking at the following application notes from Microchip: AN588, though written before the 18 family (and therefore not discussing the PLL), and AN826, give a superb overview of the reasons to chose resonators or crystals, and the oscillator modes.

Best Wishes

Reply to
Roger Hamlett

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.