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...
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...