Transcription of Section 2. Oscillator - Microchip Technology
1 1997 Microchip Technology Inc. DS31002A page 2-1 M Oscillator 2 Section 2. Oscillator HIGHLIGHTS This Section of the manual contains the following major .. Configurations .. oscillators / Ceramic Resonators .. RC 4 MHz RC Oscillator .. of Sleep Mode on the On-chip Oscillator .. of Device Reset on the On-chip Oscillator .. Tips .. Application Revision History ..2-20 PICmicro MID-RANGE MCU FAMILY DS31002A-page 2-2 1997 Microchip Technology Inc. Introduction The internal Oscillator circuit is used to generate the device clock. The device clock is requiredfor the device to execute instructions and for the peripherals to function.
2 Four device clock peri-ods generate one internal instruction clock (T CY ) cycle. There are up to eight different modes which the Oscillator may have. There are two modes whichallow the selection of the internal RC Oscillator clock out (CLKOUT) to be driven on an I/O pin, orallow that I/O pin to be used for a general purpose function. The Oscillator mode is selected bythe device configuration bits. The device configuration bits are nonvolatile memory locations andthe operating mode is determined by the value written during device programming. The oscillatormodes are: LPLow Frequency (Power) Crystal XTCrystal/Resonator HSHigh Speed Crystal/Resonator RCExternal Resistor/Capacitor (same as EXTRC with CLKOUT) EXTRC External Resistor/Capacitor EXTRC External Resistor/Capacitor with CLKOUT INTRC Internal 4 MHz Resistor/Capacitor INTRC Internal 4 MHz Resistor/Capacitor with CLKOUTT hese Oscillator options are made available to allow a single device type the flexibility to fit appli-cations with different Oscillator requirements.
3 The RC Oscillator option saves system cost whilethe LP crystal option saves power. Configuration bits are used to select the various options. Formore details on the device configuration bits, see the Device Characteristics Section . Oscillator Types Mid-Range devices can have up to eight different Oscillator modes. The user can program up tothree device configuration bits (FOSC2, FOSC1 and FOSC0) to select one of these eight modes: LPLow Frequency (Power) Crystal XTCrystal/Resonator HSHigh Speed Crystal/Resonator RCExternal Resistor/Capacitor (same as EXTRC with CLKOUT) EXTRC External Resistor/Capacitor EXTRC External Resistor/Capacitor with CLKOUT INTRC Internal 4 MHz Resistor/Capacitor INTRC Internal 4 MHz Resistor/Capacitor with CLKOUTThe main difference between the LP, XT, and HS modes is the gain of the internal inverter of theoscillator circuit which allows the different frequency ranges.
4 Table 2-1 and Table 2-2 give infor-mation to aid in selecting an Oscillator mode. In general, use the Oscillator option with the lowestpossible gain which still meet specifications. This will result in lower dynamic currents (I DD ). Thefrequency range of each Oscillator mode is the recommended (tested) frequency cutoffs, but theselection of a different gain mode is acceptable as long as a thorough validation is performed(voltage, temperature, component variations (Resistor, Capacitor, and internal microcontrolleroscillator circuitry)).The RC mode and the EXTRC with CLKOUT mode have the same functionality.
5 They are namedlike this to help describe their operation vs. the other Oscillator modes. 1997 Microchip Technology 2-3 Section 2. Oscillator Oscillator 2 Table 2-1:Selecting the Oscillator Mode for Devices with FOSC1:FOSC0 Table 2-2:Selecting the Oscillator Mode for Devices with FOSC2:FOSC0 Configuration bitsFOSC1:FOSC0 OSCModeOSC Feedback Inverter GainComment 1 1 RC Least expensive solution for device oscillation (only an external resistor and capacitor is required). Most variation in time-base. Device s default mode. 1 0 HSHigh GainHigh frequency application. Oscillator circuit s mode consumes the most current of the three crystal modes.
6 0 1 XTMedium Gain Standard crystal/resonator frequency. Oscillator circuit s mode consumes the middle current of the three crystal modes. 0 0 LPLow GainLow power/frequency applications. Oscillator circuit s mode consumes the least current of the three crystal modes. Configuration bitsFOSC2:FOSC0 OSCModeOSC Feedback Inverter GainComment 1 1 1 EXTRC with CLKOUT Inexpensive solution for device oscillation. Most variation in timebase. CLKOUT is enabled on pin. Device s default mode. 1 1 0 EXTRC Inexpensive solution for device oscillation. Most variation in timebase. CLKOUT is disabled (use as I/O) on pin.
7 1 0 1 INTRC with CLKOUT Least expensive solution for device oscillation. 4 MHz Oscillator , which can be tuned. CLKOUT is enabled on pin. 1 0 0 INTRC Least expensive solution for device MHz Oscillator , which can be tuned. CLKOUT is disabled (use as I/O) on pin. 0 1 1 Reserved 0 1 0 HSHigh GainHigh frequency application. Oscillator circuit s mode consumes the most current of the three crystal modes. 0 0 1 XTMedium Gain Standard crystal/resonator frequency. Oscillator circuit s mode consumes the middle current of the three crystal modes. 0 0 0 LPLow GainLow power/frequency applications. Oscillator circuit s mode consumes the least current of the three crystal modes.
8 PICmicro MID-RANGE MCU FAMILY DS31002A-page 2-4 1997 Microchip Technology Inc. Crystal oscillators / Ceramic Resonators In XT, LP or HS modes a crystal or ceramic resonator is connected to the OSC1 and OSC2 pinsto establish oscillation (Figure 2-1). The PICmicro Oscillator design requires the use of a parallelcut crystal. Using a series cut crystal may give a frequency out of the crystal manufacturer sspecifications. When in XT, LP or HS modes, the device can have an external clock source drivethe OSC1 pin (Figure 2-3). Figure 2-1: Crystal or Ceramic Resonator Operation (HS, XT or LP Oscillator Mode) C1C2 XTALOSC2Rs (1) OSC1RF (2) SLEEPTo internal logic (3) PIC16 CXXXTo internal logic (3) Note 1: A series resistor, RS, may be required for AT strip cut : The feedback resistor, RF, is typically in the range of 2 to 10 M.
9 3: Depending on the device, the buffer to the internal logic may be either before or after the Oscillator inverter. 1997 Microchip Technology 2-5 Section 2. Oscillator Oscillator 2 / Resonator Start-up As the device voltage increases from V SS , the Oscillator will start its oscillations. The timerequired for the Oscillator to start oscillating depends on many factors. These include: Crystal / resonator frequency Capacitor values used ( C1 and C2 in Figure 2-1) Device V DD rise time System temperature Series resistor value (and type) if used ( Rs in Figure 2-1) Oscillator mode selection of device (which selects the gain of the internal Oscillator inverter) Crystal quality Oscillator circuit layout System noiseFigure 2-2 graphs an example Oscillator / resonator start-up.
10 The peak-to-peak voltage of theoscillator waveform can be quite low (less than 50% of device V DD ) where the waveform is cen-tered at V DD /2 (refer to parameters D033 and D043 in the Electrical Specifications Section ). Figure 2-2: Example Oscillator / Resonator Start-up Characteristics VoltageCrystal Start-up TimeTimeDevice VDDM aximum VDD of System0V PICmicro MID-RANGE MCU FAMILY DS31002A-page 2-6 1997 Microchip Technology Inc. Selection Figure 2-1 is a diagram of the devices crystal or ceramic resonator circuitry. The resistance forthe feedback resistor, R F , is typically within the 2 to 10 M range.