MPLAB® Code Configurator (MCC) Melody Quick-Start Using Example Components
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.
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.
Workflow for Using Example Components:
- Add an Example Component from the Device Resources view.
- Select an Example Application.
- Select an Implementation (Polled, Callback etc).
- Configure MCC Project Settings as described in the Configuration Instructions.
- Generate code.
- Copy/Paste the generated example code snippet into your main.c file.
- Complete any TODO tasks in the generated code.
- Build/Run.
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:
- MPLAB IDE v6.20
- MPLAB XC8 v2.46
- MPLAB Code Configurator Plugin v5.5.1
- MCC Melody Core v2.7.1
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:
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: