a sine wave is applied at a0 using a diode,so that it geets rectified and then after pwm the square obatIned is only with wrt positive cycle ,i need to generate pwm even during negative cycle and one way is to do it by full bridge rectifier .so is there any way by arduino coding i could get it