11 years, 4 months ago.

what is the maximum frequency of the PWM output in LPC1768?

what is the maximum frequency of the PWM output in LPC1768?

Question relating to:

1 Answer

11 years, 4 months ago.

The minimum used timestep for the normal mbed PWM is afaik 1us. So you cant put your high/low time smaller than 1us. This sets the maximum frequency at 500kHz, although then you are just making a square wave, no PWM'ing possible. So lets say you got 10kHz PWM, then you can change your high-time in steps of 1us still, so dutycycle in steps of 1%.

The hardware can do better than that, it is a software limitation. If you import http://mbed.org/users/Sissors/code/FastPWM/ into your project you can use the full capabilities of the LPC1768. This is the same as the previous part, only now instead of steps of 1us, the steps you can make are 1/96th us. Which means a maximum output frequency of 48MHz, at 50% dutycycle only.