PWM converter, need help

Nice to see it worked out for you. Don't hesitate to ask if something in the sketch you do not understand.
I recommend you remove the | 1 << TOIE1 as it caused some surprise to me, that I do not understand yet.