Timer Attiny2313


Using the following code I am trying to set a 40khz timer:

TCCR0A = _BV(COM0A0) | _BV(COM0B1) | _BV(WGM01) | _BV(WGM00);
    TCCR0B = _BV(WGM02) | _BV(CS00);
    OCR0A = 199;
    OCR0B = 100;

Only the output is just 5kHz... (using attiny2313 @ 8MHz)

Can somebody help me with it?

Thanks Tom

Whoops, I guess I was still sleeping. It was as easy as editing the OCR0A and OCR0B registers.