IOTERM - BASIC Stamp Command Reference
Page 158
•
BASIC Stamp Programming Manual 2.0b
•
www.parallaxinc.com
Note that the main I/O and auxiliary I/O pins are independent of each
other; the states of the main I/O pins remain unchanged while the
program affects the auxiliary I/O pins, and vice versa.
Other commands that affect I/O group access are AUXIO and MAINIO.
Demo Program (AUX_MAIN_TERM.bsp)
' This program demonstrates the use of the AUXIO, MAINIO and IOTERM commands to
' affect I/O pins in the auxiliary and main I/O groups.
'{$STAMP BS2p} 'STAMP directive (specifies a BS2p)
Port VAR BIT
Loop:
MAINIO 'Switch to main I/O pins
TOGGLE 0 'Toggle state of I/O pin 0 (physical pin 5)
PWM 1, 100, 40 'Generate PWM on I/O pin 1 (physical pin 6)
AUXIO 'Switch to auxiliary I/O pins
TOGGLE 0 'Toggle state of I/O pin 0 (physical pin 21)
PULSOUT 1, 1000 'Generate a pulse on I/O pin 1 (physical pin 22)
PWM 2, 100, 40 'Generate PWM on I/O pin 2 (physical pin 23)
IOTERM Port 'Switch to main or aux I/Os (depending on Port)
TOGGLE 3 'Toggle state of I/O pin 3 (on main and aux, alternately)
Port = ~Port 'Invert port (switch between 0 and 1)
PAUSE 1000
GOTO Loop
p
2
NOTE: This is written for the BS2p
but its effects can only be seen on
the 40-pin version: the BS2p40.
M
AIN
I/O
AND AUXILIARY
I/O
PINS ARE
INDEPENDENT AND UNAFFECTED BY
CHANGES IN THE OPPOSITE GROUP
.
Содержание BASIC Stamp 1
Страница 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...