next up previous contents index
Next: 4.6.18 PIC16 C Libraries Up: 4.6 The PIC16 port Previous: 4.6.16 Generic Pointers   Contents   Index

4.6.17 Configuration Bits

Configuration bits (also known as fuses) can be configured using `__code' and `__at' modifiers. Possible options should be ANDed and can be found in your processor header file. Example for PIC18F2550:

#include <pic18fregs.h> //Contains config addresses and options 
 
static __code char __at(__CONFIG1L) configword1l =  
  _USBPLL_CLOCK_SRC_FROM_96MHZ_PLL_2_1L &

  _PLLDIV_NO_DIVIDE__4MHZ_INPUT__1L & [...]; 
static __code char __at(__CONFIG1H) configword1h = [...]; 
static __code char __at(__CONFIG2L) configword2l = [...]; 
//More configuration words



2012-02-26