pwm control for computer fans

I found the following post:

I was a little unclear on the outcome. Can the arduino output a 25khz PWM signal from 0 to 100% duty cycle? One of the responses to the question in that link mentioned that the resolution would not be very good.

Here is the pwm spec again:

PWM Frequency: Target frequency 25 kHz, acceptable operational range 21 kHz to 28 kHz Maximum voltage for logic low: VIL = 0.8 V Absolute maximum current sourced: Imax = 5 mA (short circuit current) Absolute maximum voltage level: VMax = 5.25 V (open circuit voltage)

Yes, it can. You can use Timer 1 in Fast PWM mode and set its upper count limit (the ICR1 register) to 639 (16 MHz / (639+1) = 25 kHz). Then the duty cycle is controllable with a resolution of 1/640 = 0.16% increments. The output will be available on pin D9 or D10 (OCR1A or OCR1B).

-- The Ruggeduino: compatible with Arduino UNO, 24V operation, all I/O's fused and protected

Great. Thanks

You can do it on Attiny85's too, I have 25.5khz output on two pins (separate duty cycles too) at the moment.