I'm playing around with the PWM frequency on my mega.
I have written a test program and I can see on my DSO scope that the PWM frequency changes when I change the prescaler.
However on prescaler 6 I get a flat line and no pulses.
Serial.println("on a mega with prescaler 6 on pin 2 does not generate a pulse");
int prescaler=6; //Works with 1,2,3,4,5 but not with 6
TCCR3B &= ~myEraser; // this operation (AND plus NOT), set the three bits in TCCR2B to 0
TCCR3B |= prescaler; //this operation (OR), replaces the last three bits in TCCR2B with our new value 011
//take your time to look at the scope
I only have a DSO nano scope but I would expect to be able to see the <20 hz signal.
Anyone knows what is going on here?