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

PWM jitter when setting duty cycle to .2 .4 .6 .8

I'm tryinng to minimize jitter on my LED when I switch between .2 .4 .6 .8 I'm using a nrf51822 for my testing. The jitter is so bad that it has a strobe effect.

I reviewed mention of some issues with this. I am attaching the code I'm using to control led2.

I'm sure that i have to change .period (frequency to 100khz to minimize the jitter) is there a code example out there that presents this implementation. The generic PWM in the libraries is definitely not that great for the nrf51822. I checked out the examples on a previous post and they ended up being about the nrf52. I was thing of generating a variable with a PWM algorythm with

   led.period_ms(10);    // Set the period to 10mS = 100Hz
        This would be me 100khz or or does it

Current changes to nrf51822 is done through remote bluetooth device for pwm

attached is the code any suggestions would be appreciated. ble_uart_pwm

Parents Reply Children
No Data
Related