5: BASIC Stamp Command Reference – POLLOUT
BASIC Stamp Programming Manual 2.0c
•
www.parallaxinc.com
•
Page 229
vital that a large enough series resister (perhaps 100 ohms or greater) be
inserted on that pin to protect the external device and the BASIC Stamp.
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...