HI all
i have started working on PIC18FXXX.
can any body help me about PRESALING XTAL
why we use this. and which reg is use to set it
and how we can use the internal XTAl of MCU
hello.....i m having only knowledge abt mircro controllers...no idea about pic controllers..but u can get it from its datasheet. of ic..
in datasheets its mention that how much xtal range u can use with specified pic controlers.
best luck if i will find then reply you..
The 18F chips have the oscillator set by the CONFIG statement.
If you explain which chip are you using and if you are using "C" or ASM I can show you how to set it.
External crystals are used rather than internal as you can go to a higher frequency and thy are more accurate for frequency.
The 18F452 is an older chip and Microchip recommends use of 18F4520 to replace it.
The 18F452 does not have an internal oscillator. Your best bet is to get a xtal and connect as per data sheet.
If you can not get an xtal or external osc then you will need to get a resistor and capacitor and hook up as per data sheet under section "2.3 RC Oscillator"
Ther is a chart in section 23-12 and 23-13 that show the frequency vs resistor capacitor value.
For example 3.3K resistor and 20pf capacitor will yield a 3.5 meg osc.
Max osc is 4.0 meg.
I am more familiar with assembler but looking up examples
it appears the code below sets the oscillator.
Uncoment and use the following for type needed.
For example "#pragma config OSC" = RC for RCoscillator.