Installation and Setup

The projects in this training series will require the following software and hardware tools installed on a computer.
Four main steps need to be completed:

  1. Install MPLAB® X IDE
  2. Install MPLAB® XC8 Compiler
  3. Install Hardware Programmer and Development Board
  4. Install MPLAB® Code Configurator

Each step is described below.

1. Install MPLAB® X

The first step is to download and install the MPLAB® X IDE. Follow the steps below to complete the installation for your operating system.

1

Download MPLAB® X Installer

Tool About Installers
Installation
Instructions
Windows Linux Mac OSX
MPLAB® X
Integrated Development Environment

2

Run the Installer

Choose your operating system from the tabs below:

1

Run Installer

WinInstall.png
Go to the location where you downloaded the installer. Unzip the downloaded file and run the installer:
MPLABX-vX.XX-windows-installer.exe.

Depending on your Windows security settings, you may get a window asking if you are sure you want to run this program. Answer "Yes".

2

Setup

Click Next >.

install1.png
Click image to enlarge.

3

License Agreement

Click the radio button next to "I accept the agreement".

Click Next >.

install2.png
Click image to enlarge.

4

Installation Directory

By default, MPLAB X IDE will be installed at C:\Program Files (x86)\Microchip\MPLABX. If you would prefer a different directory, click on the folder icon to the right of the text box and select the desired installation location.

Click Next >.

install3.png
Click image to enlarge.

5

Select Programs

If you only want to install MPLAB X IDE (Integrated Development Environment) or MPLAB IPE (Integrated Programming Environment), check/uncheck the appropriate boxes. Generally, you should install both programs.

Click Next >.

install4.png
Click image to enlarge.

6

Ready to Install

Click Next >.

install5.png
Click image to enlarge.

7

Installing

Wait until the installer has finished installing all components of the IDE.

install6.png
Click image to enlarge.

8

Permit Device Driver Installation

The USB device drivers are required to communicate with Microchip's hardware development tools.
Check the box next to "Always trust software from Microchip Technology" to prevent this dialog in the future.

install7.png
Click image to enlarge.

9

Complete

Leave the box checked if you want to have your web browser opened to the Microchip MPLAB XC compiler download page to download a compiler for use with MPLAB X IDE.

Uncheck the box if you already have a compiler or want to download one later.

Click Finish.

Installation is complete. There should be icons for MPLAB X IDE, MPLAB IPE, and the MPLAB Driver Switcher on the desktop. There will also be launchers in the Windows/Start menu under All Programs ▶ Microchip ▶ MPLAB X IDE.

install8.png
Click image to enlarge.

2. Install MPLAB® XC8 Compiler

The second step is to install the XC8 compiler. Follow the steps below to complete the installation at the default location. Once installed, MPLAB X should automatically find it when creating a new project.

1 Download MPLAB® XC8 Installer


MPLAB® XC8
Compiler

Download the installer appropriate to your operating system.

2 Run the Installer

Choose your operating system from the tabs below:

1

Run Installer

WinInstall.png
Go to the location where you downloaded the installer. Unzip the downloaded file and run the installer:
xc8-vX.XX-windows-installer.exe.

Depending on your Windows security settings, you may get a window asking if you are sure you want to run this program. Answer "Yes".

2

Setup

Click Next >.

install1.png
Click image to enlarge.

3

Accept License Agreement

Click on the radio button next to I accept the agreement.

Click Next >.

install2.png
Click image to enlarge.

4

Choose Installer

If you are installing the compiler for use on your machine only, click on the radio button next to Install compiler.

If you have a network license and are installing on a server, click on the radio button next to Install the Network License Server.

Click Next >.

install3.png
Click image to enlarge.

5

Installation Type

If you are not using a network license server, leave this unchecked. Otherwise check the box and provide the name of the network license server.

Click Next >.

install4.png
Click image to enlarge.

6

Installation Directory

Use the default installation location, or choose a different one if you prefer.

Click Next >.

install5.png
Click image to enlarge.

7

Compiler Settings

  • Apply settings to all users of this machine
    • Leave checked or uncheck if required in your environment
  • Add xc8 to the PATH environment variable
    • Not generally required unless you plan to use XC8 from the command line (terminal or script).
  • Add header file path to MCC_INCLUDE environment variable (used by the MPLAB C18 tools)
    • Required if you check either item below.
  • Update MPLAB IDE to use the XC8 compiler for all existing C18 (mcc18) projects
    • Best to leave unchecked if you still wish to use the legacy compiler with older projects.
  • Use XC8 for the C18 Linker, Librarian, and Assembler
    • Best to leave unchecked if you still wish to use the legacy compiler with older projects.


Click Next >.

install6.png
Click image to enlarge.

8

Ready to Install Compiler

Click Next >.

install7.png
Click image to enlarge.

9

Setup

Wait while the installer unpacks and installs all the files.

install8.png
Click image to enlarge.

10

Licensing Information

If you:

  • Have activated a license on a previous version of MPLAB XC8
  • You wish to use the free version of the compiler (some optimization features disabled)

simply click Next >.

Otherwise, choose to:

  • Purchase a license (to receive an activation key that will unlock the Standard or Pro optimization features)
  • Use the Pro evaluation version (reverts to free version after 60 days)
  • Provide an activation key.


Click Next >.

install9.png
Click image to enlarge.

11

Installation Complete

Click Finish.

install10.png
Click image to enlarge.

3. Install Hardware Programmer and Development Board

The software drivers for the development tool are built into the MPLAB®X software installation. The only steps required are to connect the programmer to the computer USB port and then to the development board.

ICSP Implementation Configuration

Connecting a PIC® MCU to a programmer/debugger uses a connection scheme called In-Circuit Serial Programming (ICSP). It's through the PGC and PGD connections that the device is programmed with the application software. These connections can be built on an electrical breadboard or circuit board per the schematic shown.

Figure: ICSP™ Application Circuit
ICSP_schematic.jpg

For simplicity, Microchip offers many different development boards that already provide this type of connection built in. For the projects in this series, the PICDEM™ Lab II Development Board is used with the components included with the board. The PICDEM Lab II has an ICSP 6-pin connector for the PICkit 3.

picdem2lab.jpg

The PICDEM Lab II Development Board is a development and teaching platform for use with 8-bit PIC® microcontrollers (MCUs). At its center, a large prototyping breadboard enables users to easily experiment with different values and configurations of analog components for system optimization. Several external connectors allow for user-customizable expansion, while our library of labs and application notes enrich the development experience. The PICDEM Lab II Development Board is also fully compatible with our latest software development environment.

 
Microchip Direct
Buy here >

1 Connect the Hardware

Select your development tool specific instructions.


4. Install MPLAB® Code Configurator (MCC)

The MCC requires you to first start MPLAB® X and then from the MPLAB X menu you can install the MCC plug-in. Instructions are below along with a video showing how it's done.

1 MCC Installation

The MCC Plugin can be installed from the Tools/Plugins menu in the MPLAB® X IDE

Select your specific instruction choice.

20th Annual
Microchip MASTERs Conference 2016
Register now - Deadline: July 29

JW Marriott Desert Ridge Resort-Phoenix, AZ

© 2016 Microchip Technology, Inc.
Information contained on this site regarding device applications and the like is provided only for your convenience and may be superseded by updates. It is your responsibility to ensure that your application meets with your specifications. MICROCHIP MAKES NO REPRESENTATIONS OR WARRANTIES OF ANY KIND WHETHER EXPRESS OR IMPLIED, WRITTEN OR ORAL, STATUTORY OR OTHERWISE, RELATED TO THE INFORMATION, INCLUDING BUT NOT LIMITED TO ITS CONDITION, QUALITY, PERFORMANCE, MERCHANTABILITY OR FITNESS FOR PURPOSE. Microchip disclaims all liability arising from this information and its use. Use of Microchip devices in life support and/or safety applications is entirely at the buyer's risk, and the buyer agrees to defend, indemnify and hold harmless Microchip from any and all damages, claims, suits, or expenses resulting from such use. No licenses are conveyed, implicitly or otherwise, under any Microchip intellectual property rights.