Hi, Malc

Try this ... and do not forget I/Os and clock defining ...

DEFINE OSCCAL_1K 1

ADCON0 = 0
ANSEL = 0

' Define YOUR I/Os Here !!! TRISIO = % ?????1

led var GPIO.0

i var byte

up:
For i = 1 to 254
Pwm GPIO.0,i,1
next i

for i = 254 to 1 step-1
pwm GPIO.0,i,1
next i

GOTO up

END

Alain