Hi,
What exactly do you mean with SPWM? What does the S mean?

If you're generating the PWM signal with CCP-module you'll need 3 CCP-modules to generate three individual PWM signals. As have already been suggested ditch the '877 and take a look at the 18F2431/4431 which is designed for motor control providing deadtime control and dedicated hardware fault inputs to disable the PWM signals - and more.

If you need to stick to a 16 series PIC then use the parametric search tool at Microchips website to look up a PIC with three CCP-modules, perhaps the 16F777.

I just looked briefly at the app-note you reference and they seem to be using a low-pass filter to get a "true" sine-wave output, to do that they calculated/estimated that at least 10PWM cycles is needed to bring the output voltage to the desired value.

How many "steps" do you want, per period? Let's say you have a lookup table of 32 'steps'. Ie it takes 32 "updates" to create one full cycle of the sinewave, so at 50Hz you need to change the PWM dutycycle 50*32=1600 times per second, which means that you'll get atleast three full PWM cycles for each "step" with a 5kHz PWM frequency, I think that'll work.

/Henrik.