7.2 Device Header Files

One header file that is typically included in each C/C++ source file you will write is xc.h, a generic header file that will include other device- and architecture-specific header files when you build your project.

Inclusion of this file will allow access to SFRs via special variables, as well as macros which allow special memory access or inclusion of special instructions.

Avoid including chip-specific header files in your code, as this reduces portability. However, device-specific compiler header files, as well as assembly include files, are stored in Device Family Packs discussed in 2.2 Device Support via Device Family Packs (DFPs).

For information about assembly include files (*.inc), see the MPLAB®XC-DSC Assembler, Linker and Utilities User’s Guide for dsPIC33A DSC (DS-50003919).