Controlling a single servo using PWM and Timer 1

In the project/library i am building Timer0 is taken by the Arduino functions like delay and Timer2 is used to control my stepper motors. Timer2 is also used by the stepper library, so can not use it because it conflicts with the stepper motor library i wrote. I only need to control one stepper motor, and using PWM is more efficient.

And most importantly, you learn by writing the code yourself !

I am trying to understand why i am getting the (strange) period and pulse length.

When setting the OC1A on compare match (TCCR1A |= (1 << COM1A1) | (1 << COM1A0) ;) instead of clearing i do get exact the same pulse, but inversed.