5: BASIC Stamp Command Reference – POLLOUT
BASIC Stamp Programming Manual 2.0c
•
www.parallaxinc.com
•
Page 225
POLLOUT
BS1 BS2 BS2e BS2sx
BS2p
POLLOUT
Pin, State
Function
Specify a polled-output pin and active state.
•
Pin
is a variable/constant/expression (0 – 15) that specifies the I/O
pin to use. This I/O pin will be set to output mode.
•
State
is a variable/constant/expression (0 – 1) that specifies
whether to set the I/O pin low (0) or high (1) when a polled-input
pin changes to its poll state.
Quick Facts
BS2p
Special notes
•
The POLLOUT command will immediately change the I/O pin to an
output mode and set its level opposite to that of State, regardless of the
polled-input states or the polled mode.
•
Polled-output pins will either change states continuously, just once or
not at all, depending on the POLLMODE command.
•
On the BS2p40, polled-output pins can be defined on both Main I/O and
Aux I/O pins. These are all active regardless of which group the
program happens to be using at the time of a polling event.
•
If both polled-outputs and polled-run are active, the polled-output event
will occur before the polled-run event.
Explanation
The POLLOUT command is one of a family of unique "polling" commands
on the BS2p module. The other commands in this family include POLLIN,
POLLMODE, POLLRUN and POLLWAIT. The POLLOUT command is
used to specify an output pin that changes states in response to changes on
any of the defined polled-input pins. This activity will occur in-between
instructions during the rest of the PBASIC program.
The "polling" commands allow the BASIC Stamp to respond to certain I/O
pin events at a faster rate than what is normally possible through manual
PBASIC programming. The term "poll" comes from the fact that the
BASIC Stamp's interpreter periodically checks the state of the designated
polled-input pins. It "polls" these pins after the end of each PBASIC
command and before it reads the next PBASIC command from the user
program; giving the appearance that it is polling "in the background".
This feature should not be confused with the concept of interrupts, as the
BASIC Stamp does not support true interrupts.
Table 5.57: POLLOUT Quick Facts.
p
2
Summary of Contents for BASIC Stamp 1
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...