LED on/off

This line produces PWM sine to PBA 7,

No it doesn't.

Please remember to use code tags when posting code