// System Clock Postscaler Selection bits: [Primary Oscillator Src: /2][96 MHz PLL Src: /3]
// PLL Prescaler Selection bits: No prescale (4 MHz oscillator input drives PLL directly)
// USB Clock Selection bit (used in Full-Speed USB mode only; UCFG:FSEN = 1): USB clock source comes directly from the primary oscillator block with no postscale
#pragma config CPUDIV = OSC2_PLL3, PLLDIV = 1, USBDIV = 1
// System Clock Postscaler Selection bits: [Primary Oscillator Src: /2][96 MHz PLL Src: /3]
// PLL Prescaler Selection bits: No prescale (4 MHz oscillator input drives PLL directly)
// USB Clock Selection bit (used in Full-Speed USB mode only; UCFG:FSEN = 1): USB clock source comes directly from the primary oscillator block with no postscale
#pragma config CPUDIV = 0x1, PLLDIV = 0x0, USBDIV = 0x0
// System Clock Postscaler Selection bits: [Primary Oscillator Src: /2][96 MHz PLL Src: /3]
// PLL Prescaler Selection bits: No prescale (4 MHz oscillator input drives PLL directly)
// USB Clock Selection bit (used in Full-Speed USB mode only; UCFG:FSEN = 1): USB clock source comes directly from the primary oscillator block with no postscale
#pragma config CONFIG1L = 0x8
// IDLOC @ 0x200000
#pragma config IDLOC0 = 0xFF
CPUDIV = | System Clock Postscaler Selection bits |
OSC2_PLL3 | [Primary Oscillator Src: /2][96 MHz PLL Src: /3] |
OSC4_PLL6 | [Primary Oscillator Src: /4][96 MHz PLL Src: /6] |
OSC3_PLL4 | [Primary Oscillator Src: /3][96 MHz PLL Src: /4] |
OSC1_PLL2 | [Primary Oscillator Src: /1][96 MHz PLL Src: /2] |
PLLDIV = | PLL Prescaler Selection bits |
1 | No prescale (4 MHz oscillator input drives PLL directly) |
5 | Divide by 5 (20 MHz oscillator input) |
12 | Divide by 12 (48 MHz oscillator input) |
2 | Divide by 2 (8 MHz oscillator input) |
6 | Divide by 6 (24 MHz oscillator input) |
3 | Divide by 3 (12 MHz oscillator input) |
10 | Divide by 10 (40 MHz oscillator input) |
4 | Divide by 4 (16 MHz oscillator input) |
USBDIV = | USB Clock Selection bit (used in Full-Speed USB mode only; UCFG:FSEN = 1) |
1 | USB clock source comes directly from the primary oscillator block with no postscale |
2 | USB clock source comes from the 96 MHz PLL divided by 2 |
IESO = | Internal/External Oscillator Switchover bit |
OFF | Oscillator Switchover mode disabled |
ON | Oscillator Switchover mode enabled |
FOSC = | Oscillator Selection bits |
INTOSC_EC | Internal oscillator, CLKO function on RA6, EC used by USB (INTCKO) |
ECPLLIO_EC | EC oscillator, PLL enabled, port function on RA6 (ECPIO) |
XT_XT | XT oscillator (XT) |
INTOSC_HS | Internal oscillator, HS oscillator used by USB (INTHS) |
ECPLL_EC | EC oscillator, PLL enabled, CLKO function on RA6 (ECPLL) |
INTOSC_XT | Internal oscillator, XT used by USB (INTXT) |
EC_EC | EC oscillator, CLKO function on RA6 (EC) |
ECIO_EC | EC oscillator, port function on RA6 (ECIO) |
XTPLL_XT | XT oscillator, PLL enabled (XTPLL) |
HSPLL_HS | HS oscillator, PLL enabled (HSPLL) |
HS | HS oscillator (HS) |
INTOSCIO_EC | Internal oscillator, port function on RA6, EC used by USB (INTIO) |
FCMEN = | Fail-Safe Clock Monitor Enable bit |
OFF | Fail-Safe Clock Monitor disabled |
ON | Fail-Safe Clock Monitor enabled |
VREGEN = | USB Voltage Regulator Enable bit |
OFF | USB voltage regulator disabled |
ON | USB voltage regulator enabled |
BOR = | Brown-out Reset Enable bits |
SOFT | Brown-out Reset enabled and controlled by software (SBOREN is enabled) |
OFF | Brown-out Reset disabled in hardware and software |
ON | Brown-out Reset enabled in hardware only (SBOREN is disabled) |
ON_ACTIVE | Brown-out Reset enabled in hardware only and disabled in Sleep mode (SBOREN is disabled) |
BORV = | Brown-out Reset Voltage bits |
1 | |
2 | |
3 | Minimum setting |
0 | Maximum setting |
PWRT = | Power-up Timer Enable bit |
OFF | PWRT disabled |
ON | PWRT enabled |
WDTPS = | Watchdog Timer Postscale Select bits |
8 | 1:8 |
1 | 1:1 |
32768 | 1:32768 |
1024 | 1:1024 |
2 | 1:2 |
32 | 1:32 |
16 | 1:16 |
16384 | 1:16384 |
128 | 1:128 |
4096 | 1:4096 |
64 | 1:64 |
8192 | 1:8192 |
2048 | 1:2048 |
512 | 1:512 |
256 | 1:256 |
4 | 1:4 |
WDT = | Watchdog Timer Enable bit |
OFF | WDT disabled (control is placed on the SWDTEN bit) |
ON | WDT enabled |
CCP2MX = | CCP2 MUX bit |
OFF | CCP2 input/output is multiplexed with RB3 |
ON | CCP2 input/output is multiplexed with RC1 |
PBADEN = | PORTB A/D Enable bit |
OFF | PORTB<4:0> pins are configured as digital I/O on Reset |
ON | PORTB<4:0> pins are configured as analog input channels on Reset |
LPT1OSC = | Low-Power Timer 1 Oscillator Enable bit |
OFF | Timer1 configured for higher power operation |
ON | Timer1 configured for low-power operation |
MCLRE = | MCLR Pin Enable bit |
OFF | RE3 input pin enabled; MCLR pin disabled |
ON | MCLR pin enabled; RE3 input pin disabled |
DEBUG = | Background Debugger Enable bit |
OFF | Background debugger disabled, RB6 and RB7 configured as general purpose I/O pins |
ON | Background debugger enabled, RB6 and RB7 are dedicated to In-Circuit Debug |
STVREN = | Stack Full/Underflow Reset Enable bit |
OFF | Stack full/underflow will not cause Reset |
ON | Stack full/underflow will cause Reset |
ICPRT = | Dedicated In-Circuit Debug/Programming Port (ICPORT) Enable bit |
OFF | ICPORT disabled |
ON | ICPORT enabled |
XINST = | Extended Instruction Set Enable bit |
OFF | Instruction set extension and Indexed Addressing mode disabled (Legacy mode) |
ON | Instruction set extension and Indexed Addressing mode enabled |
LVP = | Single-Supply ICSP Enable bit |
OFF | Single-Supply ICSP disabled |
ON | Single-Supply ICSP enabled |
CP0 = | Code Protection bit |
OFF | Block 0 (000800-001FFFh) is not code-protected |
ON | Block 0 (000800-001FFFh) is code-protected |
CP1 = | Code Protection bit |
OFF | Block 1 (002000-003FFFh) is not code-protected |
ON | Block 1 (002000-003FFFh) is code-protected |
CP2 = | Code Protection bit |
OFF | Block 2 (004000-005FFFh) is not code-protected |
ON | Block 2 (004000-005FFFh) is code-protected |
CP3 = | Code Protection bit |
OFF | Block 3 (006000-007FFFh) is not code-protected |
ON | Block 3 (006000-007FFFh) is code-protected |
CPD = | Data EEPROM Code Protection bit |
OFF | Data EEPROM is not code-protected |
ON | Data EEPROM is code-protected |
CPB = | Boot Block Code Protection bit |
OFF | Boot block (000000-0007FFh) is not code-protected |
ON | Boot block (000000-0007FFh) is code-protected |
WRT0 = | Write Protection bit |
OFF | Block 0 (000800-001FFFh) is not write-protected |
ON | Block 0 (000800-001FFFh) is write-protected |
WRT1 = | Write Protection bit |
OFF | Block 1 (002000-003FFFh) is not write-protected |
ON | Block 1 (002000-003FFFh) is write-protected |
WRT2 = | Write Protection bit |
OFF | Block 2 (004000-005FFFh) is not write-protected |
ON | Block 2 (004000-005FFFh) is write-protected |
WRT3 = | Write Protection bit |
OFF | Block 3 (006000-007FFFh) is not write-protected |
ON | Block 3 (006000-007FFFh) is write-protected |
WRTB = | Boot Block Write Protection bit |
OFF | Boot block (000000-0007FFh) is not write-protected |
ON | Boot block (000000-0007FFh) is write-protected |
WRTC = | Configuration Register Write Protection bit |
OFF | Configuration registers (300000-3000FFh) are not write-protected |
ON | Configuration registers (300000-3000FFh) are write-protected |
WRTD = | Data EEPROM Write Protection bit |
OFF | Data EEPROM is not write-protected |
ON | Data EEPROM is write-protected |
EBTR0 = | Table Read Protection bit |
OFF | Block 0 (000800-001FFFh) is not protected from table reads executed in other blocks |
ON | Block 0 (000800-001FFFh) is protected from table reads executed in other blocks |
EBTR1 = | Table Read Protection bit |
OFF | Block 1 (002000-003FFFh) is not protected from table reads executed in other blocks |
ON | Block 1 (002000-003FFFh) is protected from table reads executed in other blocks |
EBTR2 = | Table Read Protection bit |
OFF | Block 2 (004000-005FFFh) is not protected from table reads executed in other blocks |
ON | Block 2 (004000-005FFFh) is protected from table reads executed in other blocks |
EBTR3 = | Table Read Protection bit |
OFF | Block 3 (006000-007FFFh) is not protected from table reads executed in other blocks |
ON | Block 3 (006000-007FFFh) is protected from table reads executed in other blocks |
EBTRB = | Boot Block Table Read Protection bit |
OFF | Boot block (000000-0007FFh) is not protected from table reads executed in other blocks |
ON | Boot block (000000-0007FFh) is protected from table reads executed in other blocks |
bit設定 | AN12 | AN11 | AN10 | AN9 | AN8 | AN7 | AN6 | AN5 | AN4 | AN3 | AN2 | AN1 | AN0 |
0000 | A | A | A | A | A | A | A | A | A | A | A | A | A |
0001 | A | A | A | A | A | A | A | A | A | A | A | A | A |
0010 | A | A | A | A | A | A | A | A | A | A | A | A | A |
0011 | D | A | A | A | A | A | A | A | A | A | A | A | A |
0100 | D | D | A | A | A | A | A | A | A | A | A | A | A |
0101 | D | D | D | A | A | A | A | A | A | A | A | A | A |
0110 | D | D | D | D | A | A | A | A | A | A | A | A | A |
0111 | D | D | D | D | D | A | A | A | A | A | A | A | A |
1000 | D | D | D | D | D | D | A | A | A | A | A | A | A |
1001 | D | D | D | D | D | D | D | A | A | A | A | A | A |
1010 | D | D | D | D | D | D | D | D | A | A | A | A | A |
1011 | D | D | D | D | D | D | D | D | D | A | A | A | A |
1100 | D | D | D | D | D | D | D | D | D | D | A | A | A |
1101 | D | D | D | D | D | D | D | D | D | D | D | A | A |
1110 | D | D | D | D | D | D | D | D | D | D | D | D | A |
1111 | D | D | D | D | D | D | D | D | D | D | D | D | D |