MPLAB® Harmony v3 Peripheral Libraries on PIC32MZ EF: Step 3
Configure Pins for Switch and LED
Configure switch button pin with General Purpose Input/Output (GPIO) interrupt handler
The switch button will be configured as per the design schematic of the Curiosity PIC32MZ EF 2.0 Development Board shown in the accompanying image.
In the MPLAB® Code Configurator (MCC), select the Pin Settings tab and sort (Order) the entries by Ports.
Scroll down to GPIO pin RJ4 (Pin Number 131) in the Pin ID column and configure RJ4 as an external interrupt pin for SW1 switch functionality. 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 LED pin
The user LED will be configured as per the design schematic of the Curiosity PIC32MZ EF 2.0 Development Board shown in the accompanying image.
Select the Pin Settings tab and then scroll down to GPIO pin RJ7 (Pin Number 134) in the Pin ID column and configure RJ7 as an output pin for LED1 functionality.
Rename the default main file
Under the Project Graph tab, click on System, and give a name of your liking to the default template main file generated by the MCC.