Hi,
As you mentioned you need a pulse does that mean you need to modulate your hardware PWM. If the criteria is limited to a pulse only then you may not need the Hardware PWM cause depending on the PWM frequency and duty cycle your PIC would be throwing a series of pulses while you start or stop your PWM.
One approach could be :
1. Measure the width (time period) of your input sinewave using a 16 bit timer
2. Using the same timer in the next cycle (or consecutive cycle) to run upto half the value captured and fire an ouput (using the CCP module compare feature)
3. Using the sine zero cross on an External INT to deal with the pulse output you need.
Bookmarks