So why not go a stage further...
Chose a PIC that not only has Hardware PWM, but also a Hardware Comparator (eg 16F628) with dedicated output. Cross Connect the HPWM to one Comparator Input. The 2nd Comparator Input is cross connected to the PIC pin of your choice. This pin now ANDs (modulates) the Comparator (PWM Carrier) output. Not much need to bit-bang anything... and almost no software overhead...
Life is simple (or at least it can be)...




Bookmarks