First code:
You don't need the GOTO Off... it will jump there anyway
Second code:
Wait and Off are reserved word, so you need to change them
Code:GOTO Wait_Again '******* not needed Wait_Again: 'waits for low signalCode:Wait: 'wait for high signal INPUT PORTA.0 '***** this one you don't need it as it's ' already defined aboveanother methodCode:Wait_Again: 'waits for low signal INPUT PORTA.0 '******* same thing here
Code:'---------- SIDE TWO PICS' CODE X VAR BYTE ADCON1 = 7 'sets all as digital PORTB = 0 'clears all port pins PORTC = 0 TRISB = 0 'sets all as outputs TRISC = 0 TRISA.0 = 1 'set as input Start: While PORTA.0=0 : Wend ' wait 'till PORTA.0=1 FOR X = 0 TO 15 HIGH X PAUSE 200 NEXT X While PORTA.0=1 : Wend 'waits for low signal FOR X = 0 to 15 LOW X PAUSE 200 NEXT X goto start




Bookmarks