Changing Frequency on Timer 0

Hii all

I have tried with arduino timers using this link for timer 0 and i want to generate 976.5625(prescale 64) on OCR0B and 7812.5(prescale 8 ) How to modify my code any help would be greatly appreciated

Here is my code

pinMode(5, OUTPUT);
    pinMode(6, OUTPUT);
    TCCR0A = _BV(COM0A1) | _BV(COM0B1) | _BV(WGM01) | _BV(WGM00);
    TCCR0B = _BV(CS01);
    OCR0A = 180;
    OCR0B = 180;


You cannot have multiple frequencies on a single timer, plus timer 0 usually affects millis() if I remember correctly.


Yes timer0 is what drives millis(), delay(), and micros(). Each timer on the Uno controls
two PWM pins and the prescale is common to both pins as its a single timer.

timer0 5, 6
timer1 9, 10
timer2 11, 3