Academic Program

Setup

Setup

Step by Step Instructions

Using the MPLAB® Code Configurator (MCC), this project generates the code to blink an LED using a hardware timer, Timer0, to generate the delay between the on and off state.

project4.png

 

The project uses:

  • PIC16F18875
  • HPC Curiosity Board
  • MPLAB X IDE
  • MPLAB Code Configurator (MCC) plug-in
  • MPLAB XC8 Compiler

To follow along with these steps, MPLAB X should be open and the HPC Curiosity Board connected to the computer through a USB cable.

The setup is described in the "Setup and Installation" section of this training module. You should see a screen similar to the one below before proceeding to step 1.

mplabx.png

 

Step 1 - Create a new 'Stand-Alone' project in MPLAB X for a PIC16F18875.

If this is your first time creating an MPLAB X project, please visit the "Create a Standalone Project" page to follow step-by-step instructions on how to do this.

Step 2 - Open MCC under the Tools > Embedded menu of MPLAB X IDE.

mcclaunch.png

 

Step 3 - Select the peripherals for your project. For this first project, the following peripherals need to be selected:

  • System Module
  • Interrupt Module
  • Pin Module
  • TMR0

These modules will automatically be included when you launch the MCC, except TMR0. TMR0 needs to be added from Device Resources. Just click on Timer and then double-click on TMR0 to add it to the project. The result should look like the picture below:

proj4per.png