Sunday, April 12, 2009

OSCILLATOR CONFIGURATIONS



OSCILLATOR CONFIGURATIONS

The PIC18F452 can be configured to operate in eight different oscillator modes depending upoon the setting of three configuration bits – FOSC2, FOSC1, and FOSC0.

The eight oscillator modes are

1. LP Low Power Crystal

2. XT Crystal/ Resonator

3. HS High Speed Crystal/ Resonator

4. HS + PLL High Speed Crystal/ Resonator with PLL enabled

5. RC External Resistor/Capacitor

6. RCIO External Resistor/Capacitor with I/O pin enabled

7. EC External Clock

8. ECIO External clock with I/O pin enabled

Crystal Oscillator/Ceramic Oscillator:

In XT, HS, LP or HS+PLL oscillator modes, a crystal or resonator is connected to OSC1and OSC2 pin in conjuction with two capacitors to establish oscillation. The 18F452 controller needs parallel cut crystal to work. The value of capacitance C2 and C3( See Figure Crystal Oscillator) depends uppon the mode of oscillation as well as the value of the crystal used. Higher capacitance increases the stability of the oscillator but it increases the start up time.A 15 pF capacitor is need to work the controller in HS mode with 4 MHz clock. Please read the datasheet of respective microcontroller for the values of capacitors C2 and C3.

RC Oscillator :

The RC oscilator need an external resistor ( R2) and capacitor (C2) to be connected to OSC1 pin of the pic microcontroller to establish oscillation. The RC oscillator frequenct is a function of supply voltage, resistor R, capacitor C and operating temperature. While selecting the resistor and capacitor, the user should take care of the tolerance of these components, otherwise faithful operation will not achieved. In the RC oscillator mode, the oscillator frequency divided by 4 (FOSC/4) is available at OSC2 pin. The signal may be used for test purpose or can be used for other synchonisation purposes. The value of R2 should be between 3 Kohms and 100 Kohms, and the value of capacitor C2 should be greater thta 20pF.

External Clock Input ( ECIO):

The EC and ECIO mode requires and external clock oscillator to be connected to OSC1 pin. In EC oscillator mode, the oscillator frequency divided by 4 is available at OSC2 pin. This signal can be used for logic timing and other synchronization purposes. In ECIO mode, FOSC/4 isnot availabe at the OSC2 pin , hence this pin can be used similar to an I/O pins. Please see the respective datasheet for further details.

HSS/PLL:

A phase Locked Loop Circuit is provided as a programmable option for users that want to multiply the frequency of the incoming crystal oscillator by 4. For an input clock frequency for 4 Mhz, the internal clock frequency will be multiplied to16 Mhz. This useful when the user want to avoid EMI problems to high frequency crystals. The PLL can only be enabled when the controller is configured for HS mode.

No comments: