7 Pin Configuration
7.1 Pins Selection: Finding Schematics
To select any of the required pins for a given example, refer to the schematic of the board you are using. Examples can often be run on a range of hardware, selecting appropriate pins for a LED, Analog Input (ANx), UART Tx/Rx, etc.
If the Curiosity Nano platform is being used, the following guidelines will be useful.
When plugging in a Curiosity Nano evaluation kit, MPLAB X IDE will open the Kit Window tab, which contains a number of useful links for the particular board that you have.

Click the Curiosity Nano Schematics link, as shown in the image above, to quickly find the UART connected to the USB CDC of the Curiosity Nano debugger. In addition, you can very quickly find the LED, Button and Debug GPIO pin(s).

7.2 Select an Analog Input (ANx)
Analog peripherals, such as ADCs, require the selection of an Analog Input pin(s). To do this, the schematics of your board must be referenced.
- Choose the ANx pin. From the development board, or your own schematic, select a pin.
- Configure the ANx pin as either input (e.g., ADC) or output (e.g., DAC).
- More configuration options are available in the Pins window.

adc_channel_t
type, which is used in APIs related to taking
ADC conversions. 
7.3 Pins Selection: UART Tx/Rx
Once a UART Driver is added, your schematic must be referenced to select the right UART PLIB (Peripheral Library) as a dependency. To do this, the schematics of your board must be referenced.

- The image above depicts an example for the Q71, where UART2 is connected to the Serial/CDC port, UART Tx is RB4 and Rx is RB5.
-
Different UARTs can be used for certain PIC MCUs due to Peripheral Pin Select (PPS). In this case, the specific pins used for UART Tx and UART Rx play a significant role.
- It is possible to connect from the Serial/CDC port on the Curiosity Nano to either the Data Visualizer or a separate terminal program.
- For an introduction to the Data Visualizer, see Visual Debugging with MPLAB® Data Visualizer.
7.4 Pins Selection: LED, BUTTON and Debug GPIO
Many examples include General Purpose Input/Output (GPIO). Since the default naming convention for PINs in MCC Melody starts with IO_, all the I/O pins in examples follows this convention. For example, IO_LED or IO_BUTTON.

- Set the active low LED as output, rename to IO_LED.
- Set the active low BUTTON with no pull-up resistor as input, enable Weak Pullup, set Interrupt-on-Change to Negative.
Debug GPIO pins are also provided on the Curiosity Nano via the Data Gateway Interface (DGI). Debug GPIO are particularly useful for a rough verification of application timing.

- Go to AVR TCA PLIB Driver, PIC Timer0 PLIB Driver for a video on how to use the MCC Melody 100 ms Timer.
- If you are new to MPLAB Data Visualizer, see Debug GPIO Hello World (Microchip University).