Application Example Showing Alternative Ways of Writing Code

The example below demonstrates how to configure the microcontroller to turn on an LED when a user button is pressed. To achieve this, the user needs to identify the pins of the microcontroller routed to the user LED and to the user button. This example is developed for the PIC18F47Q10 Curiosity Nano development board. The user LED is routed to the pin 0 of the PORTE. The user button is routed to the pin 2 of the PORTE.