Step 5: Build, Program and Observe the Output
Build, Hardware Setup and Program
Build the project by clicking the Clean and Build drop-down arrow, then select Clean and Build Main Project.
At this point, the application is ready to be implemented on the hardware. Check whether the lab builds and programs successfully, and verify the build results in the output dialog box.
Connect the PIC32CM LS00 Curiosity Nano+ Touch Evaluation Kit to the host PC using a USB cable attached to the Debug USB port. This provides power to the board and enables debugging through the embedded debugger (nEDBG).
In MPLAB® X IDE, navigate to File > Project Properties, and ensure that PIC32CM LS00 Curiosity Nano+ Touch Evaluation Kit EDBG is chosen as the debugger under Connected Hardware Tool, and XC32 is selected as the Compiler Toolchain for XC32.
Program the application to the device by clicking on the Make and Program Device Main Project button as shown in the accompanying image. Check whether the lab builds and programs successfully and verify the build results in the output dialog box.
Observe the Output for CPU-Driven Transfer
Now, open the Tera Term terminal application on the PC (from the Windows® Start menu by pressing the Start button). Select the Serial Port as shown in the accompanying image.
Once the COM port is connected, click on Setup > Serial port. In the Tera Term: Additional settings window that appears, change the baud rate Speed to 115200, as shown in the accompanying image.
Observe the output displayed on the serial terminal, which shows the execution times for the three different operations. The output indicates the number of CPU cycles required to complete each operation, allowing for comparison of their performance.