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

PWM Frequency

Hello, I've looked at the forum response for

devzone.nordicsemi.com/.../is-there-an-example-code-for-using-pwm-on-the-nrf51822-with-a-softdevice

I am unable to implement because, I think, I don't have access to all of the libraries included nor could I find. I'm using the nRF51822 in an RFDuino application running a pump and I need to get the PWM pin upwards of 5 kHz. I know I need to change pin designations but can't get that far yet.

Could use help on getting the libraries so I can examine and try to change correctly.

THX. Mike

Parents
  • Hi Mike,

    Have you found a solution to increase the PWM frequency on the RFduino in a way that I can keep on using the analogWrite function?

    I was able to slow it down by increasing the divider, but unable to increase the frequency since it was already set to 1 (2^0). ( I believe the base frequency is around ±240hz)based on this thread: forum.rfduino.com/index.php

    But I've found a way to ramp the PWM frequency up to 62.5 kHz based on this: forum.rfduino.com/index.php

    Unfortunately the RFduinoBLE function interferes with this way of pumping up the frequency (the signal start to jump around as soon as I do RFduinoBLE.begin();. Not exactly sure why but have the feeling it has to do with the interrupts.

    I tried several things but haven't been successful in increasing the frequency in a different way.

    Hope you can help.

    Cheers,

    R.

Reply
  • Hi Mike,

    Have you found a solution to increase the PWM frequency on the RFduino in a way that I can keep on using the analogWrite function?

    I was able to slow it down by increasing the divider, but unable to increase the frequency since it was already set to 1 (2^0). ( I believe the base frequency is around ±240hz)based on this thread: forum.rfduino.com/index.php

    But I've found a way to ramp the PWM frequency up to 62.5 kHz based on this: forum.rfduino.com/index.php

    Unfortunately the RFduinoBLE function interferes with this way of pumping up the frequency (the signal start to jump around as soon as I do RFduinoBLE.begin();. Not exactly sure why but have the feeling it has to do with the interrupts.

    I tried several things but haven't been successful in increasing the frequency in a different way.

    Hope you can help.

    Cheers,

    R.

Children
No Data
Related