3 PWM for 3 phase inventer

antz975:
The wave you are trying to simulate for each phase should look like this.

The outputs you have (assuming the code is right) will generate a wave like this

to get the voltage to switch from positive to negative you need to switch a separate output.
So for each phase is divided into two halves, each halve controlled by one output. the first output is being used for the first half, and the second for the second half of each cycle.
I'm fairly new to writing code, but I thing this should be achievable by using a for loop.

You are in fault
Because we need a 3phase signal and it doesn't matter the voltages
the IGBT drivers invert it to real 3phase signal by low and high side switching
So if you can make 3phase by mcu you can make the V.F.I inverter and can control the 3phase motors in three mode
By voltage
By frequency
By current