Change the Sine wave frequency

Hello Mike thanlks for your tipp with the size/3. I already modified it

So I figured out that I can change the amplitude of my sine wave if i devide one of those 3 lines through a factor

/* Overlay a sine wave array to a  PWM signal */
				/* each output signal is 120 degree phase shifted to the other one */
				ul_duty1 = sine[ul_count/100%size];              // 1st sine wave output 0 degree phase shift
				ul_duty2 = sine[(ul_count/100+(size_3)) %size]; // 2nd sine wave output 120 degree phase shift
				ul_duty3 = sine[(ul_count/100+(2*size_3/3))%size];// 3rd sine wave output 240  degree phase shift

e.g if i divide ul_duty1 = sine[ul_count/100%size]; // 1st sine wave output 0 degree phase shift through 2
I will get the half of the max amplitude. So I think I still on the right way devolping my H brdige 3 phase driver
but I still need the phase which is called (omega). Omega is the angle which tells you in which rotating sector your motor lies.
Actually I need to tell my software now..e.g sine wave Nr 1 should have e.g. 30 degree omega

can I link the two somehow together ? I think with this code it couldnt work or ?

The last modifiucations on my code are attached to this thread
thanks in advance

Main.c (10.3 KB)