Microchip Technology SW006021-2 Manuale Utente
C Language Features
2012 Microchip Technology Inc.
DS52053B-page 133
5.3
DEVICE-RELATED FEATURES
MPLAB XC8 has several features which relate directly to the 8-bit PIC architectures
and instruction sets. These are detailed in the following sections.
and instruction sets. These are detailed in the following sections.
5.3.1
Device Support
MPLAB XC8 C Compiler aims to support all 8-bit PIC devices. However, new devices
in these families are frequently released. There are several ways you can check if the
compiler you are using supports a particular device.
in these families are frequently released. There are several ways you can check if the
compiler you are using supports a particular device.
From MPLAB IDE (v8), open the Build Options dialog. Select the Driver tab. In the
Available Drivers field, select the compiler you wish to use. A list of all devices sup-
ported by that compiler will be shown in the Selected Driver Information and Supported
Device area, towards the center of the dialog. See Figure 5-1 for the relevant fields in
this dialog.
Available Drivers field, select the compiler you wish to use. A list of all devices sup-
ported by that compiler will be shown in the Selected Driver Information and Supported
Device area, towards the center of the dialog. See Figure 5-1 for the relevant fields in
this dialog.
FIGURE 5-1:
SHOWING SUPPORTED DEVICES
From the command line, the same information can be obtained. Run the compiler you
wish to use and pass it the option --CHIPINFO (See Section 4.8.21 “--CHIPINFO:
Display List of Supported Devices”). A list of all devices will be printed.
wish to use and pass it the option --CHIPINFO (See Section 4.8.21 “--CHIPINFO:
Display List of Supported Devices”). A list of all devices will be printed.
If you use the -V option in addition to the --CHIPINFO option, more detailed
information my be shown about each device.
information my be shown about each device.
You can also see the supported devices in your favorite web browser. Open the files
pic_chipinfo.html
pic_chipinfo.html
for a list of all supported baseline or mid-range device, or
pic18_chipinfo.html
for all PIC18 devices. Both these files are located in the
DOCS directory under your compiler’s installation directory.
5.3.2
Instruction Set Support
The compiler support all instruction sets for PIC10/12/16 devices as well as the stan-
dard (legacy) PIC18 instruction set. The extended instruction mode available on some
PIC18 devices is not currently supported. Ensure you set the configuration bits to use
the PIC18 legacy instruction mode when appropriate.
dard (legacy) PIC18 instruction set. The extended instruction mode available on some
PIC18 devices is not currently supported. Ensure you set the configuration bits to use
the PIC18 legacy instruction mode when appropriate.