pragma target clock
48_000_000
-- Settings for external 12 MHz crystal and system clock 48 MHz.
pragma target OSC
HS -- External crystal
pragma target CLKOUTEN ENABLED --
CLKOUT function is enabled
pragma target PLLMULT N4X -- PLL Multipler Selection Bit, 4x Output Frequency Selected
-- Settings for internal clock and system clock 48 MHz.
-- pragma target OSC INTOSC_NOCLKOUT -- Internal clock
-- pragma target CLKOUTEN DISABLED -- CLKOUT function is disabled. I/O or oscillator function on the CLKOUT pin
-- pragma target PLLMULT N3X -- PLL Multipler Selection Bit, 3x Output Frequency Selected
-- Other fuses
pragma target CPUDIV P1
-- NO CPU system divide
pragma target USBLSCLK F48MHZ
-- System clock expects 48 MHz, FS/LS USB CLKENs divide-by is set to 8.
pragma target PLLEN
ENABLED -- 3x or 4x PLL Enabled
pragma target FCMEN
DISABLED -- Fail-Safe Clock Monitor is disabled
pragma target WRT
DISABLED -- Write protection off
pragma target STVR ENABLED --
Stack Overflow or Underflow will cause a Reset
pragma target LPBOR
DISABLED -- Low-Power BOR is disabled
pragma target IESO DISABLED --
Internal/External Switchover Mode is disabled
pragma target PWRTE
DISABLED -- power up timer
pragma target BROWNOUT DISABLED --
no brownout detection
pragma target WDT
DISABLED -- Watchdog disabled
pragma target MCLR EXTERNAL --
External reset
pragma target LVP
ENABLED -- allow low-voltage programming
pragma target VOLTAGE MAXIMUM -- brown out voltage
pragma target CP DISABLED --
Program memory code protection is disabled
OSCCON = 0b1111_1100 -- Select PLL,3x, 16MHz internal oscillator