Buttons and LEDs

nRF52840 DK Hardware

The four buttons and four LEDs on the nRF52840 DK are connected to dedicated GPIOs on the nRF52840 System on Chip (SoC).

Table 1. Button and LED connections
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 elsewhere, the LEDs can be disconnected by cutting the short on SB5–SB8. See the following figure for more information.

Since P0.11 and P0.12 are used as part of the Trace functionality, BUTTON 1 and BUTTON 2 can be moved to alternative GPIOs. For more information, see Debug input and trace.

Figure 1. Disconnecting the LEDs
Disconnecting the LEDs by shorting SB5–SB8 on nRF52840 DK

The buttons are active low, which means that input is connected to ground when the button is activated. The buttons do not have an external pull-up resistor, so the P0.11, P0.12, 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 turns on the LED.

Figure 2. Button and LED configuration
R48 220R R47 220R SB6 VDD_PER R50 220R SB7 R51 220R SB8 SB5 LED1 L0603G LED2 L0603G LED3 L0603G LED4 L0603G SB9 VDD VIN A2 VOUT A1 CTRL B2 GND B1 U4 TCK106AG nRF_ONLY TP22 LED4 LED3 LED2 LED1 LED LEDS P0.13 P0.14 P0.15 P0.16 SW1 PB SW SW2 PB SW SW3 PB SW SW4 PB SW BUTTON2 BUTTON1