// CONFIG1 #pragma config WDTPS = PS32768 // Watchdog Timer Postscaler Select (1:32,768) #pragma config FWPSA = PR128 // WDT Prescaler Ratio Select (1:128) #pragma config WINDIS = OFF // Windowed WDT Disable (Standard Watchdog Timer) #pragma config FWDTEN = OFF // Watchdog Timer Enable (WDT disabled in hardware; SWDTEN bit disabled)#pragma config ICS = PGx2 // Emulator Pin Placement Select bits (Emulator functions are shared with PGEC2/PGED2) #pragma config LPCFG = OFF // Low power regulator control (Disabled - regardless of RETEN) #pragma config GWRP = OFF // General Segment Write Protect (Write to program memory allowed) #pragma config GSS = OFF // General Segment Code Protect (Code protection is disabled) #pragma config JTAGEN = OFF // JTAG Port Enable (Disabled) // CONFIG2 #pragma config POSCMOD = HS // Primary Oscillator Select (HS Oscillator mode selected) #pragma config WDTCLK = LPRC // WDT Clock Source Select bits (WDT uses LPRC) #pragma config OSCIOFCN = ON // OSCO Pin Configuration (OSCO/CLKO/RA3 functions as port I/O (RA3)) #pragma config FCKSM = CSDCMD // Clock Switching and Fail-Safe Clock Monitor Configuration bits (Clock switching and Fail-Safe Clock Monitor are disabled) #pragma config FNOSC = PRIPLL // Initial Oscillator Select (Primary Oscillator with PLL module (XTPLL,HSPLL, ECPLL)) #pragma config ALTCMPI = DISABLE #pragma config WDTCMX = WDTCLK // WDT Clock Source Select bits (WDT clock source is determined by the WDTCLK Configuration bits) #pragma config IESO = OFF // Internal External Switchover (Disabled) #pragma config SOSCSEL = ON // SOSC Selection bits (SOSC circuit selected) #pragma config WDTWIN = PS25_0 // Window Mode Watchdog Timer Window Width Select (Watch Dog Timer Window Width is 25 percent) #pragma config PLLSS = PLL_PRI // PLL Secondary Selection Configuration bit (PLL is fed by the Primary oscillator) #pragma config BOREN = OFF // Brown-out Reset Enable (Brown-out Reset Disabled) // CONFIG4 #pragma config DSWDTPS = DSWDTPS1F // Deep Sleep Watchdog Timer Postscale Select bits (1:68719476736 (25.7 Days)) #pragma config DSWDTOSC = LPRC // DSWDT Reference Clock Select (DSWDT uses LPRC as reference clock) #pragma config DSBOREN = OFF // Deep Sleep BOR Enable bit (DSBOR Disabled) #pragma config DSWDTEN = OFF // Deep Sleep Watchdog Timer Enable (DSWDT Disabled) #pragma config DSSWEN = OFF // DSEN Bit Enable (Deep Sleep operation is always disabled) #pragma config PLLMODE = PLL96DIV2 // Frequency Multiplier Select Bits (96 MHz PLL. Oscillator input is divided by 2 (8 MHz input).) #pragma config IOL1WAY = OFF // PPS IOLOCK Set Only Once Enable bit (The IOLOCK bit can be set and cleared using the unlock sequence) #pragma config TMPRPIN = OFF // Tamper Pin Enable bit (TMPRN pin function is disabled) #pragma config TMPRWIPE = OFF // RAM Based Entryption Key Wipe Enable bit (Cryptographic Engine Key RAM is not erased onTMPR pin events) #pragma config ALTVREF = ALTVREFDIS // Alternate VREF location Enable (VREF is on a default pin (VREF+ on RA10 and VREF- on RA9)) #pragma config BTSWP = OFF // BOOTSWP Instruction Enable bit (BOOTSWP instruction is disabled) #pragma config BWRP = OFF // Boot Segment Write Protect (Boot segment may be written) #pragma config BSS = OFF // Boot segment Protect (No Protection (other than BWRP)) #pragma config BSEN = OFF // Boot Segment Control bit (No Boot Segment) #pragma config CWRP = OFF // Configuration Segment Program Write Protection bit (Configuration Segment may be written) #pragma config CSS = DIS // Configuration Segment Code Protection Level bits (No Protection (other than CWRP)) #pragma config AIVTDIS = DISABLE // Alternate Interrupt Vector Table Disable bit (Disable AIVT)