' {$STAMP BS2}
' {$PBASIC 2.5}

LEDs  VAR OUTL ' on P0 - P7
counter VAR Byte

Reset:
DIRL = %11111111 ' make P0 - P7 outputs·

Main:
 FOR counter = 0 TO 15
   LEDs = counter
    PAUSE 1000
 NEXT
 GOTO Main