PWM high frequency

Hi guys!

Since the max frequency of the analogWrite() function is 490 (980) Hz I wanted to ask for the best method to increase it. I read about some different approaches and I am not sure which one is the smartest. I need a frequency of at least 20kHz, while still being able to change the duty cycle and frequency.

Any answer is appreciated. :slight_smile:

How about some links to the different approaches? It could save some time.

The search pulled up a few items for the frequency you wanted but this one sounds promising

See the magnifying glass icon at the top of the screen ?
Yep the one right at the top that says "Search"

:grin: