Arduino Micro Timers

Hello guys,

i build a custom fan controller for my computer using arduino micro.The fan's are controlled by the analog pins using pwm duty cyle. At default frequency i noticed coil wine simular noise, caused by the fans. So i adjust frequency to max:

TCCR1B = TCCR1B & B11111000 | B00000001; //PWM frequency of 31372.55 Hz for pin 10 & 11.
TCCR0B = TCCR0B & B11111000 | B00000001; //PWM frequency of 62500 Hz for pin 3 & 9.

Now the coil wine is gone, but i had to take the disadvantage that the time methods are not working properly. So i thought i can fix the problem multiplay all by 64, but some libraries are still not working. The problem is i need this function and libs.

My problem is, that there is very less infomation about timers on micro. I noticed that there are still two other timers. TCCR3B and TCCR4B. When i developed the project, i wanted to use TCCR2B. Then i noticed that atmega32u4 doesn't has timer2 any way so i used timer0.

I need some information about which pins are controlled by which timer and what frequencys are possible. I cannot find that infomation anywere. In datasheet for atmega32u4 i can't find useful information.
My plan is to use maybe timer3 or 4 pins to solve the problem.

Can someone help me?

Thanks you.

Tederean:
Then i noticed that atmega32u4 doesn't has timer2 any way so i used timer0.

Isn't Timer0 used by the Arduino system for millis() and such. Why not use Timer3 or Timer4.

I need some information about which pins are controlled by which timer and what frequencys are possible. I cannot find that infomation anywere. In datasheet for atmega32u4 i can't find useful information.

All the data about pins is in my copy of the datasheet - Diagram 14.1 for example.

...R

Why not use Timer3 or Timer4.

Because i don't know the pins they are connetced to. That's my question. :slight_smile:

All the data about pins is in my copy of the datasheet

Were did i find your datasheet?

Ted

Tederean:
Were did i find your datasheet?

With Google on Atmel's website

Probably the same place you got yours.

...R