I am doing a project about controlling a motor whose power supplied by a inverter.

The inverter is drived by Sinusoidal PWM waveform generated by PIC16F877.
I don't know how to connect the pins for PWM output. It's a 2 phase inverter with 4 mosfets.

I try to use look-up table to generate but difficult to control the frequency.
Could you provide me with the answers?

Thanks a lot