MPLAB® Code Configurator (MCC) Melody Quick-Start Using Example Components

Last modified by Microchip on 2024/09/06 09:55

Are you new to the MPLAB® Code Configurator (MCC) Melody project workflow? Not sure where to begin? "MCC Melody Example Components" helps you configure projects quickly and generate example application code.  By following along with an example module, you will rapidly create a project ready to program onto a device.

Device Resources

Example components are provided for several common peripheral drivers, and are shown under Device Resources in the Resource Management [MCC] tab.

TIMER Example

Easy View

Multiple avenues of help and documentation can be accessed by clicking on the information links provided within the Easy View tab within the TIMER Example tab. 

Example Flow

Back to top 

Workflow for Using Example Components:

  1. Add an Example Component from the Device Resources view.
  2. Select an Example Application.
  3. Select an Implementation (Polled, Callback etc).
  4. Configure MCC Project Settings as described in the Configuration Instructions.
  5. Generate code.
  6. Copy/Paste the generated example code snippet into your main.c file.
  7. Complete any TODO tasks in the generated code.
  8. Build/Run.

Back to top 

Hands-On Demonstration

The following video will lead you step-by-step through this process, as we add a Timer Example Component to a PIC18F57Q43-based MCC Melody project. To follow along, you will need the following hardware and software components:

Curiosity Nano Explorer Board

PIC18 Nano Board

Back to top 

Overview of the Hardware Connection

The Curiosity Nano Explorer includes a USB port for debugging purposes. The demo will not be using it. Be sure the USB located on the PIC18 Curiosity Nano Board is the one used to connect to the host computer:

Overview Hardware Connection

Back to top 

Hands-On Demonstration

Now, follow along with Glen as he takes you through the complete workflow using the "Timer Example (PLIB) - PIC16F/18F", which toggles the LED every 100 mS, using a polled implementation:

Back to top