Home / Peripherals / LEDC PWM

ESP32 LEDC PWM Guide: Channels, Frequency vs Resolution Trade-off

The ESP32 LEDC offers 16 PWM channels. Frequency and resolution trade off against each other — here is the maths and recommended values.

Channel count

The original ESP32's LEDC provides 16 PWM channels (8 high-speed + 8 low-speed) across four timer groups. Channels in the same group share frequency and resolution; groups are independent. That constraint catches a lot of people out.

Frequency vs resolution

The core formula:

actual frequency = 80 MHz / ( divider × 2 ^ resolution_bits )

So higher frequency means lower resolution. With the divider at 1, the theoretical ceilings are:

ResolutionDuty stepsMax frequencyGood for
8-bit256312.5 kHzSwitching supplies, fast dimming
10-bit102478.1 kHzFlicker-free LED dimming
12-bit409619.5 kHzServos, fine dimming
13-bit81929.8 kHzMotor drives
20-bit1,048,57676.3 HzVery slow, very fine control
Need low frequency and high resolution? Increase the divider. A 50 Hz servo with a large divider and 12-bit resolution is perfectly fine — you do not have to drop to 8 bits.

Recommended settings

Notes

Data verified:2026-10-20 · Cross-checked against Espressif documentation. Anything that varies between chips or ESP-IDF releases is marked rather than guessed. Official peripheral docs →

Related