I am trying to get 16bit PWM resolution (or at least 12bit) on pin 10(PB6)
For some reason, I am stuck at 9bit. (511=100% duty cycle)
First, I set frequency to 31.25khz
TCCR1B = TCCR1B & 0b11111000 | 0x01;
Then configure the use of ICR1 and set the ICR rollover as 16bit:
TCCR1A = 0b10101010;
ICR1 = 0xFFFF;
- Still, the counter rolls over at 512, - what did I miss ?