Didn't put all the information. The formula above calculates the input frequency to the pwm unit. which for 12MHz is 6MHz = fOSC / 2 / (prescaler data value + 1) from this we can calculate fPWM8 which is our output pwm. fPWM8 = (fOSC / prescaler0) / (2 x 256) we cannot use 0 or 0xFF as these will give us a permanent high or low. the actual maximum frequency is obtained from a prescaler0 of 1 so maximum frequency is 23437.5Hz for 12MHz clock. Regards sjo