Create Your First Motor Control Application Using MPLAB® Harmony v3: Step 3
Configure Switch Button Pin with EIC
Add the External Interrupt Controller (EIC) to the project.
Under the Device Resources tab, expand Peripheral > EIC. Select and double-click on EIC to add the EIC module to the project.
Once it is successfully added, EIC will be listed under the Project Resources tab and the Project Graph.
Go back to the project graph and configure the EIC block as shown in the accompanying image to generate an interrupt on every switch press (S2 and S3) and enable debounce functionality on switch pins.
Select the Pin Settings tab and configure PD09 and PD10 as EIC Switch input pins as shown in the accompanying image.
Configure LED Pin
Open the MCC Pin Settings tab and configure PB26 (LED0) and PB27 (LED1) pins as GPIO output.
The final project graph will be as shown in the accompanying image: