The code below shows two pwm signals. Pin5 gives the original signal and Pin6 gives the inverted signal, which means that the signals are behaving in anti-parallel manor. The PWM frequency equals to 7.8 Khz. How can I increase it up to 10 Khz and keep both signals behaving in the same way. I tried to play with the prescaller but I could not get the desired frequency. Thanks alot guys.
//=====setting of timer0 for fast PWM method====
//frequency PWM is fosc/(8*256) (by 16MHz oscil. = 7812,5)
//timer 0, 8-bit timer, pins 5,6(+) 128us
TCCR0A=0b10110011; // generate inverted PWM signals in output
TCCR0B=0b00000010; // set of source of clock signal + prescaller
TCCR0A = TCCR0A ^ 0b01010000;
//setting of PWM ports 5 and 6 to output (one is inverted - frequency is the same all the time)