Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

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--);
}
 

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

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top