1 MCC Melody I2C Host Example Component for the Curiosity Nano Explorer
This document provides a guide to the MCC Melody I2C Host Example Component. It covers use cases for several I2C Client devices on the Curiosity Nano Explorer board. Supporting components are used depending on the selected implementation and visualization.
For the polled version implementation, to keep the code as simple as possible, a delay is typically used. While a timer is usually added for the Interrupts with callbacks implementation.
For the visualization options, depending on the selected option, a USART, Data Streamer Library or DV Run Time Library will be used. Instructions are provided for the configuration of these various components. Guidance is provided on using the MCC Melody Application Builder to add and configure components for the application.
Once the MCC Melody Components are configured, you'll be able to
generate main.c
source code, corresponding to the given Example,
Impementation and Visualization. The guide includes instructions for setting up the
MPLAB® Data Visualizer for the selected visualization. Where appropriate, best practices
for selecting appropriate pins and addressing potential conflicts in the system
configuration are discussed.
1.1 Introduction to MCC Melody Example Components
Example Components are a tight integration of learning material directly into MCC. This allows users to conveniently place configuration instructions side-by-side to the components they are configuring. For more information, refer to the MCC Melody Example Components Introduction.
Selection of Example and Implemenation is similar to the existing Example Components.

What is new with the I2C Host Example Component is the ability to independently select a
visualization for the selected example. The intention here is to very flexibly generate
main.c
source code depending on these various parameters. The new
feature of the I2C Host Example Component allows you to independently select
a visualization for the selected example.


Complete projects, available in MPLAB® Discover or GitHub, are specific to a board and microcontroller. However, the current project can be recreated on a range of supported microcontrollers by following the steps in the example component.
To explore what an example component is, as well as the difference between example and implementation, see MCC Melody Example Components - The Basics.
Example Components are related to MCC Melody Design Patterns for Control Flow,
which shows different standard ways to organize main.c
and other
application-level files, such as Polling, Interrupt and Callback, or State Machine
Design Patterns. Users might be familiar with each of these patterns, but:
- What support does MCC Melody provide for each?
- What are the recommended ways of building on the MCC Melody generated code?
1.2 MCC Melody Help Map
This diagram shows the MCC Melody Builder view, with an example project open, where links are provided for more information on a range of topics. Read the questions to find one that matches what you are looking for. The adjacent links will open online references or video training (courses) to get you familiar with different pieces of the MCC Melody and MPLAB® Tools Ecosystem.
1.2.1 MCC Melody Builder, GUI
1.2.2 Tools Ecosystem Context
Where does MCC Melody fit into the MPLAB Tools Ecosystem?