PWM with atmega16 help !!

Hello , Im building a circuit transform 12vdc to 220vac using pwm in atmega16 to create a sinewave on the output but the problem is that the the output gives a strange wave so i guess that my code is wrong .
Note : Im using winavr and i chose PORTB and fast PWM .
I post a pdf file about my circuit and the code .
Please i really need help and thank you very much .