Hi all,
I want to develop a power inverter (50Hz linear) using only one PIC microcontroller. Earlier I had done so using discrete parts(SG3525, comparators, opamps, etc). Now I want to make my circuit smaller, ie, instead of using SO MANY discrete parts, I would like to use a PIC. I have in mind a 16F72, 16F873A, 18F252. I tried to use hardware PWM (with 16F684 - ECCP in half bridge mode). It worked fine at fixed duty cycle but I am having problems in adjusting output voltage (feedback): When I change the value in CCPR1L to control duty cycle, the output is no longer symmetrical: ie, if I choose 30% duty cycle, I would want ouput1 to be on for 3ms and off for 7ms and the same for output2. But what happens is during the 7ms period when output1 is low, output2 is high during that time.
So can you please help in this?
Should I use software PWM or hardware?
After this part, I will also include different sensing parts, such as overload, battery discharge, battery charging current, switchover, mains detection, etc. But first I need to complete this part.
Thanks for the help.

P.S. I don't use PICBASIC PRO but mikroBASIC and MPLAB (Assembly).