MPLAB X IDE with XC8 Compiler Manual - Sites at Lafayette · PDF fileMPLAB X IDE with XC8...

15
MPLAB X IDE with XC8 Compiler Manual: For our project we are using MPLAB X IDE v1.70 with XC8 compiler. MPLAB X can be downloaded from: www.microchip.com *Links to MPLAB X User’s Guide and Documentation for MPLAB X can also be found on the same webpage. XC8 Compiler supports the whole 8-bit PIC 10/12/16/18 series. XC8 installer can be downloaded from www.microchip.com . When running XC8 installer, you will be asked to enter a license activation key. (For free mode leave this blank) For our project we are using the free mode. We are working with PIC16LF1827 in this project. The instruction manual is written for PIC16LF1827 and would work with most 16X series. However, it is pertinent to see the datasheet of the particular device you are using for information as to what adjustments need to be made. The datasheet for PIC16LF1827 can be downloaded from www.microchip.com . This document includes instructions for : 1. Starting a new project. 2. Editing an existing project (firmware).

Transcript of MPLAB X IDE with XC8 Compiler Manual - Sites at Lafayette · PDF fileMPLAB X IDE with XC8...

MPLAB X IDE with XC8 Compiler Manual:

For our project we are using MPLAB X IDE v1.70 with XC8 compiler.

MPLAB X can be downloaded from: www.microchip.com

*Links to MPLAB X User’s Guide and Documentation for MPLAB X can also be found on the same webpage.

XC8 Compiler supports the whole 8-bit PIC 10/12/16/18 series. XC8 installer can be downloaded from www.microchip.com. When running XC8 installer, you will be asked to enter a license activation key. (For free mode leave this blank) For our project we are using the free mode.

We are working with PIC16LF1827 in this project. The instruction manual is written for PIC16LF1827 and would work with most 16X series. However, it is pertinent to see the datasheet of the particular device you are using for information as to what adjustments need to be made.

The datasheet for PIC16LF1827 can be downloaded from www.microchip.com.

This document includes instructions for :

1. Starting a new project. 2. Editing an existing project (firmware).

I. Starting a new project:

Setting up the Project:

Run MPLAB IDE, and then create a new project.

New project dialogue window will appear.

Step one: Choose your project. Select Microchip Embedded Standalone Project.

Click next.

Step 2: Select “All Families” and PIC16LF1827 from the drop down menu.

Click next.

Step 3: Select the appropriate header you want to use; if there is no header file associated with the project select “none”.

Click next.

Step 4: Select Tool. Select PICkit 3 from the Tool menu.

Click next.

Step 5: Select Plug-in board is automatically skipped.

Step 6: Select XC8 from the complier list.

Click next.

Step 7: Type in an appropriate project name (example: test_ project here) and select where you want to save it. Check the set as main project box.

Click next.

Your project is now created!

Step 8: Right click ‘Source Files’ in the project tree within the Projects window and create an empty source .c file.

Now you are ready to code!

II. Editing an existing project (firmware).

Step 1: Run MPLAB IDE and click on open project.

Step 2: Browse to the project location and select the required file.

The source file can now be edited!

After you are finished with making the changes or adding to the code, build and clean the project by clicking on build and clean icon as shown below.