Lab 1: Create the Application
Objective
In Lab 1, you will create an MPLAB Harmony v3 project using Microchip Harmony Configurator (MHC). The application you create will utilize:
- A button to switch the application on or off
- Timer System Service using TC Peripheral Library to periodically sample temperature sensor data
- Asynchronous I2C driver using I2C Peripheral Library to read temperature from a temperature sensor
- Debug System Service and Console System Service using CDC USB Peripheral Library to print the temperature values on a COM (serial) port terminal application running on a PC.
Overview
The whole application is divided into four tasks.
- Sensor task
- SD Card task
- USB task
- Wi-Fi task
Each task runs its own state machine. The tasks are called from the SYS_Tasks() routine, which is run in an infinite loop.
In Lab 1, you will develop the Sensor task which includes the USB operations to print the sensor logs.
Procedure
Lab 1 Index
Part 1 - Create Project & Configure MCU
- Step 1 - Install the MHC Plug-in in MPLAB X IDE
- Step 2 - Create MPLAB Harmony v3 Project using MPLAB X IDE
- Step 3 - With MHC, verify System Clock Settings
- Step 4 - With MHC, configure I2C Driver, PLIB, Pins and Harmony Core
- Step 5 - With MHC, configure GPIO pin and interrupts
- Step 6 - With MHC, configure Debug System Service, Console System Service, USB Driver as CDC USB, and USB pins
- Step 7 - With MHC, configure System Time Service and Core Timer
- Step 8 - With MHC, view final project graph
- Step 9 - With MHC, generate code
Part 2 - Add Application Code & Build the Application