PWM Resolution

It shows how many separate steps the duty ratio can be divided into and is given in bits: 8 bits means 256 steps, 10 bits means 1024 steps. At the same counter clock, the resolution falls as you raise the switching frequency; these two quantities are gained at each other's expense.

PWM hardware consists of a counter running at a fixed rate and a compare value. The longer the period, the more steps the counter can count. If you generate 20 kHz PWM with a 16 MHz counter clock you get 800 steps per period, that is roughly 9,6 bits of resolution. If you go up to 100 kHz with the same clock, only 160 steps, roughly 7,3 bits, remain.

The practical meaning of resolution is the smallest step in the speed setting. With an 8 bit step you can fine-tune by about 0,4 percent of the speed, and with 10 bits by about 0,1 percent. For coarse positioning and on–off applications 8 bits is more than enough; in lifting or tracking applications that need precise and slow movement, a higher resolution makes a difference.

On the user side this value is not directly visible but its result is felt: the speed jumping in steps as you turn the potentiometer usually comes not from the pot itself but from low PWM resolution or low ADC resolution.

Knowledge Center