FOSC = | Oscillator Selection bits |
XT | XT oscillator |
LP | LP oscillator |
EXTRC | RC oscillator |
HS | HS oscillator |
WDTE = | Watchdog Timer Enable bit |
OFF | WDT disabled |
ON | WDT enabled |
CP = | Flash Program Memory Code Protection bit |
OFF | Code protection off |
ON | All program memory code-protected |
LVP = | Low-Voltage (Single-Supply) In-Circuit Serial Programming Enable bit |
OFF | RB3 is digital I/O, HV on MCLR must be used for programming |
ON | RB3/PGM pin has PGM function; low-voltage programming enabled |
PWRTE = | Power-up Timer Enable bit |
OFF | PWRT disabled |
ON | PWRT enabled |
Register: IDLOC0 @ 0x2000
Register: IDLOC1 @ 0x2001
Register: IDLOC2 @ 0x2002
Register: IDLOC3 @ 0x2003
配置位的大概说明:
![](../img/eep/emb/emb-558071oxpxdggcw1.jpg)
总结:我们可以根据编译器的文档说明来自己编写配置位,也可以使用IDE来自动生成。推荐使用自动生成的配置位代码。