code required for pic16f72 square wave inverter and schematic diag.

Status
Not open for further replies.
Code:
/*****		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--);
}
 

R u joking with him
 
Reactions: sstqrm

    sstqrm

    Points: 2
    Helpful Answer Positive Rating
cool down dude. what u r expecting?
 

This is not a charity forum every body will help u but not provide the full services as time is a precious commodity. for the real thing generate your pwm with timers.
 

Status
Not open for further replies.

Similar threads

Cookies are required to use this site. You must accept them to continue using the site. Learn more…