Mega2650 - No PWM output from OC1C (Digital Pin 13)

That pin is controlled also by OC0A, the arduino runtime only knows about that one. So the call

analogWrite (PWM, 100)

Simply enables timer0 to drive that pin, throwing away all your setup for timer1...

1 Like