2 issues with this method. First, while the signals may appear to be 180 degrees out-of-phase , this appears to be true only at very low frequencies. Try this at a higher frequency - say 10kHZ up and you will see that the complementary phase will be more than 180 degrees out (due to the processing time of the "splitphase" loop). The higher the frequency, the more pronounced this effect will be.
Second, while the code is running, the processor cannot be doing anything else.
A better solution would be to use a PIC with an ECCP (Enhanced Compare Capture) module. Many of the newer PIC's have this feature. Set it up to operate in Half-Bridge mode and you will get a PWM signal on the P1A pin and a complementary signal on P1B. Plus you can control the programmable dead-band delay which is used to prevent shoot-through current in half-bridge devices.





Bookmarks