My goal is to set the highest possible frequency of phase-correct PWM on pins 9, 10, 11 on an Arduino MICRO.
The following line fails to compile:
TCCR2B = _BV(CS00); // change the PWM frequencey to 31.25 kHz - pins 3 & 11 timer 2
The error message is:
error: ‘TCCR2B’ was not declared in this scope
There is no error if I try to set TCCR0B, TCCR1B, TCCR3B, TCCR4B, but 2,5,6,7,8,9 all produce the undefined error.
I have no idea what I am doing here, but my code worked perfectly on the Arduino Uno.
Any ideas or pointers of where to look would be great !
I am only trying to max out the PWM rates for phase-correct PWM on any 3 pins, they do not have to be pins 9,10,11. Those were the easiest to use on the UNO, but perhaps that is not the case on the Micro (or Leonardo) since they use the same CPU.
Any help would be great!