Update and Configure an Existing MHC-based MPLAB Harmony v3 Project to MCC-based Project: Step 3


In this step, we will extend the MHC project by configuring a GPIO pin for the SW3 switch and user LED (LED3).

Step 3.1: Configure the Switch Button Pin

Configure the switch button, BTN3 pin, with a General Purpose Input/Output (GPIO) interrupt handler.

The switch button, BTN3, will be configured as per the design schematic of the Curiosity PIC32MZ EF 2.0 Development Board shown in Figure 1.

user_guide_sw3_pin.png
Figure 1

1

Open Pin Configuration under Plugins: to verify the pin configuration. Select the Pin Settings tab and sort (Order) the entries by Ports.

pins_sorting.png
Figure 2

Scroll down to GPIO pin RJ6 (Pin #133) in the Pin ID column and configure RJ6 as a GPIO pin for SW3 switch functionality. An internal pull-up is enabled to avoid false edge detection as there is no external pull-up on the Curiosity PIC32MZ EF 2.0 Development Board.

configure_sw3_pin.png
Figure 3

Step 3.2: Configure the LED Pin

The user LED3 will be configured as per the design schematic of the Curiosity PIC32MZ EF 2.0 Development Board shown in Figure 4.

user_guide_led3_pin.png
Figure 4

1

Select the Pin Settings tab and then scroll down to GPIO pin RJ3 (Pin #117) in the Pin ID column and configure RJ3 as an output pin for LED3 functionality.

configure_led3_pin.png
Figure 5

Note: The LED3 on the Curiosity PIC32MZ EF 2.0 Development Board is active low. Configure the LED3 in the default OFF state by configuring the latch value to logic High.



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.