Actually I did not deal with motor sin generation , but from programming point of view you can :
a. Calculate sin output for full period (actually just quarter is enough ) in form of integers . Number of entries size will be dependent on resolution you choose . Number of entries is also defines PWM port
update freq which is equal to WorkingFreq*NoOfEntries
b. Then divide number of entries in this table by 3 . Let say its name - offset.
c. The use following values as initial offset to this table :
0, offset , 2*offset .
d. Use these values as index to the sin table to make output to the PWM port
d. Every time you need to output new value increment the initial offsets by one ,
e. Do not forget to wrap around when tale end is reached .
You can also use logic divider with parallel loading to replace PWM port if it is not available or you can use DAC or simple weighting resistor R-2R matrix without logic divider to generate analog sin signal- but parallel ports will be neded .