Device Header Files

There is one header file that is typically included into each C source file you write. The <xc.h> file is 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, like CLRWDT().

Do not include chip-specific header files in your code, as this will reduce portability and these headers may not contain all the required definitions for the successful compilation of your code.

The header files shipped with the compiler are specific to that compiler version. Future compiler versions may ship with modified header files. Avoid including header files that have been copied into your project. Such projects might no longer be compatible with future versions of the compiler.

For information about assembly include files (.inc) (see Accessing Registers From Assembly Code).