Using Arduino Mega 2560 to control fan speed

I am looking to control a dc fan's speed. However, all my pwm pins have been used up and i don't really want to use another arduino board. Maybe i ask if it is possible? I tried searching on the internet but to no avail.


If you can work with a lower frequency than hardware PWM then you could consider software PWM. Otherwise you could add some external hardware to give you more PWM outputs. If you tell us what you're using all those PWM pins for we might be able to provide better help.

Why do you need to use PWM pins for TFTLCD?

I'm not familiar with whether software PWM is appropriate for your application, I've only used it with LEDs.