This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

Driving RGB LEDs with nRF52

In my case LEDs (N<10) would be animated (think pulsing).

My only concern is that the BLE core will limit the possibility to control the LEDs in real time, thus causing flickering and other artifacts. Perhaps DMA could help with that?

Has anyone had any experience with that?

Parents
  • Without knowing exactly what you aim to do I would recommend using the PWM peripheral on nRF52. This allows you to play sequences with different duty cycle. The lowest period you can get is 32767/125KHz ~= 0.26s. But this can be extended if you pad the sequence with some zeros (or ones).

    I can also recommend to use programmable LEDs, like the WS2812B. These only require power, ground and signal, so no additional transistor needed. You can search the forum for code to control these (uses software to toggle gpio) or take a look at this to use the PWM peripheral for controlling the LEDs (this project is not yet finished, but I have tested it).

Reply
  • Without knowing exactly what you aim to do I would recommend using the PWM peripheral on nRF52. This allows you to play sequences with different duty cycle. The lowest period you can get is 32767/125KHz ~= 0.26s. But this can be extended if you pad the sequence with some zeros (or ones).

    I can also recommend to use programmable LEDs, like the WS2812B. These only require power, ground and signal, so no additional transistor needed. You can search the forum for code to control these (uses software to toggle gpio) or take a look at this to use the PWM peripheral for controlling the LEDs (this project is not yet finished, but I have tested it).

Children
No Data
Related