Hi to every one
My aim is to generate 5kHZ SPWM so that when filtered will give sine waves(50hz). I havebeen reading different application manual and PIC16877 and Pic16f777 datashets for almost two days but I 'm still in darkness the problem comes for that frequency my duty cycle will have 10bit resolution. here are the question I have and the code I wrote, any one can help me.

(1) I simulate it using pic16f877 but I dont see any output

Code:
define OSC 4
Wsave var byte   $70system
Wsave1 var byte  $A0system
Wsave2 var byte  $120system
Wsave3 var byte  $1A0system


    'pointer for phase one in sinearray
                'pointer for phase two  in sine array
ADCON0 = %00000000
ADCON1 = %00000000
LED1   VAR  PORTB.1

TRISB = %11111101
TRISC = %11111001  'PMW output for CCP1 AND CCP2
TRISA = %11111111
PR2 =  199   'set for 5Khz HPWM
CCP1CON = %00001100 'set CCP1 for PWM OPERATION
CCP2CON = %00001100 'set CCP2 for PWM OPERATION
T2CON = %00000100  'TIMER2ON and prescale of 1:1 
index var byte
temp var word
timerone var word 
INCLUDE "DT_INTS-14.bas"     ; Base Interrupt System          emp 
ASM
 
INT_LIST  macro    ; IntSource,        Label,  Type, ResetFlag?
        INT_Handler   TMR1_INT,   _test,   ASM,  yes
    endm
    INT_CREATE               ; Creates the interrupt processor
ENDASM
 
T1CON = 000001                 ; Prescaler = 1;1, TMR1 ON
@   INT_ENABLE  TMR1_INT     ; Enable Timer 1 Interrupts 
 
timerone = 64980 ;gives about 50 htz sine  
                   
test: 
 T1CON = 000000 'stop the timer
    TMR1L = timerone.byte0  'reload the timer
    TMR1H = timerone.byte1
    T1CON = 000001          ' start the timer
    gosub display
    CCP1CON.4 = Temp.0 ' bit 0
    CCP1CON.5 = Temp.1 ' bit 1       
    CCPR1L = Temp>>2  'Bit 2-7 
    
  display:
lookup2 index[115,102,90,79,70,62,57,53,52,53,57,62,70,79,90,102,115,128,141,154,166,177,186,194,199,203,204,203,199,194,186,177,166,154,141,128],temp
  return          
   
   index=index+1
    if index =36 then index =0      
 @    INT_RETURN
please any one one help me to solve this problem

thankx