The four buttons and four LEDs on the nRF21540 DK are connected to dedicated General-Purpose Input/Output (GPIO)s on the nRF52840 System on Chip (SoC).
| Part | GPIO | GPIO alternative | Solder bridge |
|---|---|---|---|
| Button 1 | P0.11 | P1.07 | - |
| Button 2 | P0.12 | P1.08 | - |
| Button 3 | P0.24 | - | |
| Button 4 | P0.25 | - | |
| LED 1 | P0.13 | SB5 | |
| LED 2 | P0.14 | SB6 | |
| LED 3 | P0.15 | SB7 | |
| LED 4 | P0.16 | SB8 |
If P0.13–P0.16 are needed for other functions, the LEDs can be disconnected by cutting the short on SB5–SB8. See Disconnecting the LEDs for more information. Since P0.11 and P0.12 are used as a part of the trace functionality, Button 1 and Button 2 can be moved to alternative GPIOs. For more information, see Debug input and trace.
The buttons are active low, which means that the input is connected to ground when the button is activated. The buttons do not have an external pull-up resistor, so the P0.24 and P0.25 pins must be configured as input with an internal pull-up resistor to use the buttons.
The LEDs are active low, which means that writing a logical zero (0) to the output pin illuminates the LED.