ADRES is already defined in the P18F252.inc file. Change this to something else.
Your IF/THEN/ELSE has Completegood without a GOTO or GOSUB before it.
Completegood has a REPEAT with no UNTIL, no RETURN (or goto somewhere else), and END after it.
Start falls right through to One, which has a RETURN. If you want it to loop back to Start, place a goto Start at the end of Start.
This should have a GOSUB before Optogood;You have a few goto BLEDG that need to be gosub BLEDG, etc.Code:If Optopin = 1 then GOSUB Optogood endif
REPEAT must have an UNTIL to end it. Always GOSUB any routine that RETURNs, and for multiple IF/THEN/ELSE place your goto or gosub on the line after the THEN. IF Optopin = 1 THEN Optogood would work, but when you place Optogood on a line by itself, the compiler sees this as a lable. Not an instruction telling it to jump to Optogood.
Just go slowly through your code line-by-line. You'll see the errors.




Bookmarks