Specifications
BASIC Stamp II
Page 286 • BASIC Stamp Programming Manual 1.8 • Parallax, Inc.
I/O direction dictated by your program.
If you plan to use End, Nap, or Sleep in your
programs, make sure that your loads can tol-
erate these power outages. The simplest solu-
tion is often to connect resistors high or low
(to +5V or ground) as appropriate to ensure a
continuing supply of current during the reset
glitch.
The demo program can be used to demonstrate
the effects of the Nap glitch with an LED and
resistor as shown in figure I-7.
Demo Program
The program below lights an LED by placing a low on pin 0. This com-
pletes the circuit from +5V, through the LED and resistor, to ground.
During the Nap interval, the LED stays lit, but blinks off for a fraction
of a second. This blink is caused by the Nap wakeup mechanism de-
scribed above. During wakeup, all pins briefly slip into input mode,
effectively disconnecting them from loads.
low 0 ' Turn LED on.
snooze:
NAP 4 ' Nap for 288 ms.
goto snooze
220Ω
LED
I/O pin
+5V
Figure I-7










