BASIC stamp manual v2.2
5: BASIC Stamp Command Reference – NAP
BASIC Stamp Syntax and Reference Manual 2.2 • www.parallax.com • Page 285
NAP
BS1 BS2 BS2e BS2sx BS2p BS2pe BS2px
NAP Duration
Function
Enter sleep mode for a short time. Power consumption is reduced as
indicated in Table 5.59 assuming no loads are being driven.
• Duration is a variable/constant/expression (0 – 7) that specifies the
duration of the reduced-power nap. The duration is (2^Duration) *
18 ms. Table 5.60 indicates the nap length for any given Duration.
Quick Facts
Table 5.59: NAP Quick Facts.
Note: Current measurements are
based on 5-volt power, no extra
loads, and 75°F ambient
temperature.
BS1 BS2 BS2e BS2sx BS2p BS2pe BS2px
Current Draw
During Run
1 mA 3 mA 25 mA 60 mA 40 mA 15 mA 55 mA
Current Draw
During NAP
25 µA 50 µA 200 µA 500 µA 350 µA 36 µA 450 µA
Related
Commands
END and SLEEP END, SLEEP, and POLLWAIT
Accuracy of
Nap
-50 to 100% (±10% @ 75°F with stable power supply)
Explanation
NAP uses the same shutdown/startup mechanism as SLEEP, with one big
difference. During SLEEP, the BASIC Stamp automatically compensates
for variations in the speed of the watchdog timer oscillator that serves as
its alarm clock. As a result, longer SLEEP intervals are accurate to
approximately ±1 percent.
Table 5.60: Duration and Resulting
Length of NAP.
Duration Length of Nap
0 18 ms
1 36 ms
2 72 ms
3 144 ms
4 288 ms
5 576 ms
6 1152 ms (1.152 seconds)
7 2304 ms (2.304 seconds)
NAP intervals are directly controlled by the watchdog timer without
compensation. Variations in temperature, supply voltage, and
manufacturing tolerance of the BASIC Stamp's interpreter chip can cause
NOTE: Expressions are not allowed as
arguments on the BS1.
NAP
ACCURACY NOTES.
1
A
ll
2
1