what is the maximum and minimum PWM frequency i can obtain in arduino DUE board?

Hi ,

I need to know how to calculate the minimum and maximum PWM frequency possible in arduino due microcontroller??


Pon :)

It's complicated. If you stay within the Arduino firmware, you don't get much choice. If you go beyond the Arduino firmware, you have to take into account things like some of the PWM pins being controlled by TIMER peripherals, and some are controlled by the PWM peripheral. And that you can trade off less resolution for higher frequency. It becomes a matter of reading the (long and complicated) Sam3x datasheet.

It looks as though the maximum clock into the PWM controller the the same as the system clock (84MHz?), and the minimum is that divided by 1024, and divided again by 255 (~320 Hz?) Assuming you'd want the full 256 steps, you'd divide that by 256 to get the "PWM frequency." So somewhere from about 1Hz to about 320kHz ? (The period looks like it's arbitrary, and up to 24 bits, so you can tune the frequency rather finely.) (it looks like you could get some REALLY LOW frequencies out of it. like 1 cycle per 14 hours?!!)