Quote Originally Posted by Acetronics
DEFINE OSCCAL_1K 1

ADCON0 = 0
ANSEL = 0

' Define YOUR I/Os Here !!! TRISIO = % ?????1
The define OSCCAL have nothing usefull to do there
Same for ADCON0 as it's the POR default.. but i agree could be safer

Add CMCON=7 as it's a 12F675 and it have internal comparator multiplexed with GP.0

Quote Originally Posted by Malc-C
Main:
for i = 1 to 254
Pwm GPIO.0,i,1
if i=253 then goto down
next i
Bad programming method IMHO, i always prefer to validate the Loop condition before getout and if usefull, set a flag wich say i interrupt the loop... something like
Code:
Main:
for i = 1 to 254                                             
    Pwm GPIO.0,i,1
    if i=253 then 
        i=254
        GetOut=1
        endif
   next i

if Getout then DoSomething
In your case, the main problem is most the analog stuff