Good day to all of you in the forum,
I wrote this simple program that would sweep the duty cycle of a 10 Khz frequency PWM on PIC18F252.
I found that the duty monitored by a scope is updated every 4 secs instead of 1 sec as wrote in the Basic program.

DUTY VAR word
TRISC.2 = 0

Main:

FOR DUTY=260 TO 325

CCPR1L = duty>>2

ccp1con.bit4=duty.bit0
ccp1con.bit5=duty.bit1

PR2 = 200 ' Set PWM Period
CCP1CON = %00001100 ' Select PWM Mode
T2CON = %00000101 ' Timer2 = ON + 1:4 prescale ( about 10 KHz )

debug dec duty, 13 ,10
pause 1000 ' change duty every one sec.

next duty
goto main

I need a duty to be changed every one sec: is there any help on the matter ?
What am I doing wrong ?
Thanks for any assistance
regards,
Ambrogio