How many pwm channel that you need ? If you need two channel you can use pic16f877A 's cpp modules. If you need more than 2 than you need to use timer to create pwm channels but you have to write the codes carefully otherwise your pwm frequceny will not be stable.