Migrating ASF SAM C21 Application to MPLAB® Harmony v3 PIC32CM MC: Step 6

Last modified by Microchip on 2023/11/09 09:07

Building, Programming and Observing the Application

Procedure

Clean and build your application by clicking on the Clean and Build Clean and Build button button.

In case of compilation errors, recheck the steps and build the project again.


Program your application to the device by clicking on the Make and Program Make and Program button button.

Open the Tera Term application (or another terminal console) on your PC and navigate to File > New connection.

tera term new connection menu


Navigate to the Serial box in the opened window and select the port number that corresponds to the Embedded Debugger (EDGB) Virtual COM Port of your connected SAM L10 Xplained Pro.

Then, press OK to open a serial connection.

tera term new connection window


Open the Serial port configuration of Tera Term by navigating to Setup > Serial port….

Setup > Serial port… menu


In the Serial port setup window, verify that the Baud rate is set to 9600 and other elements are set as shown in the image, then press OK.

Tera Term Serial Port setup window


Now that the serial console is configured, reset the board and verify the application printing temperature and light sensor values continuously.

console message after reset


Cover the light sensor on the I/O Xplained Pro board by placing your hand over it (or another element to put the light sensor in a dark environment) to vary the light value.

Place a finger on the temperature sensor to vary the temperature.

console message after covering lightsensor


Back to top

Results

You successfully created an MPLAB Harmony v3 project from scratch. You configured and generated Harmony v3 peripheral library code for the I²C, USART, SUPC and ADC peripherals by considering the SAMC21 ASF example application. You also successfully migrated the application from ASF to Harmony v3.

Back to top

Analysis

In this lab, you have successfully created a project from scratch, added Peripheral Libraries (PLIBs), and migrated the application from ASF to MPLAB Harmony v3.

Back to top

Conclusions

In this tutorial, you discovered how to use MPLAB Harmony framework v3 and successfully created a project from scratch, added Peripheral Libraries (PLIBs), and migrated the application from ASF to MPLAB Harmony v3.

Back to top