How i can Get between 20khz-25khz pwm frequency

Hi,

I'm trying to get a specific frequency in my Arduino Nano A328

I'm i already using timer0, pin 5, but my mosfet is so hot, with a low load, he just "burn" whem i using 50% of duty, when load is 100%, the mosfet is normal, now i using IRFZ44N, i think in the problem is on Ton Toff, is so fast for the mosfet...

If anyone have idea, please, help

TCCR0B = TCCR0B & 0b11111000 | 0x01;

This will generate a 25kHz PWM signal with 80 steps of resolution. This uses Timer2. http://forum.arduino.cc/index.php?topic=155089.msg1176136#msg1176136 Further down the page you can see how I measured the RPM of the 4-wire PC fan.

It's not clear why do you need 20- 25 kHz frequency, but as it's pretty high and AFAIK your MOSFET isn't logic level, the problem may be not in Ton/off , rather arduino's poor capability to drive such MOSFET. Option is TC426, TC4424/4427/4428 special MOSFET driver or in minimum configuration at least NPN transistor

20khz-25khz pwm frequency + MOSFET for what type application?