Changing PWM freq

Hi everyone. running a nano with pwm freq set to 31khz (i think it is) on pins 9 and 10 to run some fans. I also need pin 8 at a higher freq but i dont know how to do it.
below is the code im using for pin 9 and 10. any help would be much apprecited. Thank you.

//chnages PWM frequency to eliminate fan noise - pins D9 and D10 - 31.4kHz
  TCCR1A = 0b00000001; // 8bit
  TCCR1B = 0b00000001; // x1 phase correct

Pin 8 on Nano is not a PWM pin.

derrrr lol my bad.
make it pin 11 then

change again to pin 6

In this tutorial there is a table of all options for setting PWM frequencies for Atmega328. Please note that different timers need to be configured for different pins.

yep. great read. Thankyou!!!!

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.