Parallax BASIC Stamp 2e Programming Manual page 222

Table of Contents

Advertisement

POLLMODE - BASIC Stamp Command Reference
Mode
0
Deactivate polling, clear polled-input and output configuration.
1
Deactivate polling, save polled-input and output configuration.
2
Activate polling with polled-output action (and polled-wait) only.
1
3
Activate polling with polled-run action only.
2
4
Activate polling with polled-output/polled-wait and polled-run actions.
3
5
Clear polled-input configuration.
3
6
Clear polled-output configuration.
3
7
Clear polled-input and output configuration.
8 – 15
Same at 0 – 7 except polled-output states are latched.
1
After the polled-run action occurs, the mode switches to 1 (deactivated, saved)
2
After the polled-run action occurs, the mode switches to 2 (activated, outputs)
3
These modes do not override the previous mode. Also, the output state of
polled-outputs does not change as a result of these modes.
The polled-run modes, 3 and 4, are unique. As soon as the polled-run
action occurs, the mode switches to 1 (deactivated, saved) or 2 (activated,
outputs), respectively.
continuously go to the start of the designated program slot while the
polled-inputs are in the desired poll state. Without this "one shot" feature,
your program would appear to lock-up as long as the polled-inputs are in
the designated state.
The clear configuration modes, 5, 6 and 7, are also unique. These modes
do not override the previous mode.
polled-outputs and a polled-run configuration was set and the mode was
set to 4 (activated, outputs and run) and later the program issued a
POLLMODE 6 command, the polled-output configuration would be
cleared but the mode would switch back to 4... still allowing the run
action. This also means if, later still, the program issues a POLLOUT
command, this polled-output would take effect immediately (since the
mode is still 4). Also note that these modes do not change the output state
of previously defined polled-output pins.
The POLLMODE command determines what action, if any, will occur in
response to a polled-input event. This command works in conjunction
with the POLLIN, POLLOUT and POLLRUN commands. The following is
an example of the POLLMODE command:
Page 220 • BASIC Stamp Programming Manual 2.0b • www.parallaxinc.com
Effect
This is so that the BASIC Stamp doesn't
For example, if polled-inputs,
Table 5.56: POLLMODE Mode
Values.
A
POLLMODE
SIMPLE
EXAMPLE
.

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the BASIC Stamp 2e and is the answer not in the manual?

Table of Contents