BASIC stamp manual v2.2

5: BASIC Stamp Command Reference – SHIFTOUT
BASIC Stamp Syntax and Reference Manual 2.2 www.parallax.com Page 439
' msb first so that the msb appears on pin QH and the lsb on QA. Changing
' MSBFIRST to LSBFIRST causes the data to appear backwards on the outputs.
Main:
DO
SHIFTOUT Dpin, Clk, MSBFIRST, [counter] ' send the bits
PULSOUT Latch, 1 ' transfer to outputs
PAUSE 100 ' Wait 0.1 seconds
counter = counter + 1 ' increment counter
LOOP
END