I am getting a wierd compile error on my PICBASICPRO program in which I am using a loop on a label named "loop:". It also indicates a sytax error on the GOTO statement at the end of the loop. I don't understand why since the word loop is not a reserved word or a PICBASIC coding statement. Can anyone tell me why this would be happening. Here is the code excerpt where this is happening.
Code:
loop:
I2CREAD PORTC.4,PORTC.3,$E0,0,[srfver] ' Read version number from srf02
SEROUT PORTC.1,2,[1,"Software v: ",#srfver,13] ' Put it on the screen
I2CWRITE PORTC.4,PORTC.3,$E0,0,[81] ' Request start of ranging
pause 100 ' Wait for ranging to finish
I2CREAD PORTC.4,PORTC.3,$E0,2,[b1,b0] ' Get the ranging results
SEROUT PORTC.1,2,["Range: ",#w0," "] ' Display range data to the screen
PAUSE 100
GOTO loop
Bookmarks