5: BASIC Stamp Command Reference – POLLMODE
BASIC Stamp Programming Manual 2.0c
•
www.parallaxinc.com
•
Page 223
pin 0, but the polled-run activity is disabled and the BASIC Stamp
endlessly runs the code in program 2's Loop routine.
Demo Program (POLINOUT.bsp)
' This program demonstrates the POLLIN, POLLOUT and POLLMODE commands. It
' will watch for a high signal on I/O pin 0 and then will output the opposite signal on I/O pin 1
' all while printing a message on the PC screen.
'{$STAMP BS2p} 'STAMP directive (specifies a BS2p)
Init:
POLLIN 0, 1 'Set I/O pin 0 to polled-input looking for a high
POLLOUT 1, 0 'Set I/O pin 1 to polled-output; opposite level a 0
POLLMODE 2 'Set mode to enable polled-outputs
Main:
DEBUG "Working...", BIN1 OUT2, CR 'Waste time writing to PC screen
PAUSE 100
GOTO Main
p
2
Summary of Contents for BASIC Stamp 2e
Page 1: ...BASIC Stamp Programming Manual Version 2 0c...
Page 34: ...Quick Start Guide Page 32 BASIC Stamp Programming Manual 2 0b www parallaxinc com...
Page 340: ...ASCII Chart Page 338 BASIC Stamp Programming Manual 2 0b www parallaxinc com...
Page 342: ...Reserved Words Page 340 BASIC Stamp Programming Manual 2 0b www parallaxinc com...
Page 346: ...Conversion Formatters Page 344 BASIC Stamp Programming Manual 2 0b www parallaxinc com...