/***** SINGLE PHASE INVERTER *****/
/***** uC Series : PIC16F72 *****/
/***** Prog Lang : Hi-tech C *****/
/***** IDE : MPLAB *****/
/***** *****/
#include<pic.h>
unsigned int set=600, i, ON=250, OFF=5; // FOR CHANGE THE FREQ CHANGE "ON" VALUE
void mc_init();
void delay(unsigned long);
void main()
{
mc_init();
delay(500);
do
{
RB0=0;
RB1=1;
delay(ON); // +VE PULSE
RB0=RB1=0;
delay(OFF); // DEAD TIME - ALL SW OFF
RB1=0;
RB0=1;
delay(ON); // -VE PULSE
RB0=RB1=0;
delay(OFF); // DEAD TIME - ALL SW OFF
}while(1);
}
void mc_init()
{
TRISA=0x0F;
TRISB=0x00;
TRISC=0x00;
PORTA=0X0F;
PORTB=0X00;
PORTC=0X00;
}
void delay(unsigned long del_del)
{
while(del_del--);
}