well i am a student and cant pay anything ,i have to build a project as assighnment ,i have to build a triac and microchip based voltage stablizer, i have a transformer with 0-150-250 volts loops and a triac drives the 150 loop of transformer ,an optocoupler drives the triac ,its input is 0 to 1 volt dc which will be controlled by pic 16f72 outputpin and another inputpin of 16f72 which is attached with transformer's 250 loop which is also a output of stablizer voltage ,it ia attached through a optocoupler ,when voltage will vary from 150 to 250 then microcontroller and triac will adjust is to 220 volt ,I have done all work with electronics circuit the only missing thing is a programm , the only thing i know is how to blink a led with microcontroller , can someone tell me how to use pwm to build my project ,thanks in advance