10.07.2015 Views

pic24fj128ga010 family - Microchip

pic24fj128ga010 family - Microchip

pic24fj128ga010 family - Microchip

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

PIC24FJ128GA010 FAMILY7.3 Control RegistersThe operation of the oscillator is controlled by threeSpecial Function Registers:• OSCCON• CLKDIV• OSCTUNThe OSCCON register (Register 7-1) is the main controlregister for the oscillator. It controls clock sourceswitching, and allows the monitoring of clock sources.The Clock Divider register (Register 7-2) controls thefeatures associated with Doze mode, as well as thepostscaler for the FRC oscillator.The FRC Oscillator Tune register (Register 7-3) allowsthe user to fine tune the FRC oscillator over a range ofapproximately ±12%. Each bit increment or decrementchanges the factory calibrated frequency of the FRCoscillator by a fixed amount.REGISTER 7-1: OSCCON: OSCILLATOR CONTROL REGISTERU-0 R-0 R-0 R-0 U-0 R/W-x (1) R/W-x (1) R/W-x (1)— COSC2 COSC1 COSC0 — NOSC2 NOSC1 NOSC0bit 15 bit 8R/SO-0 U-0 R-0 (2) U-0 R/CO-0 U-0 R/W-0 R/W-0CLKLOCK — LOCK — CF — SOSCEN OSWENbit 7 bit 0Legend: CO = Clearable-Only bit SO = Settable-Only bitR = Readable bit W = Writable bit U = Unimplemented bit, read as ‘0’-n = Value at POR ‘1’ = Bit is set ‘0’ = Bit is cleared x = Bit is unknownbit 15 Unimplemented: Read as ‘0’bit 14-12 COSC2:COSC0: Current Oscillator Selection bits111 = Fast RC Oscillator with Postscaler (FRCDIV)110 = Reserved101 = Low-Power RC Oscillator (LPRC)100 = Secondary Oscillator (SOSC)011 = Primary Oscillator with PLL module (XTPLL, HSPLL, ECPLL)010 = Primary Oscillator (XT, HS, EC)001 = Fast RC Oscillator with postscaler and PLL module (FRCPLL)000 = Fast RC Oscillator (FRC)bit 11 Unimplemented: Read as ‘0’bit 10-8 NOSC2:NOSC0: New Oscillator Selection bits111 = Fast RC Oscillator with Postscaler (FRCDIV)110 = Reserved101 = Low-Power RC Oscillator (LPRC)100 = Secondary Oscillator (SOSC)011 = Primary Oscillator with PLL module (XTPLL, HSPLL, ECPLL)010 = Primary Oscillator (XT, HS, EC)001 = Fast RC Oscillator with postscaler and PLL module (FRCPLL)000 = Fast RC Oscillator (FRC)bit 7CLKLOCK: Clock Selection Lock Enabled bitIf FSCM is enabled (FCKSM1 = 1):1 = Clock and PLL selections are locked0 = Clock and PLL selections are not locked and may be modified by setting the OSWEN bitIf FSCM is disabled (FCKSM1 = 0):Clock and PLL selections are never locked and may be modified by setting the OSWEN bit.bit 6 Unimplemented: Read as ‘0’Note 1: Reset values for these bits are determined by the FNOSC Configuration bits.2: Also resets to ‘0’ during any valid clock switch, or whenever a non-PLL Clock mode is selected.© 2009 <strong>Microchip</strong> Technology Inc. DS39747E-page 95

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!