Min menu

Pages

project 16:Pure sine wave inverter circuit diagram working

Pure sine wave inverter circuit diagram working



Pure sine wave inverter circuit SPWM 

The code given below is written in Mikro C. Although everything is clear in code, but if you still have any issue feel free to ask me by comment on this post.
const unsigned char SinLkUpTab[50]= {0, 8, 16, 24, 31, 39, 47, 55, 62, 70, 77, 85, 92, 99,
106, 113, 120, 127, 134, 141, 147, 153, 159, 165, 171, 177, 182, 188, 193, 198, 202, 207,
211, 215, 219, 223, 226, 229, 232, 235, 238, 240, 242, 244, 246, 247, 248, 249, 250, 250};
unsigned short cnt,inc,dec,sqinc,cnt1;
void interrupt()
{
if (dec==0)
{cnt++;
PWM1_Set_Duty(SinLkUpTab[cnt]);
}
else if (dec==1)
{cnt–;
PWM1_Set_Duty(SinLkUpTab[cnt]);
}
TMR1IF_bit = 0; // clear TMR0IF
TMR1H = 0xFF; // Initialize Timer1 register
TMR1L = 0x76;
}
void main()
{
TRISB = 0; // designate PORTB pins as output
PORTC = 0; // set PORTC to 0
PORTB = 0; // set PORTC to 0
TRISC = 0; // designate PORTC pins as output
TRISA = 0; // designate PORTB pins as output
PORTA = 0; // set PORTC to 0
T1CON= 0b00000001; // Timer1 settings
TMR1IF_bit = 0; // clear TMR1IF
TMR1H = 0xFF; // Initialize Timer1 register
TMR1L = 0x76;
TMR1IE_bit = 1; // enable Timer1 interrupT
cnt = 0; // initialize cnt
*** Note: This is not a complete code
you can purchase complete code from me just in 40$. if you want to purchase complete code of pure sine wave inverter contact me at [email protected] If you need three phase sine wave inverter code you can also contact me.
[button-green url=”http://store.microcontrollerslab.com/product/pure-sine-wave-inverter-code-and-circuit-diagram/” target=”_self” position=””]Buy code in 40$[/button-green]
reaction: