5: BASIC Stamp Command Reference – POLLRUN
BASIC Stamp Programming Manual 2.0c
•
www.parallaxinc.com
•
Page 233
Demo Program (POLLRUN0.bsp)
' This program demonstrates the POLLRUN command. It is intended to be downloaded
' to program slot 0, and the program called PROGRUN1.BSP should be downloaded to
' program slot 1. I/O pin 0 is set to watch for a high signal. Once the Loop routine
' starts running, the program constant prints it's program slot number to the screen. If I/O
' pin 0 goes high, the program in program slot 1 (which should be POLLRUN1.BSP) is run.
'{$STAMP BS2p, PollRun1.bsp} 'STAMP directive (specifies a BS2p)
ProgSlot VAR BYTE
Init:
POLLIN 0, 1 'Set I/O 0 to polled-input looking for a high
POLLRUN 1 'Set polled-run to program slot 1
POLLMODE 3 'Set mode to enable polled-outputs and polled wait
Loop:
GET 127, ProgSlot
DEBUG "Running Program #", DEC ProgSlot.LOWNIB, CR
GOTO Loop
Demo Program (POLLRUN1.bsp)
' This program demonstrates the POLLRUN command. It is intended to be downloaded
' to program slot 1, and the program called PROGRUN0.BSP should be downloaded to
' program slot 0. This program is run when program 0 detects a high on I/O pin 0
' via the polled commands.
ProgSlot VAR BYTE
Loop:
GET 127, ProgSlot
DEBUG "Running Program #", DEC ProgSlot.LOWNIB, CR
GOTO Loop
p
2
p
2
Содержание BASIC Stamp 2e
Страница 1: ...BASIC Stamp Programming Manual Version 2 0c...
Страница 30: ...Introduction to the BASIC Stamps Page 28 BASIC Stamp Programming Manual 2 0b www parallaxinc com...
Страница 34: ...Quick Start Guide Page 32 BASIC Stamp Programming Manual 2 0b www parallaxinc com...
Страница 90: ...BUTTON BASIC Stamp Command Reference Page 88 BASIC Stamp Programming Manual 2 0b www parallaxinc com...
Страница 118: ...END BASIC Stamp Command Reference Page 116 BASIC Stamp Programming Manual 2 0b www parallaxinc com...
Страница 128: ...FREQOUT BASIC Stamp Command Reference Page 126 BASIC Stamp Programming Manual 2 0b www parallaxinc com...
Страница 196: ...NAP BASIC Stamp Command Reference Page 194 BASIC Stamp Programming Manual 2 0b www parallaxinc com...
Страница 206: ...OWIN BASIC Stamp Command Reference Page 204 BASIC Stamp Programming Manual 2 0b www parallaxinc com...
Страница 214: ...OWOUT BASIC Stamp Command Reference Page 212 BASIC Stamp Programming Manual 2 0b www parallaxinc com...
Страница 216: ...PAUSE BASIC Stamp Command Reference Page 214 BASIC Stamp Programming Manual 2 0b www parallaxinc com...
Страница 226: ...POLLMODE BASIC Stamp Command Reference Page 224 BASIC Stamp Programming Manual 2 0b www parallaxinc com...
Страница 232: ...POLLOUT BASIC Stamp Command Reference Page 230 BASIC Stamp Programming Manual 2 0b www parallaxinc com...
Страница 236: ...POLLRUN BASIC Stamp Command Reference Page 234 BASIC Stamp Programming Manual 2 0b www parallaxinc com...
Страница 240: ...POLLWAIT BASIC Stamp Command Reference Page 238 BASIC Stamp Programming Manual 2 0b www parallaxinc com...
Страница 262: ...RCTIME BASIC Stamp Command Reference Page 260 BASIC Stamp Programming Manual 2 0b www parallaxinc com...
Страница 274: ...RUN BASIC Stamp Command Reference Page 272 BASIC Stamp Programming Manual 2 0b www parallaxinc com...
Страница 310: ...SEROUT BASIC Stamp Command Reference Page 308 BASIC Stamp Programming Manual 2 0b www parallaxinc com...
Страница 324: ...STOP BASIC Stamp Command Reference Page 322 BASIC Stamp Programming Manual 2 0b www parallaxinc com...
Страница 340: ...ASCII Chart Page 338 BASIC Stamp Programming Manual 2 0b www parallaxinc com...
Страница 342: ...Reserved Words Page 340 BASIC Stamp Programming Manual 2 0b www parallaxinc com...
Страница 346: ...Conversion Formatters Page 344 BASIC Stamp Programming Manual 2 0b www parallaxinc com...