Timers & interrupts PWM

Hi, I’m trying to set the PWM frequency to be above human hearing (ie 24-25Khz), which I’ve observed in the past also enables the fan to operate at a lower value in the 10% region that otherwise causes it to stall.

If the PWM mode (ie 1’s set on compare match, instead of 2’s clear on compare match) is the issue, I could try switching to PWM2… ?

peekay,

Did you get a chance to finish the PWM library for the Photon? I am in need of setting a custom PWM frequency but I cannot find any good examples to follow. I am new to Photon, but I have done Arduino for many years.

Thanks
Jason

1 Like

Does anyone have an example on how to use a custom PWM with the Photon?

Hi,
I wasn’t able to satisfactorily get the custom PWM working, how did you go?

My problem I observed was changing the timer interval and range and the range was still expecting 0-255.