I'm planning to connect The nRF52840 MCU GPIO in series to a 1.8V 20mA LED and a Resistor then to ground.
Would the current from the MCU be sufficient to power the LED ?
Thank you
I'm planning to connect The nRF52840 MCU GPIO in series to a 1.8V 20mA LED and a Resistor then to ground.
Would the current from the MCU be sufficient to power the LED ?
Thank you
How do you configure a GPIO to current sink?
It's not about the GPIO configuration - it's how you connect the LED.
How to properly post source code:

nrf_gpio_cfg_output(led_pin);
nrf_gpio_cfg(LED_1,NRF_GPIO_PIN_DIR_OUTPUT,
NRF_GPIO_PIN_INPUT_DISCONNECT,
NRF_GPIO_PIN_NOPULL,
NRF_GPIO_PIN_H0D1,
NRF_GPIO_PIN_NOSENSE);
nrf_gpio_pin_write(led_pin, 0);
nrf_gpio_pin_write(LED_1,0);

I am connecting the LED like Figure 1: +V is 3.3V and PORT Pin is configured as LED_1 and led_pin. I have 2 LEDs configured as the same connection.
Both GPIO codes don't work.
Thank you
Best regards,
Chong
Which pins are you using for led_pin and LED_1? P1.x pins do not have high drive capability (NRF_GPIO_PIN_H0D1), nor do some P0.x pins; this is sometimes overlooked .. Also be aware that if 3.3V is very much higher than your nRF52840 i/o voltage there may be issues with back-drive (phantom power) into the port pin.
Hi
I'm using P0.11 P0.12 P1.06 P1.07
All P1.x have no high drive capability?
Thank you
P1.x pins do not have high drive capability (NRF_GPIO_PIN_H0D1), nor do some P0.x pins
It was just a quick look, but I couldn't see that mentioned in the Product Specification ?