8.2 Device Header Files

One header file that is typically included in each 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 are stored in the support/family/h directory for reference.

For information about assembly include files (*.inc), see the MPLAB® XC16 Assembler, Linker and Utilities User’s Guide (DS50002106).