I need help compiling!

Status
Not open for further replies.

pike

Member
Hey guys, i'm a newb to microcontrollers and i'm having trouble trying to get PICbasic plus to compile this code, and i'm using a 16f84A for this begginers project. the code is supposed to count in binary and display the number as a series of leds:

Symbol TRISB = 144
Symbol PORTB = 6
Poke Trisb, 0
loop:
b0 = 1
b1 = 0
poke portb, b0
pause 250
for b2 = 0 to 6
b1 = b0 * 2
b0 = b1
poke portb, b0
pause 250
next b2
goto loop
end

Whenever i try to compile the file it come up with the error*** Misplaced or Incorrect 'NEXT' command! *** and won't allow me to compile it fully.

What am i doing wrong? :? Thanx in advance
 
Status
Not open for further replies.
Cookies are required to use this site. You must accept them to continue using the site. Learn more…