Yes, remove power from the PIC

Once you start a pwm software based pwm, it will complete before it moves on.