Hi Dave,
Two things.... First as you figured out and as Alain also pointed out you will need an END after the loop or the PIC will wonder off to never never land eventually starting over (I think). Second, you need another PAUSE in there or you will not see the LED blink. It will get turned on then 500ms later it will get turned off and then on again almost instantly as the loop goes back to the beginning. I guess that's what you were trying with the PAUSE right after Main but remeber that the loop starts over at the FOR statement.Code:Main: pause 500 'pause 500 mili-secs For i = 1 to 3 ' loop count variable (value i) also number of times to loop. LOOKUP i, [ 223, 223, 223] ,GPIO '223 = %11011111 D0 switches on (GPIO.4) Pause 500 'pause 500 mili-secs LOW GPIO.4 ' DO switches off Pause 500 Next i END




Bookmarks