Lab 1: Create the Application

Step 11: Build and Run the Application

1

Verify that the I/O1 Xplained Pro Extension Kit is connected to the Xpro header J203 on the PIC32 WFI32E Curiosity Board.

2

Verify that the MPLAB ICD4 is attached to the board over an ICSP adapter.

And verify that the micro-USB cable is connected between the computer and USB POWER (J204) connector of the PIC32 WFI32E Curiosity Board.

You can also refer to the "Hardware Connection Setup" section.

lab1_step11_01.png
Figure 1: Hardware Connection Setup

3

Go to File > Project Properties and verify the connected hardware tool and compiler toolchain version.

lab1_step11_02.png
Figure 2: Verify Project Properties

4

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

5

Program your device with the built application binary by clicking on the Main_Program_Target_Project.pngMake and Program Device button.

6

Now open your favorite serial terminal application on your computer and connect to the serial port as shown in Figure 3 (Tera Term is used here for reference).

lab1_step11_console_setup.png
Figure 3: Open USB Serial Port using Tera Term

Note: It is not required to adjust the Baud rate as you are using a USB connection.

7

Press the SW1 switch (the upper one) to start reading the temperature sensor value. A reading of the temperature value occurs every 10 seconds.

lab1_step11_console_display.png
Figure 4: Verify the Output

Note: You can find the Lab 1 solution in the folder: <your unzipped folder path>\getting_started_pic32_wfi32e\Lab1\solution.

 Results

You will be able to observe a new reading every 10 seconds on the serial console.

 Analysis

In this lab, you have successfully created a simple sensor application on the PIC32 WFI32E microcontroller and read the temperature from a sensor.

The I2C Driver was configured with default settings to operate at 50 kHz.

The Debug system service and Console system service on top of the USB CDC Peripheral Library were used to print the temperature value on a serial console.

In the next lab, you will enhance the application and log data to an SD CARD.

 Conclusions

In this lab, you have successfully developed a full-fledged MPLAB Harmony Application. This gives you a fair idea of how MPLAB Harmony helps application development. If you need to add sensor support to any of your existing applications, this lab can be used as a reference. This can also be a starting point for your IoT applications.



Next Step >

© 2022 Microchip Technology, Inc.
Notice: ARM and Cortex are the registered trademarks of ARM Limited in the EU and other countries.
Information contained on this site regarding device applications and the like is provided only for your convenience and may be superseded by updates. It is your responsibility to ensure that your application meets with your specifications. MICROCHIP MAKES NO REPRESENTATIONS OR WARRANTIES OF ANY KIND WHETHER EXPRESS OR IMPLIED, WRITTEN OR ORAL, STATUTORY OR OTHERWISE, RELATED TO THE INFORMATION, INCLUDING BUT NOT LIMITED TO ITS CONDITION, QUALITY, PERFORMANCE, MERCHANTABILITY OR FITNESS FOR PURPOSE. Microchip disclaims all liability arising from this information and its use. Use of Microchip devices in life support and/or safety applications is entirely at the buyer's risk, and the buyer agrees to defend, indemnify and hold harmless Microchip from any and all damages, claims, suits, or expenses resulting from such use. No licenses are conveyed, implicitly or otherwise, under any Microchip intellectual property rights.