Hi,

I never use pullups ...

you should try to add external resistors ... even on the sim' ...

you also should avoid PWM command for such uses ... this outputs an awful garbage ( just usable with a RC filter to make a basic D/A converter. )

as you have written the program ...

it is easy to do it like that :

Code:
 for mypwm = 1000 to 0 step -1
        High LAMP
        PAUSEUS myPWM,
        LOW Lamp
        PAUSEUS (1000 -myPWM)
Next myPWM
note PAUSEUS has a minimum duration ... but it is not a problem here !!!

Alain