- FAE/Client Login
- product registration
- > Download <
- Our products
- Support
- FAQs
- technical support
- Installation
- Application Notes
- Device List
- Hints and Tips
- C38 - Special Page Access
- C6805 - Filling Unused ROM
- C6805 - Setting Multiple MORs
- C6805 - Working with MMEVS05/MMDS05
- C6808 and Emulators
- COP8C - Executing Initialization Code
- COP8C - S Register Support
- Debugging: Using Macros to Monitor Program Flow
- Declaring SPECIAL Memory
- eTPU - Function Set Support
- LCD Interface
- LOCAL Memory
- Low Cost, Low Speed A/D conversion for Embedded Systems
- MPC - Branch Islands on the PIC16C5x
- MPC - Constant ROM Arrays
- MPC - Named Address Space
- MPC - Setting Configuration Fuses
- Non-linear Data Transformations
- Using the CodeWright(TM) Editor
- Product-specific Notes
- Resources
- CODSupport
- Fixed Point
- Fuzzy Logic
- Publishing
- What's New
- About Us
- more information
MPC - Setting Configuration Fuses
Here is an example of setting configuration fuses on the PIC16Cxx using the #pragma __CONFIG directive: All configuration parameters are ORed together:
/* This example works with all members of the PIC14Cxx
and 16C5x/6x/7x/8x. It does not work, however, with
the 17Cxx family. */
/* Configuration word settings */
#define LP_OSC 0b00000000 /* Low power crystal */
#define XT_OSC 0b00000001 /* Crystal */
#define HS_OSC 0b00000010 /* High Speed crystal */
#define RC_OSC 0b00000011 /* RC Oscillator */
#define WDTE 0b00000100 /* Enable WDT */
#define PWRTE 0b00001000 /* Enable power-up time */
#define CP_UPR_1_2 0b00100000 /* Protect upper half */
#define CP_UPR_3_4 0b00010000 /* Protect upper 3/4 */
#define CP_OFF 0b00110000 /* Code protection off */
#pragma __CONFIG @ 0x2007 = RC_OSC | WDTE | CP_OFF | PWRTE;
#include <16c71.h>
void main(void) { }

eTPU_C:
C6808: