hi guys can anyone help me with assembly code for dimming an led with pwm.i have tried reading the datasheet and i have come up with some code but it still doesnt work.

here is the code can anyone please tell me wats wrong with this code

list p=16f88
INCLUDE "p16f88.inc"


_;****Set up the Constants****

STATUS equ 03h
TRISA equ 85h ;Address of the STATUS register
TRISB equ 86h
PORTA equ 05h ;Address of the tristate register for port A
PORTB equ 06h ;Address of Port A
COUNT1 equ 20h ;First counter for our delay loops
COUNT2 equ 21h ;Second counter for our delay loops
ANSEL equ 9Bh
OSCCON equ 8Fh
CCP1CON equ 17h
T2CON equ 12h
TMR2 equ 11h
CCPR1L equ 15h
PR2 equ 92h
PIR1 equ 0Ch
PIE1 equ 8Ch


movlw B'00000000' ; 8Mhz 4Mhz = B'01100000'31.25khz
bsf STATUS, 5
movwf OSCCON
nop
nop
nop
bcf STATUS, 5
movlw b'00111100'
movwf CCP1CON ;Move 00000 onto TRISA – all pins set to output

bsf 03h,5 ;Go to Bank 1
movlw 00h ;Put 00000 into W
movwf TRISA ;Move 00000 onto TRISA – all pins set to output

movlw 00h ;Set the Port B pins
movwf TRISB ;to output. ;Put 00000 into W

movlw 00h
movwf ANSEL ;Move 00000 onto TRISA – all pins set to output

movlw b'11111111'
movwf PR2

bcf 03h,5 ;Come back to Bank 0
movlw b'00001111'
movwf TMR2



Start
movlw b'00001111'
movwf CCPR1L ;Move 00000 onto TRISA – all pins set to output
Loop1
decfsz CCPR1L ;This second loop keeps the LED
goto Loop1 ;turned off long enough for us to goto Start
end