Initial commit after migrating repo and assuring the product launches

This commit is contained in:
2019-06-23 14:56:45 +02:00
commit 507f2aedbc
889 changed files with 60893 additions and 0 deletions
+8
View File
@@ -0,0 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8"/>
<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
<classpathentry kind="src" path="src"/>
<classpathentry combineaccessrules="false" exported="true" kind="src" path="/pbi-core"/>
<classpathentry kind="output" path="bin"/>
</classpath>
+1
View File
@@ -0,0 +1 @@
/bin/
+28
View File
@@ -0,0 +1,28 @@
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
<name>pbi-ide</name>
<comment></comment>
<projects>
</projects>
<buildSpec>
<buildCommand>
<name>org.eclipse.jdt.core.javabuilder</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>org.eclipse.pde.ManifestBuilder</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>org.eclipse.pde.SchemaBuilder</name>
<arguments>
</arguments>
</buildCommand>
</buildSpec>
<natures>
<nature>org.eclipse.pde.PluginNature</nature>
<nature>org.eclipse.jdt.core.javanature</nature>
</natures>
</projectDescription>
+7
View File
@@ -0,0 +1,7 @@
eclipse.preferences.version=1
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
org.eclipse.jdt.core.compiler.compliance=1.8
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
org.eclipse.jdt.core.compiler.source=1.8
+2
View File
@@ -0,0 +1,2 @@
eclipse.preferences.version=1
pluginProject.extensions=false
+23
View File
@@ -0,0 +1,23 @@
The MIT License (MIT)
Copyright (c) 2015 Elias Groll, Johanna Reichmann
For further contributers, see CONTRIBUTORS.md
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
+17
View File
@@ -0,0 +1,17 @@
Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: πBASIC IDE
Bundle-SymbolicName: edu.fichte.pbi.ide;singleton:=true
Bundle-Version: 1.0.0
Bundle-Vendor: FICHTE-GYMNASIUM
Bundle-RequiredExecutionEnvironment: JavaSE-1.8
Require-Bundle: org.eclipse.ui,
org.eclipse.core.runtime,
com.github.eliasgroll.pbi.interpreter;bundle-version="1.0.0";resolution:=optional,
org.eclipse.e4.ui.model.workbench;bundle-version="1.0.1",
org.eclipse.ui.intro;resolution:=optional,
org.eclipse.ui.editors;resolution:=optional,
org.eclipse.osgi;resolution:=optional,
org.eclipse.jface.text;resolution:=optional
Bundle-ActivationPolicy: lazy
Bundle-Activator: edu.fichte.pbi.ide.Activator
+32
View File
File diff suppressed because one or more lines are too long
+20
View File
@@ -0,0 +1,20 @@
source.. = src/
output.. = bin/
bin.includes = plugin.xml,\
META-INF/,\
.,\
icons/,\
splash.bmp,\
help/,\
plugin_customization.ini,\
contexts.xml,\
bin/,\
config/
src.includes = plugin_customization.ini,\
icons/,\
help/,\
contexts.xml,\
bin/,\
splash.bmp,\
config/
jre.compilation.profile = JavaSE-1.7
+64
View File
@@ -0,0 +1,64 @@
## This is the configuration of the interpreter's content assistance.
## You can comment something by starting a line with ## .
## You can freely add/remove/modify by adding/removing/modifying a line.
## A line is build like this: keyword->replacement
## You can start the content-assistance by CTRL+SPACE.
## It is only executed if you're at the beginning of a line and if there is no other match with a keyword.
## You can use /CR to define a new line in a replacement.
SOUND -> SOUND port, (freq, time)
SD -> SOUND port, (freq, time)
HIGH -> HIGH port
LOW -> LOW pin
OUTPUT -> OUTPUT port
OP -> OUTPUT port
PAUSE -> PAUSE time
PS -> PAUSE time
GOTO -> GOTO label
JMP -> GOTO label
IF -> IF expr THEN label
END -> END
GOSUB -> GOSUB sub
SUB -> GOSUB sub
RETURN -> RETURN
FOR -> FOR counter = start TO end/CR'some content/CR NEXT
LOOP -> FOR counter = start TO end/CR'some content/CR NEXT
WHILE -> loop:/CRIF expr THEN end/CR'some content/CRGOTO loop/CRend:
DOWHILE -> loop:/CR'some content/CRIF expr THEN loop
NEXT -> NEXT
DEBUG -> DEBUG args
DB -> DEBUG args
DG -> DEBUG args
SAY -> DEBUG args
BREAKPOINT -> BREAKPOINT
BP -> BREAKPOINT
SYMBOL -> SYMBOL ref = var
LOOKUP -> LOOKUP index, (val0, val1)
LU -> LOOKUP index, (val0, val1)
LD -> LOOKDOWN target, (val0, val1)
LOOKDOWN -> LOOKDOWN target, (val0, val1)
POT -> POT pin, scale, var
PULSIN -> PULSIN pin, state, var
PINS -> PINS=%00000000 'ports 76543210
POUT -> PULSOUT pin, duration
PULSOUT -> PULSOUT pin, duration
LET -> LET var = val
= -> LET var = val
INPUT -> INPUT port
IP -> INPUT port
ASSERT -> ASSERT exp
CHECK -> ASSERT exp
ACTIVATEINFO -> ACTIVATEINFO
AI -> ACTIVATEINFO
DI -> DEACTIVATEINFO
DEACTIVATEINFO -> DEACTIVATEINFO
BRANCH -> BRANCH offset, (label0, label1)
NAP -> NAP time
SLEEP -> SLEEP time
EEPROM -> EEPROM location, (val0, val1)
RANDOM -> RANDOM seed
READ -> READ location,var
WRITE -> WRITE location, value
TOGGLE -> TOGGLE port
REVERSE -> REVERSE port
DIRS -> DIRS=%00000000 'ports 76543210
+6
View File
@@ -0,0 +1,6 @@
## This is the color configuration to change the look and feel of the IDE.
## You can comment by starting a line with ## .
## Do not add/delete a line.
## set the scheme of the console on startup (values: black, blue, white)
console scheme= blue
+17
View File
@@ -0,0 +1,17 @@
## This is the run configuration of the interpreter.
## You can comment by starting a line with ## .
## Do not delete a line.
## A line is build like this: setting= value
## You can enable/disable a setting by: true/false.
## Slow down the execution speed to the speed of Basic Stamp 1.
emulate 4Mhz= true
## Activate additional information about the commands at the beginning of the execution.
activate info= false
## Deactivate display of warnings.
ignore warnings= false
## Activate display of the parsing-result
print intern composition= false
+13
View File
@@ -0,0 +1,13 @@
<?xml version="1.0" encoding="UTF-8"?>
<contexts>
<context id="viewer" title="Sample View">
<description>This is the context help for the sample view with a tree viewer. It was generated by a PDE template.</description>
<topic href="/PLUGINS_ROOT/org.eclipse.platform.doc.isv/guide/ua_help_context.htm" label="Context-sensitive help">
<enablement>
<with variable="platform">
<test property="org.eclipse.core.runtime.isBundleInstalled" args="org.eclipse.platform.doc.isv"/>
</with>
</enablement>
</topic>
</context>
</contexts>
Binary file not shown.
@@ -0,0 +1,91 @@
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns:MadCap="http://www.madcapsoftware.com/Schemas/MadCap.xsd" MadCap:lastBlockDepth="6" MadCap:lastHeight="94" MadCap:lastWidth="853" MadCap:disableMasterStylesheet="true" MadCap:tocPath="Connection Troubleshooting" MadCap:InPreviewMode="false" MadCap:PreloadImages="false" MadCap:RuntimeFileType="Topic" MadCap:TargetType="WebHelp" lang="en-us" xml:lang="en-us" MadCap:PathToHelpSystem="../../" MadCap:HelpSystemFileName="Default.xml" MadCap:SearchType="Stem">
<head><title>FIFO Buffer Settings</title>
<link href="../SkinSupport/MadCap.css" rel="stylesheet" />
<link href="../Resources/Stylesheets/BSE_Help.css" rel="stylesheet" />
<script src="../SkinSupport/MadCapAll.js">
</script>
</head>
<body>
<div class="MCBreadcrumbsBox_0"><span class="MCBreadcrumbsPrefix">You are here: </span><a class="MCBreadcrumbsLink" href="TFAQ.htm">Connection Troubleshooting</a><span class="MCBreadcrumbsDivider"> &gt; </span><span class="MCBreadcrumbs">FIFO Buffer Settings</span>
</div>
<h1>FIFO Buffer Settings</h1>
<p class="PlainText">If you are using a standard serial port connection (not a USB&#160;port with a USB&#160;to serial adapter)&#160;and the <a href="RunIdTest.htm" target="" title="" alt="" class="MCXref_0">Run/Identify Test</a> <![CDATA[ ]]>shows no Device Type, but a "Yes" in the Echo column, or a "Yes" in both the Loopback and Echo columns, like this:</p>
<p>
<img src="../Resources/Images/IDnoDevice.png" />
</p>
<p>&#160;</p>
<p>...you may need to adjust the port's FIFO buffer setting.</p>
<p>&#160;</p>
<ul style="list-style-type: circle;">
<li class="Checklist" value="1">Make note of the COM port number in the row where it displays a "Yes" for Echo. (In this example it is COM5).</li>
<li class="Checklist" value="2">Find that COM&#160;port in Device Manager.</li>
</ul>
<div class="ListIndent">
<div class="MCDropDown">
<div class="MCDropDownHead_0"><a class="MCDropDownHotSpot_0" href="javascript:void(0);" id="MCDropDownHotSpot_2512036703_0" onclick="FMCDropDown( this ); return false;"><img style="border: none;margin-right: 2px;" src="../SkinSupport/DropDownClosed.gif" MadCap:altsrc="../SkinSupport/DropDownOpen.gif" onload="if ( typeof( FMCPreloadImage ) == 'function' ) { FMCPreloadImage( '../SkinSupport/DropDownOpen.gif' ); }" class="MCDropDownIcon" />Finding your Ports List in your computer's Device Manager</a>
</div>
<div class="MCDropDownBody" id="MCDropDownBody_2512036703_0" style="display: none;">
<ul style="list-style-type: circle;">
<li value="1"><span class="MCExpanding"><a href="javascript:void(0);" class="MCExpandingHead_0" onclick="FMCExpand( this ); return false;">Windows 2K<img style="border: none;margin-left: 5px;" src="../SkinSupport/ExpandingClosed.gif" MadCap:altsrc="../SkinSupport/ExpandingOpen.gif" onload="if ( typeof( FMCPreloadImage ) == 'function' ) { FMCPreloadImage( '../SkinSupport/ExpandingOpen.gif' ); }" class="MCExpandingIcon" /></a><span class="MCExpandingBody" style="display: none;">: Start Menu &gt; Settings &gt; Control Panel &gt; System &gt; click Hardware Tab &gt; Device Manager... &gt; expand Ports (COM &amp;&#160;LPT)</span></span>
</li>
<li value="2"><span class="MCExpanding"><a href="javascript:void(0);" class="MCExpandingHead_0" onclick="FMCExpand( this ); return false;">Windows XP<img style="border: none;margin-left: 5px;" src="../SkinSupport/ExpandingClosed.gif" MadCap:altsrc="../SkinSupport/ExpandingOpen.gif" onload="if ( typeof( FMCPreloadImage ) == 'function' ) { FMCPreloadImage( '../SkinSupport/ExpandingOpen.gif' ); }" class="MCExpandingIcon" /></a><span class="MCExpandingBody" style="display: none;">: Start Menu &gt; right-click My Computer &gt; Properties &gt; click Hardware Tab &gt; Device Manager &gt; expand Ports (COM &amp;&#160;LPT)</span></span>
</li>
<li value="3"><span class="MCExpanding"><a href="javascript:void(0);" class="MCExpandingHead_0" onclick="FMCExpand( this ); return false;">Windows Vista or Windows 7<img style="border: none;margin-left: 5px;" src="../SkinSupport/ExpandingClosed.gif" MadCap:altsrc="../SkinSupport/ExpandingOpen.gif" onload="if ( typeof( FMCPreloadImage ) == 'function' ) { FMCPreloadImage( '../SkinSupport/ExpandingOpen.gif' ); }" class="MCExpandingIcon" /></a><span class="MCExpandingBody" style="display: none;">: Start Menu (Windows icon) &gt; right-click Computer &gt; Properties &gt; Device Manager (left pane) &gt; expand Ports (COM &amp;&#160;LPT)</span></span>
</li>
</ul>
</div>
</div>
</div>
<ul>
<li class="Checklist" value="1">Right-click on the COM port, and select Properties</li>
</ul>
<p class="PlainTextIndent">
<img src="../Resources/Images/SerComPortProps.png">
</img>
</p>
<ul>
<li class="Checklist" value="1">On the Port Settings tab, click the Advanced button. </li>
<li class="Checklist" value="2">In the Advanced Settings window, un-check the "Use FIFO buffers" box, then click OK.</li>
</ul>
<p>
<img src="../Resources/Images/FifoUncheck.png">
</img>
</p>
<ul>
<li class="Checklist" value="1">Now try the <a href="RunIdTest.htm" target="" title="" alt="" class="MCXref_0">Run/Identify Test</a> again, or try downloading a program to your BASIC&#160;Stamp.</li>
<li class="Checklist" value="2">If this didn't help, <a href="../HomeTopics/Resources.htm#Contact_Parallax" target="" title="" alt="" class="MCXref_0">Contact Parallax</a> Tech Support for assistance.</li>
</ul>
<p>&#160;</p>
<div class="Col2">
<div class="MasterFoot">
<p MadCap:conditions="BSEconditions.BSEWebHelp (Primary)-INCLUDE"><a href="../HomeTopics/HomePage.htm">Go to Welcome page</a>
</p>
</div>
</div>
<div class="Col2">
<div class="MasterFoot">
<p style="text-align: right;"><span class="ContactInfoProjectName">BASIC Stamp Help</span> <![CDATA[ ]]><span class="ContactInfoVersion#">Version 2.5.4</span> <![CDATA[ ]]></p>
<p style="text-align: right;">Copyright ©&#160;<span class="ContactInfoCompanyName">Parallax Inc.</span></p>
<p style="text-align: right;"><span class="SystemShortDate">8/8/2012</span>
</p>
</div>
</div>
<script type="text/javascript">/* <![CDATA[ */
var _gaq = _gaq || [];
_gaq.push(['_setAccount', 'UA-285614-1']);
_gaq.push(['_trackPageview']);
(function() {
var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
})();
/* ]]> */</script>
<script type="text/javascript" src="../SkinSupport/MadCapBodyEnd.js">
</script>
</body>
</html>
@@ -0,0 +1,26 @@
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns:MadCap="http://www.madcapsoftware.com/Schemas/MadCap.xsd" MadCap:lastBlockDepth="2" MadCap:lastHeight="47" MadCap:lastWidth="579" MadCap:disableMasterStylesheet="true" MadCap:tocPath="" MadCap:InPreviewMode="false" MadCap:PreloadImages="false" MadCap:RuntimeFileType="Topic" MadCap:TargetType="WebHelp" lang="en-us" xml:lang="en-us" class="TopicPopup" MadCap:PathToHelpSystem="../../" MadCap:HelpSystemFileName="Default.xml" MadCap:SearchType="Stem">
<head><title>Insert the BASIC Stamp module</title>
<link href="../SkinSupport/MadCap.css" rel="stylesheet" />
<link href="../Resources/Stylesheets/BSE_Help.css" rel="stylesheet" />
<script src="../SkinSupport/MadCapAll.js" type="text/javascript">
</script>
</head>
<body>
<h1>Insert the BASIC Stamp module</h1>
<ul>
<li class="Checklist" value="1">Use the silkscreen pictures that show the three prominent chips on the BASIC Stamp to determine how to orient it before inserting it into its socket. There is also a small semi-circular notch at in the top-center of the BASIC Stamp module that indicates which way is “up.” Match this reference notch to the notch in the socket.</li>
<li class="Checklist" value="2">After correctly orienting the 24-pin BASIC Stamp module, gently insert it into its socket as shown at (1) in the picture below.</li>
<li class="Checklist" value="3">Make sure that each pin is seated in its corresponding socket hole, then apply firm downward pressure with your thumb. The module should sink about ¼ of an inch (~0.6 mm) into the socket, and only the flared portion of each BASIC Stamp leg should be visible above the socket.</li>
<li class="Checklist" value="4">Visually inspect the legs to make sure each pin is in its socket and that no pins are folded underneath the module.</li>
</ul>
<p>&#160;</p>
<p>
<img src="../Resources/Images/InsertBS2.png" />
</p>
<p class="Caution" MadCap:autonum="Caution! &#160;"><span class="autonumber"><span class="TipSpan">Caution! &#160;</span></span>Do not remove the BASIC Stamp module from its socket, unless it needs to be replaced with another module!&#160;&#160;&#160; Every time the BASIC Stamp is removed and re-inserted into the socket, you risk damaging it.&#160; You do not need to remove it for storage.</p>
<script type="text/javascript" src="../SkinSupport/MadCapBodyEnd.js">
</script>
</body>
</html>
@@ -0,0 +1,72 @@
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns:MadCap="http://www.madcapsoftware.com/Schemas/MadCap.xsd" MadCap:lastBlockDepth="6" MadCap:lastHeight="94" MadCap:lastWidth="853" MadCap:disableMasterStylesheet="true" MadCap:tocPath="" MadCap:InPreviewMode="false" MadCap:PreloadImages="false" MadCap:RuntimeFileType="Topic" MadCap:TargetType="WebHelp" lang="en-us" xml:lang="en-us" MadCap:PathToHelpSystem="../../" MadCap:HelpSystemFileName="Default.xml" MadCap:SearchType="Stem">
<head><title>Invalid Port</title>
<link href="../SkinSupport/MadCap.css" rel="stylesheet" />
<link href="../Resources/Stylesheets/BSE_Help.css" rel="stylesheet" />
<script src="../SkinSupport/MadCapAll.js">
</script>
</head>
<body>
<h1>Invalid Port</h1>
<p>
<img src="../Resources/Images/IDinvalidPort.png" />
</p>
<ul>
<li class="Checklist" value="1">The port may have been disabled. Right click the port in your Ports list and click Enable.</li>
</ul>
<p class="PlainTextIndent">
<div class="MCDropDown">
<div class="MCDropDownHead_0"><a class="MCDropDownHotSpot_0" href="javascript:void(0);" id="MCDropDownHotSpot_1961910000_0" onclick="FMCDropDown( this ); return false;"><img style="border: none;margin-right: 2px;" src="../SkinSupport/DropDownClosed.gif" MadCap:altsrc="../SkinSupport/DropDownOpen.gif" onload="if ( typeof( FMCPreloadImage ) == 'function' ) { FMCPreloadImage( '../SkinSupport/DropDownOpen.gif' ); }" class="MCDropDownIcon" />Finding your Ports List in your computer's Device Manager</a>
</div>
<div class="MCDropDownBody" id="MCDropDownBody_1961910000_0" style="display: none;">
<ul style="list-style-type: circle;">
<li value="1"><span class="MCExpanding"><a href="javascript:void(0);" class="MCExpandingHead_0" onclick="FMCExpand( this ); return false;">Windows 2K<img style="border: none;margin-left: 5px;" src="../SkinSupport/ExpandingClosed.gif" MadCap:altsrc="../SkinSupport/ExpandingOpen.gif" onload="if ( typeof( FMCPreloadImage ) == 'function' ) { FMCPreloadImage( '../SkinSupport/ExpandingOpen.gif' ); }" class="MCExpandingIcon" /></a><span class="MCExpandingBody" style="display: none;">: Start Menu &gt; Settings &gt; Control Panel &gt; System &gt; click Hardware Tab &gt; Device Manager... &gt; expand Ports (COM &amp;&#160;LPT)</span></span>
</li>
<li value="2"><span class="MCExpanding"><a href="javascript:void(0);" class="MCExpandingHead_0" onclick="FMCExpand( this ); return false;">Windows XP<img style="border: none;margin-left: 5px;" src="../SkinSupport/ExpandingClosed.gif" MadCap:altsrc="../SkinSupport/ExpandingOpen.gif" onload="if ( typeof( FMCPreloadImage ) == 'function' ) { FMCPreloadImage( '../SkinSupport/ExpandingOpen.gif' ); }" class="MCExpandingIcon" /></a><span class="MCExpandingBody" style="display: none;">: Start Menu &gt; right-click My Computer &gt; Properties &gt; click Hardware Tab &gt; Device Manager &gt; expand Ports (COM &amp;&#160;LPT)</span></span>
</li>
<li value="3"><span class="MCExpanding"><a href="javascript:void(0);" class="MCExpandingHead_0" onclick="FMCExpand( this ); return false;">Windows Vista or Windows 7<img style="border: none;margin-left: 5px;" src="../SkinSupport/ExpandingClosed.gif" MadCap:altsrc="../SkinSupport/ExpandingOpen.gif" onload="if ( typeof( FMCPreloadImage ) == 'function' ) { FMCPreloadImage( '../SkinSupport/ExpandingOpen.gif' ); }" class="MCExpandingIcon" /></a><span class="MCExpandingBody" style="display: none;">: Start Menu (Windows icon) &gt; right-click Computer &gt; Properties &gt; Device Manager (left pane) &gt; expand Ports (COM &amp;&#160;LPT)</span></span>
</li>
</ul>
</div>
</div>
</p>
<p>&#160;</p>
<p class="PlainTextIndent">
<img src="../Resources/Images/EnablePort.png" />
</p>
<ul>
<li class="Checklist" value="1">If this did not help, <a href="../HomeTopics/Resources.htm#Contact_Parallax" target="" title="" alt="" class="MCXref_0">Contact Parallax</a> Tech Support for assistance.</li>
</ul>
<p>&#160;</p>
<div class="Col2">
<div class="MasterFoot">
<p MadCap:conditions="BSEconditions.BSEWebHelp (Primary)-INCLUDE"><a href="../HomeTopics/HomePage.htm">Go to Welcome page</a>
</p>
</div>
</div>
<div class="Col2">
<div class="MasterFoot">
<p style="text-align: right;"><span class="ContactInfoProjectName">BASIC Stamp Help</span> <![CDATA[ ]]><span class="ContactInfoVersion#">Version 2.5.4</span> <![CDATA[ ]]></p>
<p style="text-align: right;">Copyright ©&#160;<span class="ContactInfoCompanyName">Parallax Inc.</span></p>
<p style="text-align: right;"><span class="SystemShortDate">8/8/2012</span>
</p>
</div>
</div>
<script type="text/javascript">/* <![CDATA[ */
var _gaq = _gaq || [];
_gaq.push(['_setAccount', 'UA-285614-1']);
_gaq.push(['_trackPageview']);
(function() {
var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
})();
/* ]]> */</script>
<script type="text/javascript" src="../SkinSupport/MadCapBodyEnd.js">
</script>
</body>
</html>
@@ -0,0 +1,90 @@
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns:MadCap="http://www.madcapsoftware.com/Schemas/MadCap.xsd" MadCap:lastBlockDepth="6" MadCap:lastHeight="94" MadCap:lastWidth="853" MadCap:disableMasterStylesheet="true" MadCap:tocPath="Connection Troubleshooting" MadCap:InPreviewMode="false" MadCap:PreloadImages="false" MadCap:RuntimeFileType="Topic" MadCap:TargetType="WebHelp" lang="en-us" xml:lang="en-us" MadCap:PathToHelpSystem="../../" MadCap:HelpSystemFileName="Default.xml" MadCap:SearchType="Stem">
<head><title>Latency Timer Settings</title>
<link href="../SkinSupport/MadCap.css" rel="stylesheet" />
<link href="../Resources/Stylesheets/BSE_Help.css" rel="stylesheet" />
<script src="../SkinSupport/MadCapAll.js">
</script>
</head>
<body>
<div class="MCBreadcrumbsBox_0"><span class="MCBreadcrumbsPrefix">You are here: </span><a class="MCBreadcrumbsLink" href="TFAQ.htm">Connection Troubleshooting</a><span class="MCBreadcrumbsDivider"> &gt; </span><span class="MCBreadcrumbs">Latency Timer Settings</span>
</div>
<h1>Latency Timer Settings</h1>
<p>If you are using a BASIC Stamp development board with a USB&#160;connector, or a serial board with a Parallax USB&#160;to Serial Adapter, you may need to adjust your computer's latency timer settings if any of these are true:</p>
<ul>
<li value="1">The <a href="RunIdTest.htm" target="" title="" alt="" class="MCXref_0">Run/Identify Test</a> shows no Device Type, but a "Yes" in both the Loopback and Echo columns, or a "Yes" only in the Echo column.</li>
<li value="2">You have passed the Run/Identify test but when you try to download a program with Run/Run, you get a "No BASIC Stamps Found" message. </li>
<li value="3">You are able to download short programs, but not long ones. </li>
<li value="4">You are able to program intermittently, but sometimes it fails.</li>
</ul>
<h2>How to adjust the Latency Timer settings</h2>
<ul>
<li class="Checklist" value="1">Using the Identification window from the <a href="RunIdTest.htm" target="" title="" alt="" class="MCXref_0">Run/Identify Test</a> procedure, make note of the COM port number in the row where it displays a "Yes" for Echo.</li>
<li class="Checklist" value="2">Find that COM&#160;port in Device Manager.</li>
</ul>
<div class="ListIndent">
<div class="MCDropDown">
<div class="MCDropDownHead_0"><a class="MCDropDownHotSpot_0" href="javascript:void(0);" id="MCDropDownHotSpot_4207630684_0" onclick="FMCDropDown( this ); return false;"><img style="border: none;margin-right: 2px;" src="../SkinSupport/DropDownClosed.gif" MadCap:altsrc="../SkinSupport/DropDownOpen.gif" onload="if ( typeof( FMCPreloadImage ) == 'function' ) { FMCPreloadImage( '../SkinSupport/DropDownOpen.gif' ); }" class="MCDropDownIcon" />Finding your Ports List in your computer's Device Manager</a>
</div>
<div class="MCDropDownBody" id="MCDropDownBody_4207630684_0" style="display: none;">
<ul style="list-style-type: circle;">
<li value="1"><span class="MCExpanding"><a href="javascript:void(0);" class="MCExpandingHead_0" onclick="FMCExpand( this ); return false;">Windows 2K<img style="border: none;margin-left: 5px;" src="../SkinSupport/ExpandingClosed.gif" MadCap:altsrc="../SkinSupport/ExpandingOpen.gif" onload="if ( typeof( FMCPreloadImage ) == 'function' ) { FMCPreloadImage( '../SkinSupport/ExpandingOpen.gif' ); }" class="MCExpandingIcon" /></a><span class="MCExpandingBody" style="display: none;">: Start Menu &gt; Settings &gt; Control Panel &gt; System &gt; click Hardware Tab &gt; Device Manager... &gt; expand Ports (COM &amp;&#160;LPT)</span></span>
</li>
<li value="2"><span class="MCExpanding"><a href="javascript:void(0);" class="MCExpandingHead_0" onclick="FMCExpand( this ); return false;">Windows XP<img style="border: none;margin-left: 5px;" src="../SkinSupport/ExpandingClosed.gif" MadCap:altsrc="../SkinSupport/ExpandingOpen.gif" onload="if ( typeof( FMCPreloadImage ) == 'function' ) { FMCPreloadImage( '../SkinSupport/ExpandingOpen.gif' ); }" class="MCExpandingIcon" /></a><span class="MCExpandingBody" style="display: none;">: Start Menu &gt; right-click My Computer &gt; Properties &gt; click Hardware Tab &gt; Device Manager &gt; expand Ports (COM &amp;&#160;LPT)</span></span>
</li>
<li value="3"><span class="MCExpanding"><a href="javascript:void(0);" class="MCExpandingHead_0" onclick="FMCExpand( this ); return false;">Windows Vista or Windows 7<img style="border: none;margin-left: 5px;" src="../SkinSupport/ExpandingClosed.gif" MadCap:altsrc="../SkinSupport/ExpandingOpen.gif" onload="if ( typeof( FMCPreloadImage ) == 'function' ) { FMCPreloadImage( '../SkinSupport/ExpandingOpen.gif' ); }" class="MCExpandingIcon" /></a><span class="MCExpandingBody" style="display: none;">: Start Menu (Windows icon) &gt; right-click Computer &gt; Properties &gt; Device Manager (left pane) &gt; expand Ports (COM &amp;&#160;LPT)</span></span>
</li>
</ul>
</div>
</div>
</div>
<ul>
<li class="Checklist" value="1">Right-click on the COM port, and select Properties</li>
</ul>
<p class="PlainTextIndent">
<img src="../Resources/Images/PortProperties.png">
</img>
</p>
<ul>
<li class="Checklist" value="1">Under the Port Settings tab, click the Advanced button. </li>
<li class="Checklist" value="2">In the Advanced Settings window, change the Latency Timer setting to 1 and then click OK.</li>
</ul>
<p>
<img src="../Resources/Images/LatentcyTimer.png" />
</p>
<ul>
<li class="Checklist" value="1">Now try the <a href="RunIdTest.htm" target="" title="" alt="" class="MCXref_0">Run/Identify Test</a> again, or try downloading a program to your BASIC&#160;Stamp.</li>
<li class="Checklist" value="2">If this did not help, <a href="../HomeTopics/Resources.htm#Contact_Parallax" target="" title="" alt="" class="MCXref_0">Contact Parallax</a> Tech Support for assistance..</li>
</ul>
<div class="Col2">
<div class="MasterFoot">
<p MadCap:conditions="BSEconditions.BSEWebHelp (Primary)-INCLUDE"><a href="../HomeTopics/HomePage.htm">Go to Welcome page</a>
</p>
</div>
</div>
<div class="Col2">
<div class="MasterFoot">
<p style="text-align: right;"><span class="ContactInfoProjectName">BASIC Stamp Help</span> <![CDATA[ ]]><span class="ContactInfoVersion#">Version 2.5.4</span> <![CDATA[ ]]></p>
<p style="text-align: right;">Copyright ©&#160;<span class="ContactInfoCompanyName">Parallax Inc.</span></p>
<p style="text-align: right;"><span class="SystemShortDate">8/8/2012</span>
</p>
</div>
</div>
<script type="text/javascript">/* <![CDATA[ */
var _gaq = _gaq || [];
_gaq.push(['_setAccount', 'UA-285614-1']);
_gaq.push(['_trackPageview']);
(function() {
var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
})();
/* ]]> */</script>
<script type="text/javascript" src="../SkinSupport/MadCapBodyEnd.js">
</script>
</body>
</html>
@@ -0,0 +1,75 @@
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns:MadCap="http://www.madcapsoftware.com/Schemas/MadCap.xsd" MadCap:lastBlockDepth="6" MadCap:lastHeight="94" MadCap:lastWidth="853" MadCap:disableMasterStylesheet="true" MadCap:tocPath="Connection Troubleshooting" MadCap:InPreviewMode="false" MadCap:PreloadImages="false" MadCap:RuntimeFileType="Topic" MadCap:TargetType="WebHelp" lang="en-us" xml:lang="en-us" MadCap:PathToHelpSystem="../../" MadCap:HelpSystemFileName="Default.xml" MadCap:SearchType="Stem">
<head><title>No BASIC Stamps Found...</title>
<link href="../SkinSupport/MadCap.css" rel="stylesheet" />
<link href="../Resources/Stylesheets/BSE_Help.css" rel="stylesheet" />
<script src="../SkinSupport/MadCapAll.js">
</script>
</head>
<body>
<div class="MCBreadcrumbsBox_0"><span class="MCBreadcrumbsPrefix">You are here: </span><a class="MCBreadcrumbsLink" href="TFAQ.htm">Connection Troubleshooting</a><span class="MCBreadcrumbsDivider"> &gt; </span><span class="MCBreadcrumbs">No BASIC Stamps Found...</span>
</div>
<h1>No BASIC Stamps Found...</h1>
<p>If you are on this page, you probably tried to download a program to your BASIC Stamp but got the "No BASIC Stamps found" message:</p>
<p>&#160;</p>
<p>
<img src="../Resources/Images/NoFound.png">
</img>
</p>
<p>First, try these quick fixes:</p>
<ul>
<li class="Checklist" value="1"><span class="MCExpanding"><a href="javascript:void(0);" class="MCExpandingHead_0" onclick="FMCExpand( this ); return false;">Loose connections<img style="border: none;margin-left: 5px;" src="../SkinSupport/ExpandingClosed.gif" MadCap:altsrc="../SkinSupport/ExpandingOpen.gif" onload="if ( typeof( FMCPreloadImage ) == 'function' ) { FMCPreloadImage( '../SkinSupport/ExpandingOpen.gif' ); }" class="MCExpandingIcon" /></a><span class="MCExpandingBody" style="display: none;">: Double-check the connections between your computer and your programming cable, the Parallax USB&#160;to Serial Adapter if you are using one, and the development board.</span></span>
</li>
<li class="Checklist" value="2"><span class="MCExpanding"><a href="javascript:void(0);" class="MCExpandingHead_0" onclick="FMCExpand( this ); return false;">Misconnected BASIC Stamp<img style="border: none;margin-left: 5px;" src="../SkinSupport/ExpandingClosed.gif" MadCap:altsrc="../SkinSupport/ExpandingOpen.gif" onload="if ( typeof( FMCPreloadImage ) == 'function' ) { FMCPreloadImage( '../SkinSupport/ExpandingOpen.gif' ); }" class="MCExpandingIcon" /></a><span class="MCExpandingBody" style="display: none;">: If you are using a Board of Education, double-check how to <span class="MCPopup"><a href="javascript:void(0);" MadCap:src="InsertBS2popup.htm" onclick="FMCPopup( event, this ); return false;" class="MCXref_0" alt="Open in popup window" title="Open in popup window">Insert the BASIC Stamp module</a></span> in its socket.</span></span>
</li>
<li class="Checklist" value="3"><span class="MCExpanding"><a href="javascript:void(0);" class="MCExpandingHead_0" onclick="FMCExpand( this ); return false;">No power<img style="border: none;margin-left: 5px;" src="../SkinSupport/ExpandingClosed.gif" MadCap:altsrc="../SkinSupport/ExpandingOpen.gif" onload="if ( typeof( FMCPreloadImage ) == 'function' ) { FMCPreloadImage( '../SkinSupport/ExpandingOpen.gif' ); }" class="MCExpandingIcon" /></a><span class="MCExpandingBody" style="display: none;">: double-check the power supply that you have connected to your board. (See <a href="PowerSupplies.htm" target="" title="Open &quot;Power Supplies&quot; in popup window" alt="Open &quot;Power Supplies&quot; in popup window" class="MCXref_0">Power Supplies</a> for options). If your board has a power switch, make sure it is switched on and the power indicator is lit. If you are using a 9V battery, try a fresh one. If you are using a battery pack, make sure the batteries are all inserted into the pack correctly; try fresh batteries. If you are using a wall-mount supply, make sure the wall outlet is not turned off at a wall switch. If you have a voltmeter, use it to measure the voltage supplied by the battery pack or wall-mount to rule out defective power supply hardware.</span></span>
</li>
<li class="Checklist" value="4"><span class="MCExpanding"><a href="javascript:void(0);" class="MCExpandingHead_0" onclick="FMCExpand( this ); return false;">Software version<img style="border: none;margin-left: 5px;" src="../SkinSupport/ExpandingClosed.gif" MadCap:altsrc="../SkinSupport/ExpandingOpen.gif" onload="if ( typeof( FMCPreloadImage ) == 'function' ) { FMCPreloadImage( '../SkinSupport/ExpandingOpen.gif' ); }" class="MCExpandingIcon" /></a><span class="MCExpandingBody" style="display: none;">: Make sure you are using the latest version of the BASIC Stamp Editor Software. You may check for a later version at <a href="http://www.parallax.com/basicstampsoftware" target="_blank" title="Open website in new window" alt="Open website in new window">www.parallax.com/basicstampsoftware</a>.</span></span>
</li>
<li class="Checklist" value="5"><span class="MCExpanding"><a href="javascript:void(0);" class="MCExpandingHead_0" onclick="FMCExpand( this ); return false;">USB drivers<img style="border: none;margin-left: 5px;" src="../SkinSupport/ExpandingClosed.gif" MadCap:altsrc="../SkinSupport/ExpandingOpen.gif" onload="if ( typeof( FMCPreloadImage ) == 'function' ) { FMCPreloadImage( '../SkinSupport/ExpandingOpen.gif' ); }" class="MCExpandingIcon" /></a><span class="MCExpandingBody" style="display: none;">: If you are using a Parallax USB connection, you may need to update your USB drivers. See the <a href="USBdrivers.htm" target="" title="" alt="" class="MCXref_0">USB Drivers</a> page for help.</span></span>
</li>
<li class="Checklist" value="6"><span class="MCExpanding"><a href="javascript:void(0);" class="MCExpandingHead_0" onclick="FMCExpand( this ); return false;">USB ports freeze after disconnecting from USB&#160;3.0 port: <img style="border: none;margin-left: 5px;" src="../SkinSupport/ExpandingClosed.gif" MadCap:altsrc="../SkinSupport/ExpandingOpen.gif" onload="if ( typeof( FMCPreloadImage ) == 'function' ) { FMCPreloadImage( '../SkinSupport/ExpandingOpen.gif' ); }" class="MCExpandingIcon" /></a><span class="MCExpandingBody" style="display: none;">USB 2.0 ports are recommended for BASIC Stamp boards. On some computers, the internal USB hub will freeze when disconnecting a USB 2.0 device from a USB 3.0 port. This may cause all USB ports on the computer to become unresponsive, requiring a reboot of the computer to remedy the situation. System updates from your computer manufacturer may correct the problem.USB 3.0 ports can sometimes be identified by a blue tab inside the socket.<br /><img src="../Resources/Images/USB_3_258x115.jpg" title="USB 3.0 ports have a blue tab inside." alt="USB 3.0 ports have a blue tab inside." style="padding-top: 5px;width: 258;height: 115;" /></span></span>
</li>
<li class="Checklist" value="7">
<p><span class="MCExpanding"><a href="javascript:void(0);" class="MCExpandingHead_0" onclick="FMCExpand( this ); return false;">Beware of non-Parallax USB&#160;to Serial Adapters<img style="border: none;margin-left: 5px;" src="../SkinSupport/ExpandingClosed.gif" MadCap:altsrc="../SkinSupport/ExpandingOpen.gif" onload="if ( typeof( FMCPreloadImage ) == 'function' ) { FMCPreloadImage( '../SkinSupport/ExpandingOpen.gif' ); }" class="MCExpandingIcon" /></a><span class="MCExpandingBody" style="display: none;">: Not every brand of USB&#160;to Serial Adapter supports the timing precision needed for BASIC Stamp programming. Some known-incompatible brands are Belkin and Gigaware. Keyspan #USA19-HS is known to be compatible. You can order an inexpensive Parallax USB to Serial Adapter (#28030) from <a href="http://www.parallax.com/" target="_blank" title="Open website in new window" alt="Open website in new window">www.parallax.com</a>.</span></span>
</p>
</li>
</ul>
<ul>
<li class="Checklist" value="1">If you have not done so already, try the <a href="RunIdTest.htm" target="" title="" alt="" class="MCXref_0">Run/Identify Test</a>. </li>
<li class="Checklist" value="2">If you are using other terminal software to communicate with your BASIC Stamp, such as StampPlot, Parallax Serial Terminal, or Hyperterminal, it may be holding the port open. Disconnect the port in the terminal software.</li>
<li class="Checklist" value="3">If you are using a USB connection, try adjusting your computer's <a href="LatencyTimer.htm" target="" title="" alt="" class="MCXref_0">Latency Timer Settings</a>.</li>
<li class="Checklist" value="4">If none of these things helped, <a href="../HomeTopics/Resources.htm#Contact_Parallax" target="" title="" alt="" class="MCXref_0">Contact Parallax</a> Tech Support for assistance.</li>
</ul>
<div class="Col2">
<div class="MasterFoot">
<p MadCap:conditions="BSEconditions.BSEWebHelp (Primary)-INCLUDE"><a href="../HomeTopics/HomePage.htm">Go to Welcome page</a>
</p>
</div>
</div>
<div class="Col2">
<div class="MasterFoot">
<p style="text-align: right;"><span class="ContactInfoProjectName">BASIC Stamp Help</span> <![CDATA[ ]]><span class="ContactInfoVersion#">Version 2.5.4</span> <![CDATA[ ]]></p>
<p style="text-align: right;">Copyright ©&#160;<span class="ContactInfoCompanyName">Parallax Inc.</span></p>
<p style="text-align: right;"><span class="SystemShortDate">8/8/2012</span>
</p>
</div>
</div>
<script type="text/javascript">/* <![CDATA[ */
var _gaq = _gaq || [];
_gaq.push(['_setAccount', 'UA-285614-1']);
_gaq.push(['_trackPageview']);
(function() {
var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
})();
/* ]]> */</script>
<script type="text/javascript" src="../SkinSupport/MadCapBodyEnd.js">
</script>
</body>
</html>
@@ -0,0 +1,110 @@
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns:MadCap="http://www.madcapsoftware.com/Schemas/MadCap.xsd" MadCap:lastBlockDepth="6" MadCap:lastHeight="94" MadCap:lastWidth="853" MadCap:disableMasterStylesheet="true" MadCap:tocPath="" MadCap:InPreviewMode="false" MadCap:PreloadImages="false" MadCap:RuntimeFileType="Topic" MadCap:TargetType="WebHelp" lang="en-us" xml:lang="en-us" MadCap:PathToHelpSystem="../../" MadCap:HelpSystemFileName="Default.xml" MadCap:SearchType="Stem">
<head><title>No Device Type </title>
<link href="../SkinSupport/MadCap.css" rel="stylesheet" />
<link href="../Resources/Stylesheets/BSE_Help.css" rel="stylesheet" />
<script src="../SkinSupport/MadCapAll.js">
</script>
</head>
<body>
<h1>No Device Type </h1>
<p class="PlainText">Before you do anything else....</p>
<div class="MCDropDown">
<div class="MCDropDownHead_0"><a class="MCDropDownHotSpot_0" href="javascript:void(0);" id="MCDropDownHotSpot_68678683_0" onclick="FMCDropDown( this ); return false;"><img style="border: none;margin-right: 2px;" src="../SkinSupport/DropDownClosed.gif" MadCap:altsrc="../SkinSupport/DropDownOpen.gif" onload="if ( typeof( FMCPreloadImage ) == 'function' ) { FMCPreloadImage( '../SkinSupport/DropDownOpen.gif' ); }" class="MCDropDownIcon" />Consider The Common Quick Fixes</a>
</div>
<div class="MCDropDownBody" id="MCDropDownBody_68678683_0" style="display: none;">
<ul>
<li class="Checklist" value="1"><span class="MCExpanding"><a href="javascript:void(0);" class="MCExpandingHead_0" onclick="FMCExpand( this ); return false;">Loose connections<img style="border: none;margin-left: 5px;" src="../SkinSupport/ExpandingClosed.gif" MadCap:altsrc="../SkinSupport/ExpandingOpen.gif" onload="if ( typeof( FMCPreloadImage ) == 'function' ) { FMCPreloadImage( '../SkinSupport/ExpandingOpen.gif' ); }" class="MCExpandingIcon" /></a><span class="MCExpandingBody" style="display: none;">: Double-check the connections between your computer and your programming cable, the Parallax USB&#160;to Serial Adapter if you are using one, and the development board.</span></span>
</li>
<li class="Checklist" value="2"><span class="MCExpanding"><a href="javascript:void(0);" class="MCExpandingHead_0" onclick="FMCExpand( this ); return false;">Misconnected BASIC Stamp<img style="border: none;margin-left: 5px;" src="../SkinSupport/ExpandingClosed.gif" MadCap:altsrc="../SkinSupport/ExpandingOpen.gif" onload="if ( typeof( FMCPreloadImage ) == 'function' ) { FMCPreloadImage( '../SkinSupport/ExpandingOpen.gif' ); }" class="MCExpandingIcon" /></a><span class="MCExpandingBody" style="display: none;">: If you are using a Board of Education, double-check how to <span class="MCPopup"><a href="javascript:void(0);" MadCap:src="InsertBS2popup.htm" onclick="FMCPopup( event, this ); return false;" class="MCXref_0" alt="Open in popup window" title="Open in popup window">Insert the BASIC Stamp module</a></span> in its socket.</span></span>
</li>
<li class="Checklist" value="3"><span class="MCExpanding"><a href="javascript:void(0);" class="MCExpandingHead_0" onclick="FMCExpand( this ); return false;">No power<img style="border: none;margin-left: 5px;" src="../SkinSupport/ExpandingClosed.gif" MadCap:altsrc="../SkinSupport/ExpandingOpen.gif" onload="if ( typeof( FMCPreloadImage ) == 'function' ) { FMCPreloadImage( '../SkinSupport/ExpandingOpen.gif' ); }" class="MCExpandingIcon" /></a><span class="MCExpandingBody" style="display: none;">: double-check the power supply that you have connected to your board. (See <a href="PowerSupplies.htm" target="" title="Open &quot;Power Supplies&quot; in popup window" alt="Open &quot;Power Supplies&quot; in popup window" class="MCXref_0">Power Supplies</a> for options). If your board has a power switch, make sure it is switched on and the power indicator is lit. If you are using a 9V battery, try a fresh one. If you are using a battery pack, make sure the batteries are all inserted into the pack correctly; try fresh batteries. If you are using a wall-mount supply, make sure the wall outlet is not turned off at a wall switch. If you have a voltmeter, use it to measure the voltage supplied by the battery pack or wall-mount to rule out defective power supply hardware.</span></span>
</li>
<li class="Checklist" value="4"><span class="MCExpanding"><a href="javascript:void(0);" class="MCExpandingHead_0" onclick="FMCExpand( this ); return false;">Software version<img style="border: none;margin-left: 5px;" src="../SkinSupport/ExpandingClosed.gif" MadCap:altsrc="../SkinSupport/ExpandingOpen.gif" onload="if ( typeof( FMCPreloadImage ) == 'function' ) { FMCPreloadImage( '../SkinSupport/ExpandingOpen.gif' ); }" class="MCExpandingIcon" /></a><span class="MCExpandingBody" style="display: none;">: Make sure you are using the latest version of the BASIC Stamp Editor Software. You may check for a later version at <a href="http://www.parallax.com/basicstampsoftware" target="_blank" title="Open website in new window" alt="Open website in new window">www.parallax.com/basicstampsoftware</a>.</span></span>
</li>
<li class="Checklist" value="5"><span class="MCExpanding"><a href="javascript:void(0);" class="MCExpandingHead_0" onclick="FMCExpand( this ); return false;">USB drivers<img style="border: none;margin-left: 5px;" src="../SkinSupport/ExpandingClosed.gif" MadCap:altsrc="../SkinSupport/ExpandingOpen.gif" onload="if ( typeof( FMCPreloadImage ) == 'function' ) { FMCPreloadImage( '../SkinSupport/ExpandingOpen.gif' ); }" class="MCExpandingIcon" /></a><span class="MCExpandingBody" style="display: none;">: If you are using a Parallax USB connection, you may need to update your USB drivers. See the <a href="USBdrivers.htm" target="" title="" alt="" class="MCXref_0">USB Drivers</a> page for help.</span></span>
</li>
<li class="Checklist" value="6"><span class="MCExpanding"><a href="javascript:void(0);" class="MCExpandingHead_0" onclick="FMCExpand( this ); return false;">USB ports freeze after disconnecting from USB&#160;3.0 port: <img style="border: none;margin-left: 5px;" src="../SkinSupport/ExpandingClosed.gif" MadCap:altsrc="../SkinSupport/ExpandingOpen.gif" onload="if ( typeof( FMCPreloadImage ) == 'function' ) { FMCPreloadImage( '../SkinSupport/ExpandingOpen.gif' ); }" class="MCExpandingIcon" /></a><span class="MCExpandingBody" style="display: none;">USB 2.0 ports are recommended for BASIC Stamp boards. On some computers, the internal USB hub will freeze when disconnecting a USB 2.0 device from a USB 3.0 port. This may cause all USB ports on the computer to become unresponsive, requiring a reboot of the computer to remedy the situation. System updates from your computer manufacturer may correct the problem.USB 3.0 ports can sometimes be identified by a blue tab inside the socket.<br /><img src="../Resources/Images/USB_3_258x115.jpg" title="USB 3.0 ports have a blue tab inside." alt="USB 3.0 ports have a blue tab inside." style="padding-top: 5px;width: 258;height: 115;" /></span></span>
</li>
<li class="Checklist" value="7">
<p><span class="MCExpanding"><a href="javascript:void(0);" class="MCExpandingHead_0" onclick="FMCExpand( this ); return false;">Beware of non-Parallax USB&#160;to Serial Adapters<img style="border: none;margin-left: 5px;" src="../SkinSupport/ExpandingClosed.gif" MadCap:altsrc="../SkinSupport/ExpandingOpen.gif" onload="if ( typeof( FMCPreloadImage ) == 'function' ) { FMCPreloadImage( '../SkinSupport/ExpandingOpen.gif' ); }" class="MCExpandingIcon" /></a><span class="MCExpandingBody" style="display: none;">: Not every brand of USB&#160;to Serial Adapter supports the timing precision needed for BASIC Stamp programming. Some known-incompatible brands are Belkin and Gigaware. Keyspan #USA19-HS is known to be compatible. You can order an inexpensive Parallax USB to Serial Adapter (#28030) from <a href="http://www.parallax.com/" target="_blank" title="Open website in new window" alt="Open website in new window">www.parallax.com</a>.</span></span>
</p>
</li>
</ul>
</div>
</div>
<p>&#160;</p>
<p>If the Run/Identify test shows no entry in the "Device Type" column, you can try these various fixes based on your Loopback and Echo results.</p>
<p>&#160;</p>
<h3>There is a "No" in Loopback, and "No" in Echo.</h3>
<p>
<img src="../Resources/Images/IDnone.png">
</img>
</p>
<ul>
<li class="Checklist" value="1">If you are using a Parallax USB&#160;connection, the USB&#160;port may be using the wrong drivers. Go to the <a href="USBdrivers.htm" target="" title="" alt="" class="MCXref_0">USB Drivers</a> page for help. </li>
<li class="Checklist" value="2">If you are using a serial connection, your serial cable may be at fault. You must use a standard straight-through serial cable, not a null modem or cross-over cable. If you have a multimeter, perform a continuity test of each pin to confirm you are using an undamaged standard straight-through serial cable.</li>
</ul>
<p>&#160;</p>
<h3>There is a "Yes" in Loopback and "Yes" in Echo:</h3>
<p>
<img src="../Resources/Images/IDnoDevice.png">
</img>
</p>
<ul>
<li class="Checklist" value="1">If you are using a USB&#160;connection, try adjusting the COM port's <a href="LatencyTimer.htm" target="" title="" alt="" class="MCXref_0">Latency Timer Settings</a>.</li>
<li class="Checklist" value="2">If you are using a serial connection, try adjusting the COM port's <a href="FIFObuffers.htm" target="" title="" alt="" class="MCXref_0">FIFO Buffer Settings</a>. </li>
<li class="Checklist" value="3">It is possible that your BASIC Stamp module has been damaged. Please <a href="../HomeTopics/Resources.htm#Contact_Parallax" target="" title="" alt="" class="MCXref_0">Contact Parallax</a> Tech Support.</li>
</ul>
<p>&#160;</p>
<h3>There is a "Yes" in Loopback and a "No"&#160;in Echo:</h3>
<p>
<img src="../Resources/Images/IDyesNo.png">
</img>
</p>
<ul>
<li class="Checklist" value="1">If you have forgotten to install the BASIC Stamp into its socket on the Board of Education, or you may have plugged it in upside-down, review the directions on how to <span class="MCPopup"><a href="javascript:void(0);" MadCap:src="InsertBS2popup.htm" onclick="FMCPopup( event, this ); return false;" class="MCXref_0" alt="Open the popup window" title="Open the popup window">Insert the BASIC Stamp module</a></span>.</li>
<li class="Checklist" value="2">If you are using a USB&#160;connection, try adjusting the COM port's <a href="LatencyTimer.htm" target="" title="" alt="" class="MCXref_0">Latency Timer Settings</a>.</li>
</ul>
<p>&#160;</p>
<h3>There is a "No" in Loopback and a "Yes" in Echo:</h3>
<p>
<img src="../Resources/Images/IDnoYes.png">
</img>
</p>
<ul>
<li class="Checklist" value="1">If you are using a USB&#160;connection, try adjusting the COM port's <a href="LatencyTimer.htm" target="" title="" alt="" class="MCXref_0">Latency Timer Settings</a>. <![CDATA[ ]]></li>
<li class="Checklist" value="2">If you are using a serial connection, your serial cable may be at fault. You must use a standard straight-through serial cable, not a null modem or cross-over cable. If you have a multimeter, perform a continuity test of each pin to confirm you are using an undamaged standard straight-through serial cable.</li>
</ul>
<div class="Col2">
<div class="MasterFoot">
<p MadCap:conditions="BSEconditions.BSEWebHelp (Primary)-INCLUDE"><a href="../HomeTopics/HomePage.htm">Go to Welcome page</a>
</p>
</div>
</div>
<div class="Col2">
<div class="MasterFoot">
<p style="text-align: right;"><span class="ContactInfoProjectName">BASIC Stamp Help</span> <![CDATA[ ]]><span class="ContactInfoVersion#">Version 2.5.4</span> <![CDATA[ ]]></p>
<p style="text-align: right;">Copyright ©&#160;<span class="ContactInfoCompanyName">Parallax Inc.</span></p>
<p style="text-align: right;"><span class="SystemShortDate">8/8/2012</span>
</p>
</div>
</div>
<script type="text/javascript">/* <![CDATA[ */
var _gaq = _gaq || [];
_gaq.push(['_setAccount', 'UA-285614-1']);
_gaq.push(['_trackPageview']);
(function() {
var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
})();
/* ]]> */</script>
<script type="text/javascript" src="../SkinSupport/MadCapBodyEnd.js">
</script>
</body>
</html>
@@ -0,0 +1,90 @@
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns:MadCap="http://www.madcapsoftware.com/Schemas/MadCap.xsd" MadCap:lastBlockDepth="6" MadCap:lastHeight="94" MadCap:lastWidth="853" MadCap:disableMasterStylesheet="true" MadCap:tocPath="" MadCap:InPreviewMode="false" MadCap:PreloadImages="false" MadCap:RuntimeFileType="Topic" MadCap:TargetType="WebHelp" lang="en-us" xml:lang="en-us" MadCap:PathToHelpSystem="../../" MadCap:HelpSystemFileName="Default.xml" MadCap:SearchType="Stem">
<head><title>No Usable Serial Ports Found</title>
<link href="../SkinSupport/MadCap.css" rel="stylesheet" />
<link href="../Resources/Stylesheets/BSE_Help.css" rel="stylesheet" />
<script src="../SkinSupport/MadCapAll.js">
</script>
</head>
<body>
<h1>No Usable Serial Ports Found</h1>
<p class="PlainText">If you see the error message shown below, the ports may have been excluded from the BASIC Stamp Editor's search, or the ports may have been disabled in your computer's Device Manager. You can check for both situations following the instructions below.</p>
<p>
<img src="../Resources/Images/NoSerialPorts.png" />
</p>
<h2>The ports may have been excluded from the BASIC Stamp Editor's search </h2>
<p class="PlainText">(See the <a href="SerialPortSearch.htm" target="" title="" alt="" class="MCXref_0">Serial Port Search List</a> page for complete details about this feature.) </p>
<ul style="list-style-type: circle;">
<li class="Checklist" value="1">Click the Edit Ports button </li>
</ul>
<p class="PlainTextIndent">
<img src="../Resources/Images/EditPortsButton.png" />
</p>
<ul style="list-style-type: circle;">
<li class="Checklist" value="1"> Look for "<i>Communications Port</i>" or "<i>USB&#160;Serial Port</i>" in italics, with a "Yes" in the Present column. Ports that are present but have been excluded from the BASIC Stamp Editor's Serial Port Search List will appear in italics in the list. (Note that Bluetooth communications ports are excluded by default.) </li>
<li class="Checklist" value="2">Right-click that port and select "Re-Include Port" and then click Accept.</li>
</ul>
<p class="PlainTextIndent">
<img src="../Resources/Images/ReIncludePort.png" />
</p>
<h2>The port may have been disabled in your computer's Device Manager</h2>
<ul style="list-style-type: circle;">
<li class="Checklist" value="1">Right click the port in your computer's Ports list (it will be labeled "Communications Port" with a serial connection, or "USB Serial Port"&#160;with a USB&#160;connection)</li>
<li class="Checklist" value="2">Click Enable.</li>
</ul>
<p class="PlainTextIndent">
<div class="MCDropDown">
<div class="MCDropDownHead_0"><a class="MCDropDownHotSpot_0" href="javascript:void(0);" id="MCDropDownHotSpot_2011693069_0" onclick="FMCDropDown( this ); return false;"><img style="border: none;margin-right: 2px;" src="../SkinSupport/DropDownClosed.gif" MadCap:altsrc="../SkinSupport/DropDownOpen.gif" onload="if ( typeof( FMCPreloadImage ) == 'function' ) { FMCPreloadImage( '../SkinSupport/DropDownOpen.gif' ); }" class="MCDropDownIcon" />Finding your Ports List in your computer's Device Manager</a>
</div>
<div class="MCDropDownBody" id="MCDropDownBody_2011693069_0" style="display: none;">
<ul style="list-style-type: circle;">
<li value="1"><span class="MCExpanding"><a href="javascript:void(0);" class="MCExpandingHead_0" onclick="FMCExpand( this ); return false;">Windows 2K<img style="border: none;margin-left: 5px;" src="../SkinSupport/ExpandingClosed.gif" MadCap:altsrc="../SkinSupport/ExpandingOpen.gif" onload="if ( typeof( FMCPreloadImage ) == 'function' ) { FMCPreloadImage( '../SkinSupport/ExpandingOpen.gif' ); }" class="MCExpandingIcon" /></a><span class="MCExpandingBody" style="display: none;">: Start Menu &gt; Settings &gt; Control Panel &gt; System &gt; click Hardware Tab &gt; Device Manager... &gt; expand Ports (COM &amp;&#160;LPT)</span></span>
</li>
<li value="2"><span class="MCExpanding"><a href="javascript:void(0);" class="MCExpandingHead_0" onclick="FMCExpand( this ); return false;">Windows XP<img style="border: none;margin-left: 5px;" src="../SkinSupport/ExpandingClosed.gif" MadCap:altsrc="../SkinSupport/ExpandingOpen.gif" onload="if ( typeof( FMCPreloadImage ) == 'function' ) { FMCPreloadImage( '../SkinSupport/ExpandingOpen.gif' ); }" class="MCExpandingIcon" /></a><span class="MCExpandingBody" style="display: none;">: Start Menu &gt; right-click My Computer &gt; Properties &gt; click Hardware Tab &gt; Device Manager &gt; expand Ports (COM &amp;&#160;LPT)</span></span>
</li>
<li value="3"><span class="MCExpanding"><a href="javascript:void(0);" class="MCExpandingHead_0" onclick="FMCExpand( this ); return false;">Windows Vista or Windows 7<img style="border: none;margin-left: 5px;" src="../SkinSupport/ExpandingClosed.gif" MadCap:altsrc="../SkinSupport/ExpandingOpen.gif" onload="if ( typeof( FMCPreloadImage ) == 'function' ) { FMCPreloadImage( '../SkinSupport/ExpandingOpen.gif' ); }" class="MCExpandingIcon" /></a><span class="MCExpandingBody" style="display: none;">: Start Menu (Windows icon) &gt; right-click Computer &gt; Properties &gt; Device Manager (left pane) &gt; expand Ports (COM &amp;&#160;LPT)</span></span>
</li>
</ul>
</div>
</div>
</p>
<p>&#160;</p>
<p class="PlainTextIndent">
<img src="../Resources/Images/EnablePort.png" />
</p>
<h2>If the error persists...</h2>
<ul>
<li class="Checklist" value="1">If this did not help, <a href="../HomeTopics/Resources.htm#Contact_Parallax" target="" title="" alt="" class="MCXref_0">Contact Parallax</a> Tech Support for assistance.</li>
</ul>
<div class="Col2">
<div class="MasterFoot">
<p MadCap:conditions="BSEconditions.BSEWebHelp (Primary)-INCLUDE"><a href="../HomeTopics/HomePage.htm">Go to Welcome page</a>
</p>
</div>
</div>
<div class="Col2">
<div class="MasterFoot">
<p style="text-align: right;"><span class="ContactInfoProjectName">BASIC Stamp Help</span> <![CDATA[ ]]><span class="ContactInfoVersion#">Version 2.5.4</span> <![CDATA[ ]]></p>
<p style="text-align: right;">Copyright ©&#160;<span class="ContactInfoCompanyName">Parallax Inc.</span></p>
<p style="text-align: right;"><span class="SystemShortDate">8/8/2012</span>
</p>
</div>
</div>
<script type="text/javascript">/* <![CDATA[ */
var _gaq = _gaq || [];
_gaq.push(['_setAccount', 'UA-285614-1']);
_gaq.push(['_trackPageview']);
(function() {
var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
})();
/* ]]> */</script>
<script type="text/javascript" src="../SkinSupport/MadCapBodyEnd.js">
</script>
</body>
</html>
@@ -0,0 +1,90 @@
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns:MadCap="http://www.madcapsoftware.com/Schemas/MadCap.xsd" MadCap:lastBlockDepth="6" MadCap:lastHeight="94" MadCap:lastWidth="853" MadCap:disableMasterStylesheet="true" MadCap:tocPath="" MadCap:InPreviewMode="false" MadCap:PreloadImages="false" MadCap:RuntimeFileType="Topic" MadCap:TargetType="WebHelp" lang="en-us" xml:lang="en-us" MadCap:PathToHelpSystem="../../" MadCap:HelpSystemFileName="Default.xml" MadCap:SearchType="Stem">
<head><title>Can't open port; in use</title>
<link href="../SkinSupport/MadCap.css" rel="stylesheet" />
<link href="../Resources/Stylesheets/BSE_Help.css" rel="stylesheet" />
<script src="../SkinSupport/MadCapAll.js">
</script>
</head>
<body>
<h1>Can't open port; in use</h1>
<p class="PlainText">If you see this message, there is likely to be some other software that has used that port previously, and is now interfering.</p>
<p>
<img src="../Resources/Images/CantOpenPort.png" />
</p>
<h2>Serial Terminal Software</h2>
<ul style="list-style-type: circle;">
<li class="Checklist" value="1">If you are using other terminal software to communicate with your BASIC Stamp, such as StampPlot, Parallax Serial Terminal, or Hyperterminal, it may be holding the port open. Disconnect the port in the terminal software.</li>
</ul>
<h2>Devices with Automatic Synchronization Software</h2>
<p class="PlainText">If you have used a device such as a PDA with this computer, the device's software (such as Weatherbug or HotSync software) may be holding the port open. </p>
<ul>
<li class="Checklist" value="1">Check your computer's system tray to see if the device's software is enabled, and disable it temporarily.</li>
<li class="Checklist" value="2">If disabling the software in the above step did not release the COM&#160;port, you may need to uninstall and reinstall the COM&#160;port (sounds scary but it isn't really). </li>
</ul>
<div class="ListIndent">
<ul style="list-style-type: circle;">
<li value="1">Unplug your programming cable from your computer.</li>
<li value="2">Open your Ports list and right-click on the port you want to uninstall.</li>
</ul>
<div class="MCDropDown">
<div class="MCDropDownHead_0"><a class="MCDropDownHotSpot_0" href="javascript:void(0);" id="MCDropDownHotSpot_671848068_0" onclick="FMCDropDown( this ); return false;"><img style="border: none;margin-right: 2px;" src="../SkinSupport/DropDownClosed.gif" MadCap:altsrc="../SkinSupport/DropDownOpen.gif" onload="if ( typeof( FMCPreloadImage ) == 'function' ) { FMCPreloadImage( '../SkinSupport/DropDownOpen.gif' ); }" class="MCDropDownIcon" />Finding your Ports List in your computer's Device Manager</a>
</div>
<div class="MCDropDownBody" id="MCDropDownBody_671848068_0" style="display: none;">
<ul style="list-style-type: circle;">
<li value="1"><span class="MCExpanding"><a href="javascript:void(0);" class="MCExpandingHead_0" onclick="FMCExpand( this ); return false;">Windows 2K<img style="border: none;margin-left: 5px;" src="../SkinSupport/ExpandingClosed.gif" MadCap:altsrc="../SkinSupport/ExpandingOpen.gif" onload="if ( typeof( FMCPreloadImage ) == 'function' ) { FMCPreloadImage( '../SkinSupport/ExpandingOpen.gif' ); }" class="MCExpandingIcon" /></a><span class="MCExpandingBody" style="display: none;">: Start Menu &gt; Settings &gt; Control Panel &gt; System &gt; click Hardware Tab &gt; Device Manager... &gt; expand Ports (COM &amp;&#160;LPT)</span></span>
</li>
<li value="2"><span class="MCExpanding"><a href="javascript:void(0);" class="MCExpandingHead_0" onclick="FMCExpand( this ); return false;">Windows XP<img style="border: none;margin-left: 5px;" src="../SkinSupport/ExpandingClosed.gif" MadCap:altsrc="../SkinSupport/ExpandingOpen.gif" onload="if ( typeof( FMCPreloadImage ) == 'function' ) { FMCPreloadImage( '../SkinSupport/ExpandingOpen.gif' ); }" class="MCExpandingIcon" /></a><span class="MCExpandingBody" style="display: none;">: Start Menu &gt; right-click My Computer &gt; Properties &gt; click Hardware Tab &gt; Device Manager &gt; expand Ports (COM &amp;&#160;LPT)</span></span>
</li>
<li value="3"><span class="MCExpanding"><a href="javascript:void(0);" class="MCExpandingHead_0" onclick="FMCExpand( this ); return false;">Windows Vista or Windows 7<img style="border: none;margin-left: 5px;" src="../SkinSupport/ExpandingClosed.gif" MadCap:altsrc="../SkinSupport/ExpandingOpen.gif" onload="if ( typeof( FMCPreloadImage ) == 'function' ) { FMCPreloadImage( '../SkinSupport/ExpandingOpen.gif' ); }" class="MCExpandingIcon" /></a><span class="MCExpandingBody" style="display: none;">: Start Menu (Windows icon) &gt; right-click Computer &gt; Properties &gt; Device Manager (left pane) &gt; expand Ports (COM &amp;&#160;LPT)</span></span>
</li>
</ul>
</div>
</div>
<p>&#160;</p>
<p>
<img src="../Resources/Images/ComUninstall.png">
</img>
</p>
<ul style="list-style-type: circle;">
<li value="1">Select Uninstall.</li>
<li value="2">Restart your computer.</li>
<li value="3">Reconnect your hardware and try the <a href="RunIdTest.htm" target="" title="" alt="" class="MCXref_0">Run/Identify Test</a> again.</li>
</ul>
</div>
<h2>If the error persists...</h2>
<ul style="list-style-type: circle;">
<li class="Checklist" value="1">If this did not help, <a href="../HomeTopics/Resources.htm#Contact_Parallax" target="" title="" alt="" class="MCXref_0">Contact Parallax</a> Tech Support for assistance.</li>
</ul>
<div class="Col2">
<div class="MasterFoot">
<p MadCap:conditions="BSEconditions.BSEWebHelp (Primary)-INCLUDE"><a href="../HomeTopics/HomePage.htm">Go to Welcome page</a>
</p>
</div>
</div>
<div class="Col2">
<div class="MasterFoot">
<p style="text-align: right;"><span class="ContactInfoProjectName">BASIC Stamp Help</span> <![CDATA[ ]]><span class="ContactInfoVersion#">Version 2.5.4</span> <![CDATA[ ]]></p>
<p style="text-align: right;">Copyright ©&#160;<span class="ContactInfoCompanyName">Parallax Inc.</span></p>
<p style="text-align: right;"><span class="SystemShortDate">8/8/2012</span>
</p>
</div>
</div>
<script type="text/javascript">/* <![CDATA[ */
var _gaq = _gaq || [];
_gaq.push(['_setAccount', 'UA-285614-1']);
_gaq.push(['_trackPageview']);
(function() {
var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
})();
/* ]]> */</script>
<script type="text/javascript" src="../SkinSupport/MadCapBodyEnd.js">
</script>
</body>
</html>
@@ -0,0 +1,97 @@
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns:MadCap="http://www.madcapsoftware.com/Schemas/MadCap.xsd" MadCap:lastBlockDepth="6" MadCap:lastHeight="94" MadCap:lastWidth="853" MadCap:disableMasterStylesheet="true" MadCap:tocPath="BASIC Stamp Hardware" MadCap:InPreviewMode="false" MadCap:PreloadImages="false" MadCap:RuntimeFileType="Topic" MadCap:TargetType="WebHelp" lang="en-us" xml:lang="en-us" MadCap:PathToHelpSystem="../../" MadCap:HelpSystemFileName="Default.xml" MadCap:SearchType="Stem">
<head><title>Power Supplies</title>
<link href="../SkinSupport/MadCap.css" rel="stylesheet" />
<link href="../Resources/Stylesheets/BSE_Help.css" rel="stylesheet" />
<script src="../SkinSupport/MadCapAll.js" type="text/javascript">
</script>
</head>
<body>
<div class="MCBreadcrumbsBox_0"><span class="MCBreadcrumbsPrefix">You are here: </span><a class="MCBreadcrumbsLink" href="../HardwareTopics/BS_Chart.htm">BASIC Stamp Hardware</a><span class="MCBreadcrumbsDivider"> &gt; </span><span class="MCBreadcrumbs">Power Supplies</span>
</div>
<h1>Power Supplies</h1>
<p>Parallax BASIC Stamp Development Boards may have either a barrel jack connector, 9 V battery clip connector, or both (as does the Board of Education.) This page gives options for both types of power connectors.</p>
<h2>For Boards with a Barrel Jack Connector <![CDATA[ ]]></h2>
<p class="PlainText">The two most common power supply options used with this connector are wall-mount DC power supply, and battery holders.</p>
<h3>Wall-mount DC Power Supplies</h3>
<ul style="list-style-type: circle;">
<li class="Checklist" value="1">Plug: it must have a 2.1 mm center-positive barrel plug. Look for this symbol, indicating the positive connection is in the center of the plug:</li>
</ul>
<p class="PlainTextIndent">
<img src="../Resources/Images/CenterPos.png" />
</p>
<ul style="list-style-type: circle;">
<li class="Checklist" value="1">Output current: wall-mount power supplies must have a DC (direct current) output. Look for a statement that indicates VDC output or uses this symbol: <img src="../Resources/Images/OutputDCsmall.png" style="font-weight: bold;" />. For example:</li>
</ul>
<div class="ListIndent">
<ul style="list-style-type: circle;">
<li value="1"><b>OUTPUT: 7.5 VDC 1000 mA</b>
</li>
<li value="2"><b>OUTPUT: 7.5 V</b>
<img src="../Resources/Images/OutputDCsmall.png" style="font-weight: bold;" /><b>1.4 A</b>
</li>
</ul>
</div>
<ul style="list-style-type: circle;">
<li class="Checklist" value="1">Output voltage: The power supply's output voltage must be compatible with the voltage rating on your board. For example, the Board of Education requires 6 to 9 VDC. </li>
<li class="Checklist" value="2">Input voltage and current: Wall-mount power supplies must be compatible with the frequency and amplitude of the AC power at the wall outlet you are using. This may vary depending on the country you live in. In the US and Canada, the input should be compatible with 120 VAC, 60 Hz.</li>
</ul>
<p class="PlainText">Parallax carries power supplies compatible with BASIC Stamp development boards. For example, the 7.5 V, 1 amp supply (#750-00009) is compatible with the Board of Education. </p>
<p class="PlainText">
<img src="../Resources/Images/7.5Vsupply.png" />
</p>
<h3>Battery Holders</h3>
<p>Like wall-mount supplies, battery holders must have a 2.1 mm center-positive plug. However, many battery holders don't have a symbol indicating whether or not the plug is center-positive. Use a voltmeter to test any battery holder of unknown origins. A 4 AA cell battery holder with a 2.1 mm center-positive plug is available from Parallax (#700-00038); this is the one included in the <a href="http://www.parallax.com/go/boebot" target="_blank" title="Open website in new window." alt="Open website in new window.">Boe-Bot Robot Kit</a>.</p>
<p>&#160;</p>
<p>
<img src="../Resources/Images/BattHolder.png" />
</p>
<h2>For Boards with Battery Clip Connector </h2>
<h3>9-Volt Batteries</h3>
<p class="PlainText">9 V Alkaline or rechargeable batteries with a snap-connector are fine. For best results, rechargeable batteries should be rated for 100 mAh (milliamp hours) or higher.</p>
<p class="PlainText">Not all chargers work with all types of batteries. Make sure your charger is recommended for the type of battery you are using. Follow all battery and charger instructions and caution statements.</p>
<h3>9 V Battery Extension</h3>
<p class="PlainText">The figure below shows a DC supply and a 9 V battery extension that can be used with battery clip connectors, such as the one on the BASIC Stamp HomeWork Board. Read the CAUTION&#160;statement below the picture.</p>
<p class="PlainText">
<img src="../Resources/Images/BattExtend.png" />
</p>
<h3> Beware of Universal Adapters and Reversed Supply Terminals!</h3>
<p class="PlainText">The picture below shows a common mistake that should be avoided with universal adapters. Many of these allow you to reverse the terminals on the 9 V battery extension. Although it cannot hurt the BASIC Stamp, Board of Education, or HomeWork Board, it can destroy a Parallax Standard Servo connected to Vin in a matter of seconds. The only system that can protect the servo from this mistake is a Board of Education that has a jumper between the servo ports, with that jumper set to Vdd.</p>
<p class="PlainText">
<img src="../Resources/Images/TipPolarity.png" />
</p>
<h3>Beware of "Battery Replacers"</h3>
<p class="PlainText">Many battery replacers are designed to supply appliances with low current draw. With current ratings in the neighborhood of 10 mA, their output capacities are insufficient for many of the activities in the Stamps in Class texts. For example, two LEDs connected to 220-ohm resistors draw a total of 14.5 mA, and that definitely won't work with a "battery replacer."</p>
<p class="PlainText"> Note: It's pretty easy to tell when a circuit is drawing more current than the supply can deliver because the Power LED&#160;on the Board of Education flickers and/or goes dim. On the HomeWork Board, the "Running" LED may flicker if the power drops low enough to cause the BASIC Stamp to reset and restart the program.</p>
<div class="Col2">
<div class="MasterFoot">
<p MadCap:conditions="BSEconditions.BSEWebHelp (Primary)-INCLUDE"><a href="../HomeTopics/HomePage.htm">Go to Welcome page</a>
</p>
</div>
</div>
<div class="Col2">
<div class="MasterFoot">
<p style="text-align: right;"><span class="ContactInfoProjectName">BASIC Stamp Help</span> <![CDATA[ ]]><span class="ContactInfoVersion#">Version 2.5.4</span> <![CDATA[ ]]></p>
<p style="text-align: right;">Copyright ©&#160;<span class="ContactInfoCompanyName">Parallax Inc.</span></p>
<p style="text-align: right;"><span class="SystemShortDate">8/8/2012</span>
</p>
</div>
</div>
<script type="text/javascript">/* <![CDATA[ */
var _gaq = _gaq || [];
_gaq.push(['_setAccount', 'UA-285614-1']);
_gaq.push(['_trackPageview']);
(function() {
var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
})();
/* ]]> */</script>
<script type="text/javascript" src="../SkinSupport/MadCapBodyEnd.js">
</script>
</body>
</html>
@@ -0,0 +1,67 @@
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns:MadCap="http://www.madcapsoftware.com/Schemas/MadCap.xsd" MadCap:lastBlockDepth="2" MadCap:lastHeight="47" MadCap:lastWidth="579" MadCap:disableMasterStylesheet="true" MadCap:tocPath="" MadCap:InPreviewMode="false" MadCap:PreloadImages="false" MadCap:RuntimeFileType="Topic" MadCap:TargetType="WebHelp" lang="en-us" xml:lang="en-us" class="TopicPopup" MadCap:PathToHelpSystem="../../" MadCap:HelpSystemFileName="Default.xml" MadCap:SearchType="Stem">
<head><title>Power Supplies</title>
<link href="../Resources/Stylesheets/BSE_Help.css" rel="stylesheet" />
<script src="../SkinSupport/MadCapAll.js" type="text/javascript">
</script>
</head>
<body>
<h1>Power Supplies</h1>
<p>Parallax BASIC Stamp Development Boards may have either a barrel jack connector, 9 V battery clip connector, or both (as does the Board of Education.) This page gives options for both types of power connectors.</p>
<h2>For Boards with a Barrel Jack Connector <![CDATA[ ]]></h2>
<p class="PlainText">The two most common power supply options used with this connector are wall-mount DC power supply, and battery holders.</p>
<h3>Wall-mount DC Power Supplies</h3>
<ul style="list-style-type: circle;">
<li class="Checklist" value="1">Plug: it must have a 2.1 mm center-positive barrel plug. Look for this symbol, indicating the positive connection is in the center of the plug:</li>
</ul>
<p class="PlainTextIndent">
<img src="../Resources/Images/CenterPos.png" />
</p>
<ul style="list-style-type: circle;">
<li class="Checklist" value="1">Output current: wall-mount power supplies must have a DC (direct current) output. Look for a statement that indicates VDC output or uses this symbol: <img src="../Resources/Images/OutputDCsmall.png" style="font-weight: bold;" />. For example:</li>
</ul>
<div class="ListIndent">
<ul style="list-style-type: circle;">
<li value="1"><b>OUTPUT: 7.5 VDC 1000 mA</b>
</li>
<li value="2"><b>OUTPUT: 7.5 V</b>
<img src="../Resources/Images/OutputDCsmall.png" style="font-weight: bold;" /><b>1.4 A</b>
</li>
</ul>
</div>
<ul style="list-style-type: circle;">
<li class="Checklist" value="1">Output voltage: The power supply's output voltage must be compatible with the voltage rating on your board. For example, the Board of Education requires 6 to 9 VDC. </li>
<li class="Checklist" value="2">Input voltage and current: Wall-mount power supplies must be compatible with the frequency and amplitude of the AC power at the wall outlet you are using. This may vary depending on the country you live in. In the US and Canada, the input should be compatible with 120 VAC, 60 Hz.</li>
</ul>
<p class="PlainText">Parallax carries power supplies compatible with BASIC Stamp development boards. For example, the 7.5 V, 1 amp supply (#750-00009) is compatible with the Board of Education. </p>
<p class="PlainText">
<img src="../Resources/Images/7.5Vsupply.png" />
</p>
<h3>Battery Holders</h3>
<p>Like wall-mount supplies, battery holders must have a 2.1 mm center-positive plug. However, many battery holders don't have a symbol indicating whether or not the plug is center-positive. Use a voltmeter to test any battery holder of unknown origins. A 4 AA cell battery holder with a 2.1 mm center-positive plug is available from Parallax (#700-00038); this is the one included in the <a href="http://www.parallax.com/go/boebot" target="_blank" title="Open website in new window." alt="Open website in new window.">Boe-Bot Robot Kit</a>.</p>
<p>&#160;</p>
<p>
<img src="../Resources/Images/BattHolder.png" />
</p>
<h2>For Boards with Battery Clip Connector </h2>
<h3>9-Volt Batteries</h3>
<p class="PlainText">9 V Alkaline or rechargeable batteries with a snap-connector are fine. For best results, rechargeable batteries should be rated for 100 mAh (milliamp hours) or higher.</p>
<p class="PlainText">Not all chargers work with all types of batteries. Make sure your charger is recommended for the type of battery you are using. Follow all battery and charger instructions and caution statements.</p>
<h3>9 V Battery Extension</h3>
<p class="PlainText">The figure below shows a DC supply and a 9 V battery extension that can be used with battery clip connectors, such as the one on the BASIC Stamp HomeWork Board. Read the CAUTION&#160;statement below the picture.</p>
<p class="PlainText">
<img src="../Resources/Images/BattExtend.png" />
</p>
<h3> Beware of Universal Adapters and Reversed Supply Terminals!</h3>
<p class="PlainText">The picture below shows a common mistake that should be avoided with universal adapters. Many of these allow you to reverse the terminals on the 9 V battery extension. Although it cannot hurt the BASIC Stamp, Board of Education, or HomeWork Board, it can destroy a Parallax Standard Servo connected to Vin in a matter of seconds. The only system that can protect the servo from this mistake is a Board of Education that has a jumper between the servo ports, with that jumper set to Vdd.</p>
<p class="PlainText">
<img src="../Resources/Images/TipPolarity.png" />
</p>
<h3>Beware of "Battery Replacers"</h3>
<p class="PlainText">Many battery replacers are designed to supply appliances with low current draw. With current ratings in the neighborhood of 10 mA, their output capacities are insufficient for many of the activities in the Stamps in Class texts. For example, two LEDs connected to 220-ohm resistors draw a total of 14.5 mA, and that definitely won't work with a "battery replacer."</p>
<p class="PlainText"> Note: It's pretty easy to tell when a circuit is drawing more current than the supply can deliver because the Power LED&#160;on the Board of Education flickers and/or goes dim. On the HomeWork Board, the "Running" LED may flicker if the power drops low enough to cause the BASIC Stamp to reset and restart the program.</p>
<script type="text/javascript" src="../SkinSupport/MadCapBodyEnd.js">
</script>
</body>
</html>
@@ -0,0 +1,123 @@
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns:MadCap="http://www.madcapsoftware.com/Schemas/MadCap.xsd" MadCap:lastBlockDepth="6" MadCap:lastHeight="94" MadCap:lastWidth="853" MadCap:disableMasterStylesheet="true" MadCap:tocPath="Connection Troubleshooting" MadCap:InPreviewMode="false" MadCap:PreloadImages="false" MadCap:RuntimeFileType="Topic" MadCap:TargetType="WebHelp" lang="en-us" xml:lang="en-us" MadCap:PathToHelpSystem="../../" MadCap:HelpSystemFileName="Default.xml" MadCap:SearchType="Stem">
<head><title>Run/Identify Test</title>
<link href="../SkinSupport/MadCap.css" rel="stylesheet" />
<link href="../Resources/Stylesheets/BSE_Help.css" rel="stylesheet" />
<script src="../SkinSupport/MadCapAll.js">
</script>
</head>
<body>
<div class="MCBreadcrumbsBox_0"><span class="MCBreadcrumbsPrefix">You are here: </span><a class="MCBreadcrumbsLink" href="TFAQ.htm">Connection Troubleshooting</a><span class="MCBreadcrumbsDivider"> &gt; </span><span class="MCBreadcrumbs">Run/Identify Test</span>
</div>
<h1>Run/Identify Test</h1>
<p class="PlainText">This page will help you troubleshoot problems found after trying the Run/Identify test to verify the programming connection between your computer and BASIC Stamp. You should have already tried the common quick fixes and the Run/Identify test.</p>
<div class="MCDropDown">
<div class="MCDropDownHead_0"><a class="MCDropDownHotSpot_0" href="javascript:void(0);" id="MCDropDownHotSpot_3311062465_0" onclick="FMCDropDown( this ); return false;"><img style="border: none;margin-right: 2px;" src="../SkinSupport/DropDownClosed.gif" MadCap:altsrc="../SkinSupport/DropDownOpen.gif" onload="if ( typeof( FMCPreloadImage ) == 'function' ) { FMCPreloadImage( '../SkinSupport/DropDownOpen.gif' ); }" class="MCDropDownIcon" />The Common Quick Fixes</a>
</div>
<div class="MCDropDownBody" id="MCDropDownBody_3311062465_0" style="display: none;">
<ul>
<li class="Checklist" value="1"><span class="MCExpanding"><a href="javascript:void(0);" class="MCExpandingHead_0" onclick="FMCExpand( this ); return false;">Loose connections<img style="border: none;margin-left: 5px;" src="../SkinSupport/ExpandingClosed.gif" MadCap:altsrc="../SkinSupport/ExpandingOpen.gif" onload="if ( typeof( FMCPreloadImage ) == 'function' ) { FMCPreloadImage( '../SkinSupport/ExpandingOpen.gif' ); }" class="MCExpandingIcon" /></a><span class="MCExpandingBody" style="display: none;">: Double-check the connections between your computer and your programming cable, the Parallax USB&#160;to Serial Adapter if you are using one, and the development board.</span></span>
</li>
<li class="Checklist" value="2"><span class="MCExpanding"><a href="javascript:void(0);" class="MCExpandingHead_0" onclick="FMCExpand( this ); return false;">Misconnected BASIC Stamp<img style="border: none;margin-left: 5px;" src="../SkinSupport/ExpandingClosed.gif" MadCap:altsrc="../SkinSupport/ExpandingOpen.gif" onload="if ( typeof( FMCPreloadImage ) == 'function' ) { FMCPreloadImage( '../SkinSupport/ExpandingOpen.gif' ); }" class="MCExpandingIcon" /></a><span class="MCExpandingBody" style="display: none;">: If you are using a Board of Education, double-check how to <span class="MCPopup"><a href="javascript:void(0);" MadCap:src="InsertBS2popup.htm" onclick="FMCPopup( event, this ); return false;" class="MCXref_0" alt="Open in popup window" title="Open in popup window">Insert the BASIC Stamp module</a></span> in its socket.</span></span>
</li>
<li class="Checklist" value="3"><span class="MCExpanding"><a href="javascript:void(0);" class="MCExpandingHead_0" onclick="FMCExpand( this ); return false;">No power<img style="border: none;margin-left: 5px;" src="../SkinSupport/ExpandingClosed.gif" MadCap:altsrc="../SkinSupport/ExpandingOpen.gif" onload="if ( typeof( FMCPreloadImage ) == 'function' ) { FMCPreloadImage( '../SkinSupport/ExpandingOpen.gif' ); }" class="MCExpandingIcon" /></a><span class="MCExpandingBody" style="display: none;">: double-check the power supply that you have connected to your board. (See <a href="PowerSupplies.htm" target="" title="Open &quot;Power Supplies&quot; in popup window" alt="Open &quot;Power Supplies&quot; in popup window" class="MCXref_0">Power Supplies</a> for options). If your board has a power switch, make sure it is switched on and the power indicator is lit. If you are using a 9V battery, try a fresh one. If you are using a battery pack, make sure the batteries are all inserted into the pack correctly; try fresh batteries. If you are using a wall-mount supply, make sure the wall outlet is not turned off at a wall switch. If you have a voltmeter, use it to measure the voltage supplied by the battery pack or wall-mount to rule out defective power supply hardware.</span></span>
</li>
<li class="Checklist" value="4"><span class="MCExpanding"><a href="javascript:void(0);" class="MCExpandingHead_0" onclick="FMCExpand( this ); return false;">Software version<img style="border: none;margin-left: 5px;" src="../SkinSupport/ExpandingClosed.gif" MadCap:altsrc="../SkinSupport/ExpandingOpen.gif" onload="if ( typeof( FMCPreloadImage ) == 'function' ) { FMCPreloadImage( '../SkinSupport/ExpandingOpen.gif' ); }" class="MCExpandingIcon" /></a><span class="MCExpandingBody" style="display: none;">: Make sure you are using the latest version of the BASIC Stamp Editor Software. You may check for a later version at <a href="http://www.parallax.com/basicstampsoftware" target="_blank" title="Open website in new window" alt="Open website in new window">www.parallax.com/basicstampsoftware</a>.</span></span>
</li>
<li class="Checklist" value="5"><span class="MCExpanding"><a href="javascript:void(0);" class="MCExpandingHead_0" onclick="FMCExpand( this ); return false;">USB drivers<img style="border: none;margin-left: 5px;" src="../SkinSupport/ExpandingClosed.gif" MadCap:altsrc="../SkinSupport/ExpandingOpen.gif" onload="if ( typeof( FMCPreloadImage ) == 'function' ) { FMCPreloadImage( '../SkinSupport/ExpandingOpen.gif' ); }" class="MCExpandingIcon" /></a><span class="MCExpandingBody" style="display: none;">: If you are using a Parallax USB connection, you may need to update your USB drivers. See the <a href="USBdrivers.htm" target="" title="" alt="" class="MCXref_0">USB Drivers</a> page for help.</span></span>
</li>
<li class="Checklist" value="6"><span class="MCExpanding"><a href="javascript:void(0);" class="MCExpandingHead_0" onclick="FMCExpand( this ); return false;">USB ports freeze after disconnecting from USB&#160;3.0 port: <img style="border: none;margin-left: 5px;" src="../SkinSupport/ExpandingClosed.gif" MadCap:altsrc="../SkinSupport/ExpandingOpen.gif" onload="if ( typeof( FMCPreloadImage ) == 'function' ) { FMCPreloadImage( '../SkinSupport/ExpandingOpen.gif' ); }" class="MCExpandingIcon" /></a><span class="MCExpandingBody" style="display: none;">USB 2.0 ports are recommended for BASIC Stamp boards. On some computers, the internal USB hub will freeze when disconnecting a USB 2.0 device from a USB 3.0 port. This may cause all USB ports on the computer to become unresponsive, requiring a reboot of the computer to remedy the situation. System updates from your computer manufacturer may correct the problem.USB 3.0 ports can sometimes be identified by a blue tab inside the socket.<br /><img src="../Resources/Images/USB_3_258x115.jpg" title="USB 3.0 ports have a blue tab inside." alt="USB 3.0 ports have a blue tab inside." style="padding-top: 5px;width: 258;height: 115;" /></span></span>
</li>
<li class="Checklist" value="7">
<p><span class="MCExpanding"><a href="javascript:void(0);" class="MCExpandingHead_0" onclick="FMCExpand( this ); return false;">Beware of non-Parallax USB&#160;to Serial Adapters<img style="border: none;margin-left: 5px;" src="../SkinSupport/ExpandingClosed.gif" MadCap:altsrc="../SkinSupport/ExpandingOpen.gif" onload="if ( typeof( FMCPreloadImage ) == 'function' ) { FMCPreloadImage( '../SkinSupport/ExpandingOpen.gif' ); }" class="MCExpandingIcon" /></a><span class="MCExpandingBody" style="display: none;">: Not every brand of USB&#160;to Serial Adapter supports the timing precision needed for BASIC Stamp programming. Some known-incompatible brands are Belkin and Gigaware. Keyspan #USA19-HS is known to be compatible. You can order an inexpensive Parallax USB to Serial Adapter (#28030) from <a href="http://www.parallax.com/" target="_blank" title="Open website in new window" alt="Open website in new window">www.parallax.com</a>.</span></span>
</p>
</li>
</ul>
</div>
</div>
<p>&#160;</p>
<div class="MCDropDown">
<div class="MCDropDownHead_0"><a class="MCDropDownHotSpot_0" href="javascript:void(0);" id="MCDropDownHotSpot_3311062465_1" onclick="FMCDropDown( this ); return false;"><img style="border: none;margin-right: 2px;" src="../SkinSupport/DropDownClosed.gif" MadCap:altsrc="../SkinSupport/DropDownOpen.gif" onload="if ( typeof( FMCPreloadImage ) == 'function' ) { FMCPreloadImage( '../SkinSupport/DropDownOpen.gif' ); }" class="MCDropDownIcon" />The Run/Identify Test Procedure</a>
</div>
<div class="MCDropDownBody" id="MCDropDownBody_3311062465_1" style="display: none;">
<ul>
<li class="Checklist" value="1">To make sure your BASIC Stamp module can communicate with your computer, click the Run menu, then select Identify.</li>
</ul>
<p>
<img src="../Resources/Images/RunID.png" />
</p>
<ul>
<li class="Checklist" value="1">Or, you can use the ID icon on the toolbar:</li>
</ul>
<p>
<img src="../Resources/Images/IDbutton.png" />
</p>
<p class="PlainText">An identification window will appear similar to the one shown here. This example shows that a BASIC Stamp 2 has been detected on COM5.</p>
<p>
<img src="../Resources/Images/BS2onCOM5.png" />
</p>
<ul>
<li class="Checklist" value="1">Check the Identification window to make sure your BASIC Stamp module has been detected on one of the COM&#160;ports. If it has been detected, then you are ready to program your BASIC Stamp. </li>
</ul>
</div>
</div>
<p>&#160;</p>
<h2>It Passed the Run/Identify Test but Still Won't Program Reliably</h2>
<ul>
<li class="Checklist" value="1">If your USB-connected BASIC Stamp is detected and you see Yes in both columns, but can program only intermittently or get a "No BASIC&#160;Stamps Found" or a hardware/communication failure message, try adjusting the <a href="LatencyTimer.htm" target="" title="" alt="" class="MCXref_0">Latency Timer Settings</a>.</li>
</ul>
<p class="PlainText">&#160;</p>
<h2>It Failed the Run/Identify Test</h2>
<p class="PlainText">If the Run/Identify test DID NOT&#160;find your BASIC Stamp on any COM&#160;port, the message that appeared can help diagnose connection problems.</p>
<ul>
<li class="Checklist" value="1">Click on a message (below) to go to its troubleshooting page.</li>
</ul>
<h3><a href="NoDeviceType.htm" target="" title="" alt="" class="MCXref_0">No Device Type </a>
</h3>
<p><a href="NoDeviceType.htm" title="Go to &quot;No Device Type&quot; page" alt="Go to &quot;No Device Type&quot; page"><img src="../Resources/Images/IDnoDevice.png" /></a>
</p>
<h3><a href="NoPortsFound.htm" target="" title="" alt="" class="MCXref_0">No Usable Serial Ports Found</a>
</h3>
<p><a href="NoPortsFound.htm" title="Go to &quot;No Usable Ports Found&quot; page" alt="Go to &quot;No Usable Ports Found&quot; page"><img src="../Resources/Images/NoSerialPorts.png" /></a>
</p>
<h3><a href="PortInUse.htm" target="" title="" alt="" class="MCXref_0">Can't open port; in use</a>
</h3>
<p><a href="PortInUse.htm" title="Go to the &quot;Can't open port; in use&quot; page" alt="Go to the &quot;Can't open port; in use&quot; page"><img src="../Resources/Images/CantOpenPort.png" /></a>
</p>
<h3><a href="InvalidPort.htm" target="" title="" alt="" class="MCXref_0">Invalid Port</a>
</h3>
<p><a href="InvalidPort.htm" title="Go to &quot;Invalid Port&quot; page" alt="Go to &quot;Invalid Port&quot; page"><img src="../Resources/Images/IDinvalidPort.png" /></a>
</p>
<p>&#160;</p>
<div class="Col2">
<div class="MasterFoot">
<p MadCap:conditions="BSEconditions.BSEWebHelp (Primary)-INCLUDE"><a href="../HomeTopics/HomePage.htm">Go to Welcome page</a>
</p>
</div>
</div>
<div class="Col2">
<div class="MasterFoot">
<p style="text-align: right;"><span class="ContactInfoProjectName">BASIC Stamp Help</span> <![CDATA[ ]]><span class="ContactInfoVersion#">Version 2.5.4</span> <![CDATA[ ]]></p>
<p style="text-align: right;">Copyright ©&#160;<span class="ContactInfoCompanyName">Parallax Inc.</span></p>
<p style="text-align: right;"><span class="SystemShortDate">8/8/2012</span>
</p>
</div>
</div>
<script type="text/javascript">/* <![CDATA[ */
var _gaq = _gaq || [];
_gaq.push(['_setAccount', 'UA-285614-1']);
_gaq.push(['_trackPageview']);
(function() {
var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
})();
/* ]]> */</script>
<script type="text/javascript" src="../SkinSupport/MadCapBodyEnd.js">
</script>
</body>
</html>
@@ -0,0 +1,132 @@
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns:MadCap="http://www.madcapsoftware.com/Schemas/MadCap.xsd" MadCap:lastBlockDepth="6" MadCap:lastHeight="94" MadCap:lastWidth="853" MadCap:disableMasterStylesheet="true" MadCap:tocPath="Connection Troubleshooting" MadCap:InPreviewMode="false" MadCap:PreloadImages="false" MadCap:RuntimeFileType="Topic" MadCap:TargetType="WebHelp" lang="en-us" xml:lang="en-us" MadCap:PathToHelpSystem="../../" MadCap:HelpSystemFileName="Default.xml" MadCap:SearchType="Stem">
<head><title>Serial Port Search List</title>
<link href="../SkinSupport/MadCap.css" rel="stylesheet" />
<link href="../Resources/Stylesheets/BSE_Help.css" rel="stylesheet" />
<script src="../SkinSupport/MadCapAll.js">
</script>
</head>
<body>
<div class="MCBreadcrumbsBox_0"><span class="MCBreadcrumbsPrefix">You are here: </span><a class="MCBreadcrumbsLink" href="TFAQ.htm">Connection Troubleshooting</a><span class="MCBreadcrumbsDivider"> &gt; </span><span class="MCBreadcrumbs">Serial Port Search List</span>
</div>
<h1>Serial Port Search List</h1>
<p class="PlainText">This dialog indicates what serial ports will be scanned, and the order they will be accessed, whenever a BASIC Stamp identification or download process is started. Use this feature to fine-tune the BASIC Stamp search to include or exclude certain serial ports.</p>
<p>
<img src="../Resources/Images/SPSLorder.png">
</img>
</p>
<p class="PlainText">To access this dialog, click the "Edit Ports..." button that appears on the Identification Window or the Preferences &gt; Editor Operation tab:</p>
<ul>
<li value="1">Identification Window: This appears when you press Ctrl+I or select the Run &gt; Identify menu.</li>
<li value="2">Preferences &gt; Editor Operation tab: This appears when you press F5, or select the Edit &gt; Preferences... menu, and select the Editor Operation tab.</li>
</ul>
<h2>Port List</h2>
<p class="PlainText"> The port list automatically updates whenever ports appear and disappear; such as USB-to-Serial ports. This is an interactive control; use your mouse to view and modify the list as indicated below.</p>
<ul>
<li value="1">Port ID column: Indicates the Port ID.</li>
<li value="2">Port Description column: Indicates the friendly name for the port, similar to that shown in the Windows Device Manager tool.</li>
<li value="3">Present column: 'Yes' if the port is currently present on the system, 'No' if not; this indicates a user rule is including a port in the search list that isn't currently present on the system.</li>
</ul>
<h3>Viewing and Modifying the List and Association Rules</h3>
<p class="PlainText">The list of ports is shown in the order in which they will be scanned during BASIC Stamp identification and/or download processes. The ports to be scanned, and the order in which they are scanned, can be set through this interface, described below.</p>
<div class="MCDropDown">
<div class="MCDropDownHead_0"><a class="MCDropDownHotSpot_0" href="javascript:void(0);" id="MCDropDownHotSpot_1967852838_0" onclick="FMCDropDown( this ); return false;"><img style="border: none;margin-right: 2px;" src="../SkinSupport/DropDownClosed.gif" MadCap:altsrc="../SkinSupport/DropDownOpen.gif" onload="if ( typeof( FMCPreloadImage ) == 'function' ) { FMCPreloadImage( '../SkinSupport/DropDownOpen.gif' ); }" class="MCDropDownIcon" />Changing the Scan Order</a>
</div>
<div class="MCDropDownBody" id="MCDropDownBody_1967852838_0" style="display: none;">
<p>&#160;</p>
<p class="PlainText">To change the order in which ports are scanned, left-click and drag port rows up and down. In this example, we selected the COM11 row, left-clicked it and dragged it up to be above the first Bluetooth Communications Port row (COM3). This results in a new scan order of COM11, COM3, COM6, and lastly COM12.</p>
<p class="PlainText">
<img src="../Resources/Images/SPSLmove.png">
</img>
</p>
</div>
</div>
<div class="MCDropDown">
<div class="MCDropDownHead_0"><a class="MCDropDownHotSpot_0" href="javascript:void(0);" id="MCDropDownHotSpot_1967852838_1" onclick="FMCDropDown( this ); return false;"><img style="border: none;margin-right: 2px;" src="../SkinSupport/DropDownClosed.gif" MadCap:altsrc="../SkinSupport/DropDownOpen.gif" onload="if ( typeof( FMCPreloadImage ) == 'function' ) { FMCPreloadImage( '../SkinSupport/DropDownOpen.gif' ); }" class="MCDropDownIcon" />Viewing the Inclusion/Exclusion status</a>
</div>
<div class="MCDropDownBody" id="MCDropDownBody_1967852838_1" style="display: none;">
<p class="PlainText">Ports may be included or excluded from the search list based on one or more user-defined rules. </p>
<p class="PlainText">To see what rule is applying to a particular port, point the mouse at the port's row and read the hint that appears. The example shown here indicates that port COM12 is being "Included by default" which means there is no rule explicitly including or excluding the port.</p>
<p class="PlainText">
<img src="../Resources/Images/SPSLinlcudeDefault.png">
</img>
</p>
<p class="PlainText">To exclude or include a port by the port's ID, right-click the port's row and select the "Exclude/Include Port (COMxx)" item. In this example, we chose to exclude COM12. </p>
<p>
<img src="../Resources/Images/SPSLexcludeCom12.png">
</img>
</p>
<p class="PlainText">After excluding it, the ports list will update as shown below. Notice that it appears ghosted and in italics to indicate it will not be scanned; it will be ignored during an identification and download process. Also, hovering the mouse over it will display a hint saying, "Excluded by Port ID rule." </p>
<p>
<img src="../Resources/Images/SPSLexcludeByID.png">
</img>
</p>
<p class="Tip" MadCap:autonum="Tip: &#160;"><span class="autonumber"><span class="TipSpan">Tip: &#160;</span></span>You can remove this Port ID rule by right-clicking on the port's row and selecting the "Re-include/exclude port (COMxx)" item.</p>
</div>
</div>
<div class="MCDropDown">
<div class="MCDropDownHead_0"><a class="MCDropDownHotSpot_0" href="javascript:void(0);" id="MCDropDownHotSpot_1967852838_2" onclick="FMCDropDown( this ); return false;"><img style="border: none;margin-right: 2px;" src="../SkinSupport/DropDownClosed.gif" MadCap:altsrc="../SkinSupport/DropDownOpen.gif" onload="if ( typeof( FMCPreloadImage ) == 'function' ) { FMCPreloadImage( '../SkinSupport/DropDownOpen.gif' ); }" class="MCDropDownIcon" />Excluding or Including a Port by Description</a>
</div>
<div class="MCDropDownBody" id="MCDropDownBody_1967852838_2" style="display: none;">
<ul style="list-style-type: circle;">
<li class="Checklist" value="1">To exclude or include a port by its description, right-click the port's row and select the "Filter Port(s) by Description…" item.</li>
</ul>
<p class="PlainText">
<img src="../Resources/Images/SPSLfilterDesc.png" />
</p>
<p class="PlainText"> This will open a new dialog that allows you to set the desired description rule. In this example, we set it to "Exclude" any ports matching "Bluetooth Communications Port" in their description.</p>
<p class="PlainText">
<img src="../Resources/Images/SPSLfilterWindow.png" />
</p>
<p class="PlainText">Click OK to update the ports list. Notice that COM3 and COM6 (the ports whose descriptions read "Bluetooth Communications Port") appear ghosted and in italics to indicate it they will not be scanned; they will be ignored during an identification and download process. Also, hovering the mouse over those ports will display a hint saying, "Excluded by Port Description rule."</p>
<p class="PlainText">
<img src="../Resources/Images/SPSLexcludeDescRule.png">
</img>
</p>
<p class="Tip" MadCap:autonum="Tip: &#160;"><span class="autonumber"><span class="TipSpan">Tip: &#160;</span></span>You can edit or remove this Port Description rule for a single port by by right-clicking on the port's row and selecting the "Include Port (COMxx)" option. You can change or remove it from all ports with the "Edit Port Description Rule..." or "Remove port description rule…" options.</p>
<p class="PlainText">
<img src="../Resources/Images/SPSLremoveRule.png">
</img>
</p>
<p class="Tip" MadCap:autonum="Tip: &#160;"><span class="autonumber"><span class="TipSpan">Tip: &#160;</span></span>On the Filter Port(s) by Description dialog, the Port Description field can be as general or as specific as necessary by using asterisk (*) characters as wild cards. For example, to exclude all ports beginning with the word "USB," enter "USB *" in the field. To exclude all ports with the word USB appearing anywhere within them, enter "*USB*" in the field. The bottom of the dialog shows the number of "Matches Found;" the number of existing ports that the rule applies to.</p>
<p class="Tip" MadCap:autonum="Tip: &#160;"><span class="autonumber"><span class="TipSpan">Tip: &#160;</span></span>To exclude all ports except specific ports, right-click on any port row and select "Exclude all ports by default," then right click on any desired ports and select either "Include Port (COMxx)" or "Filter Port(s) by Description…" and enter the desired match string of ports to include.</p>
</div>
</div>
<h2>Buttons</h2>
<ul>
<li value="1">Restore Defaults: Press this button to remove all user-defined serial port rules and return the BASIC Stamp Editor Serial Port Search List to its default scanning sequence. Note that Bluetooth ports are excluded by default.</li>
<li value="2">Accept: Press this button to apply all modifications made to the serial port search list and corresponding rules.</li>
<li value="3">Cancel: Press this button to cancel all recent modifications made to the serial port search list and corresponding rules.</li>
</ul>
<div class="Col2">
<div class="MasterFoot">
<p MadCap:conditions="BSEconditions.BSEWebHelp (Primary)-INCLUDE"><a href="../HomeTopics/HomePage.htm">Go to Welcome page</a>
</p>
</div>
</div>
<div class="Col2">
<div class="MasterFoot">
<p style="text-align: right;"><span class="ContactInfoProjectName">BASIC Stamp Help</span> <![CDATA[ ]]><span class="ContactInfoVersion#">Version 2.5.4</span> <![CDATA[ ]]></p>
<p style="text-align: right;">Copyright ©&#160;<span class="ContactInfoCompanyName">Parallax Inc.</span></p>
<p style="text-align: right;"><span class="SystemShortDate">8/8/2012</span>
</p>
</div>
</div>
<script type="text/javascript">/* <![CDATA[ */
var _gaq = _gaq || [];
_gaq.push(['_setAccount', 'UA-285614-1']);
_gaq.push(['_trackPageview']);
(function() {
var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
})();
/* ]]> */</script>
<script type="text/javascript" src="../SkinSupport/MadCapBodyEnd.js">
</script>
</body>
</html>
@@ -0,0 +1,73 @@
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns:MadCap="http://www.madcapsoftware.com/Schemas/MadCap.xsd" MadCap:lastBlockDepth="6" MadCap:lastHeight="94" MadCap:lastWidth="853" MadCap:disableMasterStylesheet="true" MadCap:tocPath="" MadCap:InPreviewMode="false" MadCap:PreloadImages="false" MadCap:RuntimeFileType="Topic" MadCap:TargetType="WebHelp" lang="en-us" xml:lang="en-us" MadCap:PathToHelpSystem="../../" MadCap:HelpSystemFileName="Default.xml" MadCap:SearchType="Stem">
<head><title>Connection Troubleshooting</title>
<link href="../SkinSupport/MadCap.css" rel="stylesheet" />
<link href="../Resources/Stylesheets/BSE_Help.css" rel="stylesheet" />
<script src="../SkinSupport/MadCapAll.js">
</script>
</head>
<body>
<div class="MCBreadcrumbsBox_0"><span class="MCBreadcrumbsPrefix">You are here: </span><span class="MCBreadcrumbs">Connection Troubleshooting</span>
</div>
<h1>Connection Troubleshooting</h1>
<p>This is the "triage" area for troubleshooting the programming connection between your computer and your BASIC Stamp development board.</p>
<p>&#160;</p>
<p>Let's rule out the most common causes of communications failure first:</p>
<ul>
<li class="Checklist" value="1"><span class="MCExpanding"><a href="javascript:void(0);" class="MCExpandingHead_0" onclick="FMCExpand( this ); return false;">Loose connections<img style="border: none;margin-left: 5px;" src="../SkinSupport/ExpandingClosed.gif" MadCap:altsrc="../SkinSupport/ExpandingOpen.gif" onload="if ( typeof( FMCPreloadImage ) == 'function' ) { FMCPreloadImage( '../SkinSupport/ExpandingOpen.gif' ); }" class="MCExpandingIcon" /></a><span class="MCExpandingBody" style="display: none;">: Double-check the connections between your computer and your programming cable, the Parallax USB&#160;to Serial Adapter if you are using one, and the development board.</span></span>
</li>
<li class="Checklist" value="2"><span class="MCExpanding"><a href="javascript:void(0);" class="MCExpandingHead_0" onclick="FMCExpand( this ); return false;">Misconnected BASIC Stamp<img style="border: none;margin-left: 5px;" src="../SkinSupport/ExpandingClosed.gif" MadCap:altsrc="../SkinSupport/ExpandingOpen.gif" onload="if ( typeof( FMCPreloadImage ) == 'function' ) { FMCPreloadImage( '../SkinSupport/ExpandingOpen.gif' ); }" class="MCExpandingIcon" /></a><span class="MCExpandingBody" style="display: none;">: If you are using a Board of Education, double-check how to <span class="MCPopup"><a href="javascript:void(0);" MadCap:src="InsertBS2popup.htm" onclick="FMCPopup( event, this ); return false;" class="MCXref_0" alt="Open in popup window" title="Open in popup window">Insert the BASIC Stamp module</a></span> in its socket.</span></span>
</li>
<li class="Checklist" value="3"><span class="MCExpanding"><a href="javascript:void(0);" class="MCExpandingHead_0" onclick="FMCExpand( this ); return false;">No power<img style="border: none;margin-left: 5px;" src="../SkinSupport/ExpandingClosed.gif" MadCap:altsrc="../SkinSupport/ExpandingOpen.gif" onload="if ( typeof( FMCPreloadImage ) == 'function' ) { FMCPreloadImage( '../SkinSupport/ExpandingOpen.gif' ); }" class="MCExpandingIcon" /></a><span class="MCExpandingBody" style="display: none;">: double-check the power supply that you have connected to your board. (See <a href="PowerSupplies.htm" target="" title="Open &quot;Power Supplies&quot; in popup window" alt="Open &quot;Power Supplies&quot; in popup window" class="MCXref_0">Power Supplies</a> for options). If your board has a power switch, make sure it is switched on and the power indicator is lit. If you are using a 9V battery, try a fresh one. If you are using a battery pack, make sure the batteries are all inserted into the pack correctly; try fresh batteries. If you are using a wall-mount supply, make sure the wall outlet is not turned off at a wall switch. If you have a voltmeter, use it to measure the voltage supplied by the battery pack or wall-mount to rule out defective power supply hardware.</span></span>
</li>
<li class="Checklist" value="4"><span class="MCExpanding"><a href="javascript:void(0);" class="MCExpandingHead_0" onclick="FMCExpand( this ); return false;">Software version<img style="border: none;margin-left: 5px;" src="../SkinSupport/ExpandingClosed.gif" MadCap:altsrc="../SkinSupport/ExpandingOpen.gif" onload="if ( typeof( FMCPreloadImage ) == 'function' ) { FMCPreloadImage( '../SkinSupport/ExpandingOpen.gif' ); }" class="MCExpandingIcon" /></a><span class="MCExpandingBody" style="display: none;">: Make sure you are using the latest version of the BASIC Stamp Editor Software. You may check for a later version at <a href="http://www.parallax.com/basicstampsoftware" target="_blank" title="Open website in new window" alt="Open website in new window">www.parallax.com/basicstampsoftware</a>.</span></span>
</li>
<li class="Checklist" value="5"><span class="MCExpanding"><a href="javascript:void(0);" class="MCExpandingHead_0" onclick="FMCExpand( this ); return false;">USB drivers<img style="border: none;margin-left: 5px;" src="../SkinSupport/ExpandingClosed.gif" MadCap:altsrc="../SkinSupport/ExpandingOpen.gif" onload="if ( typeof( FMCPreloadImage ) == 'function' ) { FMCPreloadImage( '../SkinSupport/ExpandingOpen.gif' ); }" class="MCExpandingIcon" /></a><span class="MCExpandingBody" style="display: none;">: If you are using a Parallax USB connection, you may need to update your USB drivers. See the <a href="USBdrivers.htm" target="" title="" alt="" class="MCXref_0">USB Drivers</a> page for help.</span></span>
</li>
<li class="Checklist" value="6"><span class="MCExpanding"><a href="javascript:void(0);" class="MCExpandingHead_0" onclick="FMCExpand( this ); return false;">USB ports freeze after disconnecting from USB&#160;3.0 port: <img style="border: none;margin-left: 5px;" src="../SkinSupport/ExpandingClosed.gif" MadCap:altsrc="../SkinSupport/ExpandingOpen.gif" onload="if ( typeof( FMCPreloadImage ) == 'function' ) { FMCPreloadImage( '../SkinSupport/ExpandingOpen.gif' ); }" class="MCExpandingIcon" /></a><span class="MCExpandingBody" style="display: none;">USB 2.0 ports are recommended for BASIC Stamp boards. On some computers, the internal USB hub will freeze when disconnecting a USB 2.0 device from a USB 3.0 port. This may cause all USB ports on the computer to become unresponsive, requiring a reboot of the computer to remedy the situation. System updates from your computer manufacturer may correct the problem.USB 3.0 ports can sometimes be identified by a blue tab inside the socket.<br /><img src="../Resources/Images/USB_3_258x115.jpg" title="USB 3.0 ports have a blue tab inside." alt="USB 3.0 ports have a blue tab inside." style="padding-top: 5px;width: 258;height: 115;" /></span></span>
</li>
<li class="Checklist" value="7">
<p><span class="MCExpanding"><a href="javascript:void(0);" class="MCExpandingHead_0" onclick="FMCExpand( this ); return false;">Beware of non-Parallax USB&#160;to Serial Adapters<img style="border: none;margin-left: 5px;" src="../SkinSupport/ExpandingClosed.gif" MadCap:altsrc="../SkinSupport/ExpandingOpen.gif" onload="if ( typeof( FMCPreloadImage ) == 'function' ) { FMCPreloadImage( '../SkinSupport/ExpandingOpen.gif' ); }" class="MCExpandingIcon" /></a><span class="MCExpandingBody" style="display: none;">: Not every brand of USB&#160;to Serial Adapter supports the timing precision needed for BASIC Stamp programming. Some known-incompatible brands are Belkin and Gigaware. Keyspan #USA19-HS is known to be compatible. You can order an inexpensive Parallax USB to Serial Adapter (#28030) from <a href="http://www.parallax.com/" target="_blank" title="Open website in new window" alt="Open website in new window">www.parallax.com</a>.</span></span>
</p>
</li>
</ul>
<p class="PlainText">Okay, if that didn't solve the problem, let's keep going:</p>
<ul>
<li class="Checklist" value="1">If you are able to program your USB-connected board sometimes, but it fails sometimes or requires several tries (and you are SURE the power supply is not the problem), you may need to change your computer's <a href="LatencyTimer.htm" target="" title="" alt="" class="MCXref_0">Latency Timer Settings</a>.</li>
<li class="Checklist" value="2">If you are using a Parallax BASIC Stamp development board (such as a Board of Education, HomeWork Board, or Professional Development Board), and your PC cannot communicate with your BASIC Stamp, go to the <a href="RunIdTest.htm" target="" title="" alt="" class="MCXref_0">Run/Identify Test</a> page.</li>
<li class="Checklist" value="3">If you are using a USB-based board or USB&#160;to Serial Adapter, and repeated BASIC Stamp resets are interfering with your program, see the <a href="UsbBoardResets.htm" target="" title="" alt="" class="MCXref_0">USB Resets BASIC Stamp</a> page.</li>
<li class="Checklist" value="4">If you are using a development board and/or BASIC Stamp OEM that you&#160;assembled yourself, there are a number of tests that can be performed best with the help of the Parallax Tech Support crew, and a voltmeter. Please <a href="../HomeTopics/Resources.htm#Contact_Parallax" target="" title="" alt="" class="MCXref_0">Contact Parallax</a> Tech Support.</li>
</ul>
<p>&#160;</p>
<div class="Col2">
<div class="MasterFoot">
<p MadCap:conditions="BSEconditions.BSEWebHelp (Primary)-INCLUDE"><a href="../HomeTopics/HomePage.htm">Go to Welcome page</a>
</p>
</div>
</div>
<div class="Col2">
<div class="MasterFoot">
<p style="text-align: right;"><span class="ContactInfoProjectName">BASIC Stamp Help</span> <![CDATA[ ]]><span class="ContactInfoVersion#">Version 2.5.4</span> <![CDATA[ ]]></p>
<p style="text-align: right;">Copyright ©&#160;<span class="ContactInfoCompanyName">Parallax Inc.</span></p>
<p style="text-align: right;"><span class="SystemShortDate">8/8/2012</span>
</p>
</div>
</div>
<script type="text/javascript">/* <![CDATA[ */
var _gaq = _gaq || [];
_gaq.push(['_setAccount', 'UA-285614-1']);
_gaq.push(['_trackPageview']);
(function() {
var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
})();
/* ]]> */</script>
<script type="text/javascript" src="../SkinSupport/MadCapBodyEnd.js">
</script>
</body>
</html>
@@ -0,0 +1,89 @@
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns:MadCap="http://www.madcapsoftware.com/Schemas/MadCap.xsd" MadCap:lastBlockDepth="6" MadCap:lastHeight="94" MadCap:lastWidth="853" MadCap:disableMasterStylesheet="true" MadCap:tocPath="Connection Troubleshooting" MadCap:InPreviewMode="false" MadCap:PreloadImages="false" MadCap:RuntimeFileType="Topic" MadCap:TargetType="WebHelp" lang="en-us" xml:lang="en-us" MadCap:PathToHelpSystem="../../" MadCap:HelpSystemFileName="Default.xml" MadCap:SearchType="Stem">
<head><title>USB Drivers</title>
<link href="../SkinSupport/MadCap.css" rel="stylesheet" />
<link href="../Resources/Stylesheets/BSE_Help.css" rel="stylesheet" />
<script src="../SkinSupport/MadCapAll.js">
</script>
</head>
<body>
<div class="MCBreadcrumbsBox_0"><span class="MCBreadcrumbsPrefix">You are here: </span><a class="MCBreadcrumbsLink" href="TFAQ.htm">Connection Troubleshooting</a><span class="MCBreadcrumbsDivider"> &gt; </span><span class="MCBreadcrumbs">USB Drivers</span>
</div>
<h1>USB Drivers</h1>
<p class="PlainText">If you are using a Parallax board with a USB&#160;connector, or a Parallax USB&#160;to Serial Adapter: <![CDATA[ ]]></p>
<p class="PlainText">
<img src="../Resources/Images/USBconn.png" />...or...<img src="../Resources/Images/USBadapter.png" /></p>
<p>...you will need USB&#160;drivers from Parallax Inc.</p>
<ul>
<li class="Checklist" value="1"><span class="MCExpanding"><a href="javascript:void(0);" class="MCExpandingHead_0" onclick="FMCExpand( this ); return false;">Beware of non-Parallax USB&#160;to Serial Adapters<img style="border: none;margin-left: 5px;" src="../SkinSupport/ExpandingClosed.gif" MadCap:altsrc="../SkinSupport/ExpandingOpen.gif" onload="if ( typeof( FMCPreloadImage ) == 'function' ) { FMCPreloadImage( '../SkinSupport/ExpandingOpen.gif' ); }" class="MCExpandingIcon" /></a><span class="MCExpandingBody" style="display: none;">: Not every brand of USB&#160;to Serial Adapter supports the timing precision needed for BASIC Stamp programming. Some known-incompatible brands are Belkin and Gigaware. Keyspan #USA19-HS is known to be compatible. You can order an inexpensive Parallax USB to Serial Adapter (#28030) from <a href="http://www.parallax.com/" target="_blank" title="Open website in new window" alt="Open website in new window">www.parallax.com</a>.</span></span>
</li>
<li class="Checklist" value="2">Unplug the USB&#160;cable to your BASIC Stamp development board at the computer.</li>
<li class="Checklist" value="3">Download and install the latest version of the USB&#160;drivers from Parallax: <a href="http://www.parallax.com/usbdrivers" target="_blank" title="Open website in new window" alt="Open website in new window">www.parallax.com/usbdrivers</a>.</li>
<li class="Checklist" value="4">Reconnect the USB&#160;cable and your BASIC Stamp development board. You should see a series of messages in your system tray:</li>
</ul>
<p class="PlainTextIndent">
<img src="../Resources/Images/FoundUART.png" />... <![CDATA[ ]]><img src="../Resources/Images/FoundNewHardware.png" /> ... <img src="../Resources/Images/ReadyToUse.png" /></p>
<ul>
<li class="Checklist" value="1">If you don't see any of these messages, open your computer's Ports list to confirm that the drivers were installed properly.</li>
</ul>
<div class="ListIndent">
<div class="MCDropDown">
<div class="MCDropDownHead_0"><a class="MCDropDownHotSpot_0" href="javascript:void(0);" id="MCDropDownHotSpot_3715037958_0" onclick="FMCDropDown( this ); return false;"><img style="border: none;margin-right: 2px;" src="../SkinSupport/DropDownClosed.gif" MadCap:altsrc="../SkinSupport/DropDownOpen.gif" onload="if ( typeof( FMCPreloadImage ) == 'function' ) { FMCPreloadImage( '../SkinSupport/DropDownOpen.gif' ); }" class="MCDropDownIcon" />Finding your Ports List in your computer's Device Manager</a>
</div>
<div class="MCDropDownBody" id="MCDropDownBody_3715037958_0" style="display: none;">
<ul style="list-style-type: circle;">
<li value="1"><span class="MCExpanding"><a href="javascript:void(0);" class="MCExpandingHead_0" onclick="FMCExpand( this ); return false;">Windows 2K<img style="border: none;margin-left: 5px;" src="../SkinSupport/ExpandingClosed.gif" MadCap:altsrc="../SkinSupport/ExpandingOpen.gif" onload="if ( typeof( FMCPreloadImage ) == 'function' ) { FMCPreloadImage( '../SkinSupport/ExpandingOpen.gif' ); }" class="MCExpandingIcon" /></a><span class="MCExpandingBody" style="display: none;">: Start Menu &gt; Settings &gt; Control Panel &gt; System &gt; click Hardware Tab &gt; Device Manager... &gt; expand Ports (COM &amp;&#160;LPT)</span></span>
</li>
<li value="2"><span class="MCExpanding"><a href="javascript:void(0);" class="MCExpandingHead_0" onclick="FMCExpand( this ); return false;">Windows XP<img style="border: none;margin-left: 5px;" src="../SkinSupport/ExpandingClosed.gif" MadCap:altsrc="../SkinSupport/ExpandingOpen.gif" onload="if ( typeof( FMCPreloadImage ) == 'function' ) { FMCPreloadImage( '../SkinSupport/ExpandingOpen.gif' ); }" class="MCExpandingIcon" /></a><span class="MCExpandingBody" style="display: none;">: Start Menu &gt; right-click My Computer &gt; Properties &gt; click Hardware Tab &gt; Device Manager &gt; expand Ports (COM &amp;&#160;LPT)</span></span>
</li>
<li value="3"><span class="MCExpanding"><a href="javascript:void(0);" class="MCExpandingHead_0" onclick="FMCExpand( this ); return false;">Windows Vista or Windows 7<img style="border: none;margin-left: 5px;" src="../SkinSupport/ExpandingClosed.gif" MadCap:altsrc="../SkinSupport/ExpandingOpen.gif" onload="if ( typeof( FMCPreloadImage ) == 'function' ) { FMCPreloadImage( '../SkinSupport/ExpandingOpen.gif' ); }" class="MCExpandingIcon" /></a><span class="MCExpandingBody" style="display: none;">: Start Menu (Windows icon) &gt; right-click Computer &gt; Properties &gt; Device Manager (left pane) &gt; expand Ports (COM &amp;&#160;LPT)</span></span>
</li>
</ul>
</div>
</div>
</div>
<ul>
<li class="Checklist" value="1">If there is no yellow exclamation mark (like the image below), the drivers have been installed correctly and you can now go try the <a href="RunIdTest.htm" target="" title="" alt="" class="MCXref_0">Run/Identify Test</a> again.</li>
</ul>
<p class="PlainTextIndent">
<img src="../Resources/Images/USBportOK.png" />
</p>
<ul>
<li class="Checklist" value="1">There will be a yellow exclamation mark (!) by the device if the drivers either were not installed successfully or not at all. <a href="../HomeTopics/Resources.htm#Contact_Parallax" target="" title="" alt="" class="MCXref_0">Contact Parallax</a> Tech Support for assistance.</li>
</ul>
<p class="PlainTextIndent">
<img src="../Resources/Images/USBportNotOK.png" />
</p>
<p>&#160;</p>
<div class="Col2">
<div class="MasterFoot">
<p MadCap:conditions="BSEconditions.BSEWebHelp (Primary)-INCLUDE"><a href="../HomeTopics/HomePage.htm">Go to Welcome page</a>
</p>
</div>
</div>
<div class="Col2">
<div class="MasterFoot">
<p style="text-align: right;"><span class="ContactInfoProjectName">BASIC Stamp Help</span> <![CDATA[ ]]><span class="ContactInfoVersion#">Version 2.5.4</span> <![CDATA[ ]]></p>
<p style="text-align: right;">Copyright ©&#160;<span class="ContactInfoCompanyName">Parallax Inc.</span></p>
<p style="text-align: right;"><span class="SystemShortDate">8/8/2012</span>
</p>
</div>
</div>
<script type="text/javascript">/* <![CDATA[ */
var _gaq = _gaq || [];
_gaq.push(['_setAccount', 'UA-285614-1']);
_gaq.push(['_trackPageview']);
(function() {
var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
})();
/* ]]> */</script>
<script type="text/javascript" src="../SkinSupport/MadCapBodyEnd.js">
</script>
</body>
</html>
@@ -0,0 +1,134 @@
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns:MadCap="http://www.madcapsoftware.com/Schemas/MadCap.xsd" MadCap:lastBlockDepth="6" MadCap:lastHeight="94" MadCap:lastWidth="853" MadCap:disableMasterStylesheet="true" MadCap:tocPath="Connection Troubleshooting" MadCap:InPreviewMode="false" MadCap:PreloadImages="false" MadCap:RuntimeFileType="Topic" MadCap:TargetType="WebHelp" lang="en-us" xml:lang="en-us" MadCap:PathToHelpSystem="../../" MadCap:HelpSystemFileName="Default.xml" MadCap:SearchType="Stem">
<head><title>USB Resets BASIC Stamp</title>
<link href="../SkinSupport/MadCap.css" rel="stylesheet" />
<link href="../Resources/Stylesheets/BSE_Help.css" rel="stylesheet" />
<script src="../SkinSupport/MadCapAll.js" type="text/javascript">
</script>
</head>
<body>
<div class="MCBreadcrumbsBox_0"><span class="MCBreadcrumbsPrefix">You are here: </span><a class="MCBreadcrumbsLink" href="TFAQ.htm">Connection Troubleshooting</a><span class="MCBreadcrumbsDivider"> &gt; </span><span class="MCBreadcrumbs">USB Resets BASIC Stamp</span>
</div>
<h1>USB Resets BASIC Stamp</h1>
<p class="PlainText">A BASIC Stamp connected to a PC via a USB can be reset by the USB connection. This can occur with USB-based boards, and with serial boards using the USB to Serial Adapter. Resets can happen when:</p>
<ul>
<li value="1">Connecting the board to the USB&#160;port.</li>
<li value="2">Disconnecting the board from the USB port, at either end of the USB&#160;cable. </li>
<li value="3">Connecting or disconnecting another USB device on a port adjacent to your BASIC Stamp board's USB port.</li>
</ul>
<p class="PlainText">The resets are caused by the PC's operating system checking to see if a new plug-and-play device (such as a mouse) was just connected. Disconnecting your board may cause a single reset. Reconnecting typically causes several resets in a row during the first few seconds.</p>
<p class="Tip" MadCap:autonum="Tip: &#160;"><span class="autonumber"><span class="TipSpan">Tip: &#160;</span></span>If you are using the USB&#160;to Serial Adapter, resets are easy to avoid. After connecting your board to your PC&#160;the first time, always disconnect and reconnect at the serial (9-pin) end of the USB to Serial Adapter. Leaving the Adapter connected to your PC keeps the virtual communications port open, preventing an unwanted reset.</p>
<h2>What BASIC Stamp Resets Do</h2>
<p class="PlainText"> Each time a BASIC Stamp is reset:</p>
<ul>
<li value="1">The program execution restarts from the beginning of code. </li>
<li value="2">All variables are set to their initial value (zero by default).</li>
</ul>
<p class="PlainText">Make sure to keep this in mind while working on your BASIC Stamp projects. Some programs have variable values that you do not want to lose when you disconnect or reconnect your board to the PC. This is common with datalogging activities.</p>
<h2>Datalogging Activities</h2>
<p class="PlainText">Some Stamps in Class activities use BASIC Stamp programs that log sensor data. Typically, the programmed board is disconnected from the PC, and taken someplace to record data with sensors. Afterward, the board is reconnected to the PC so the sensor data can be displayed on the Debug Terminal or saved to the PC&#160;for later use. </p>
<p class="PlainText">If a program only records sensor data in RAM as variable values, a USB-based board will lose that data when reconnecting to the PC because the BASIC Stamp will reset. So, USB-based boards must stay connected to the computer with programs that hold data RAM as variable values. </p>
<p class="PlainText">For USB-based boards and datalogging programs with applications where the board is disconnected and reconnected to the PC, the program should:</p>
<ul>
<li value="1">Save values to EEPROM</li>
<li value="2">Use a one-second delay at the beginning of the program.</li>
</ul>
<h2>Save Values to EEPROM&#160;using <span class="keyword_in_text">READ</span>, <span class="keyword_in_text">WRITE</span>,&#160;and <span class="keyword_in_text">DATA</span> <![CDATA[ ]]></h2>
<p class="PlainText">A simple solution for retaining values between resets is to save them in portions of the EEPROM program memory that are not used to store the actual program. Since the program is stored starting at the highest memory address, the low memory addresses are usually available for storing these values.</p>
<p class="PlainText">Use the <span class="keyword_in_text">WRITE</span> command to store values to addresses in BASIC Stamp EEPROM memory. Then, use <span class="keyword_in_text">READ</span> commands to retrieve those values from EEPROM, even after connecting it to the PC. You can build <span class="keyword_in_text">READ</span> commands into your main program, or even run a separate program to retrieve those values. </p>
<p class="PlainText"> Pre-initialized values can also be stored in EEPROM with the <span class="keyword_in_text">DATA</span> directive. </p>
<p class="PlainText" MadCap:conditions="BSEconditions.BSEWebHelp (Primary)-INCLUDE">See the PBASIC Language Reference's <a href="../LanguageTopics/Commands/READ.htm" target="" title="" alt="" class="MCXref_0">READ</a>, <a href="../LanguageTopics/Commands/WRITE.htm" target="" title="" alt="" class="MCXref_0">WRITE</a>, and <a href="../LanguageTopics/Commands/DATA.htm" target="" title="" alt="" class="MCXref_0">DATA</a> commands for more information.</p>
<h2>Prevent Unexpected Bugs by Starting Your Programs with a One-Second Delay</h2>
<p class="PlainText">If your application requires reconnecting your USB board to the PC while the BASIC Stamp program is running, always add a one-second delay to the beginning of your program. Examples of one-second delays for BS2 modules include: <span class="code_in_text">PAUSE 1000</span> and <span class="code_in_text">FREQOUT Pin, 1000, <i>Frequency</i></span>. </p>
<p class="PlainText"> Adding a one-second delay at the start of your program could prevent these two unwanted behaviors:</p>
<ol>
<li value="1">If the BASIC Stamp transmits serial messages immediately after these resets, the operating system could mistake it for a serial mouse or other plug-and play-device.</li>
<li value="2"> If your program advances a value stored in EEPROM with each reset, the value will increase by one or more (ten is not uncommon) each time you connect your USB BASIC Stamp board to a PC.</li>
</ol>
<p class="PlainText">Again, the one-second delay at the very beginning of the program prevents these issues. Other ways to prevent them include leaving the power off until one second after you have connected your USB board, or pressing and holding the reset button for that time.</p>
<h2>Programs that Use the Reset Button</h2>
<p class="PlainText">Some programs use your board's Reset button to advance a value stored in EEPROM with each reset, or use the reset to trigger a "record" or "playback" mode.</p>
<p class="PlainText">For reset button applications with USB boards, it's best to design the application assuming the reset will happen when you disconnect and reconnect the board to the PC. Then, make sure to press and hold the reset button each time you disconnect or reconnect your board. This will ensure that a single, expected reset occurs, and not multiple resets as can happen with reconnection.</p>
<p class="PlainText">This example program uses a <span class="keyword_in_text">DATA</span> directive to pre-initialize the value stored by EEPROM address 0 to 255 when the program is loaded. The <span class="keyword_in_text">READ</span> command fetches this value from EEPROM and adds 1 to it. For a byte variable, 255 + 1 = 0 since 255 is the largest it can store, so it rolls over to zero. Taking the remainder of this <span class="code_in_text">eeVal/2</span> results in either 0 or 1. The <span class="keyword_in_text">WRITE</span> command stores this modified value back to EEPROM address 0. Then, the <span class="keyword_in_text">ON…GOTO…</span> command uses <span class="code_in_text">eeVal</span>, which stores 0 or 1. With each reset of the BASIC Stamp, the value advances from 0 to 1, to 0 again, and so on…</p><pre class="SICcode">
' {$STAMP BS2} ' Select BS2 as target module
' {$PBASIC 2.5} ' Select PBASIC 2.5 as language
eeVal VAR Byte ' EEPROM value variable
DATA 255 ' Pre-initialize EEPROM address 0 to 255
PAUSE 1000 ' Always wait 1 s before advancing EEPROM
READ 0, eeVal ' Fetch value from EEPROM address 0
eeval = eeVal + 1 ' Add 1 to eeVal
eeval = eeval // 2 ' Take remainder of eeVal / 2
WRITE 0, eeVal ' Write new result back to EEPROM
ON eeVal GOTO Playback, Record ' Use eeVal result to select routine
Playback: ' Playback label
DEBUG "Playing back..." ' Debug message indicating playback started
' Report logged data code here ' Your playback code goes here
END ' End, don't record after playback
Record: ' Record label
DEBUG "Recording..." ' Message indicates recording started
' Datalogging code here ' Your datalogging code goes here
END </pre>
<h2>Check for the PC Connection with <span class="keyword_in_text">SERIN</span></h2>
<p class="PlainText">Another useful strategy is to write a program routine that checks to see if the board is connected to the PC. Then the program can make decisions based on this information. For example, "if not connected, then log data” and “if connected, then display data.”</p>
<p class="PlainText">The code example below demonstrates one way to do this. It displays a message to press any key, then a <span class="keyword_in_text">SERIN</span> command that waits for a message from P16 (the programming port) for 2000 ms. If a character is typed into the Debug Terminals Transmit windowpane during that time, the program continues through the <span class="code_in_text">Playback</span> routine. If not, it jumps to the <span class="code_in_text">Record</span> routine.</p><pre class="SICcode">
' {$STAMP BS2} ' Select BS2 as target module
' {$PBASIC 2.5} ' Select PBASIC 2.5 as language
char VAR Byte ' Variable for getting character
PAUSE 1000 ' Always wait 1 s before serial transmit
DEBUG "Press any key...", CR ' User prompt
' Wait 2 s for character from Debug Terminals Transmit windowpane. Jump to
' Record label if no character received during that time. Continue to Playback
' label if character received.
SERIN 16, 84, 2000, Record, [char]
Playback: ' Playback label
DEBUG "Playing back..." ' Debug message indicating playback started
' Report logged data code here ' Your playback code goes here
END ' End, dont record after playback
Record: ' Record label
DEBUG "Recording..." ' Message indicates recording started
' Datalogging code here ' Your datalogging code goes here
END </pre>
<p class="PlainText" MadCap:conditions="BSEconditions.BSEWebHelp (Primary)-INCLUDE">See the PBASIC Language Reference's <![CDATA[ ]]><a href="../LanguageTopics/Commands/SERIN.htm" target="" title="" alt="" class="MCXref_0">SERIN</a> command for more information.</p>
<div class="Col2">
<div class="MasterFoot">
<p MadCap:conditions="BSEconditions.BSEWebHelp (Primary)-INCLUDE"><a href="../HomeTopics/HomePage.htm">Go to Welcome page</a>
</p>
</div>
</div>
<div class="Col2">
<div class="MasterFoot">
<p style="text-align: right;"><span class="ContactInfoProjectName">BASIC Stamp Help</span> <![CDATA[ ]]><span class="ContactInfoVersion#">Version 2.5.4</span> <![CDATA[ ]]></p>
<p style="text-align: right;">Copyright ©&#160;<span class="ContactInfoCompanyName">Parallax Inc.</span></p>
<p style="text-align: right;"><span class="SystemShortDate">8/8/2012</span>
</p>
</div>
</div>
<script type="text/javascript">/* <![CDATA[ */
var _gaq = _gaq || [];
_gaq.push(['_setAccount', 'UA-285614-1']);
_gaq.push(['_trackPageview']);
(function() {
var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
})();
/* ]]> */</script>
<script type="text/javascript" src="../SkinSupport/MadCapBodyEnd.js">
</script>
</body>
</html>
Binary file not shown.

After

Width:  |  Height:  |  Size: 994 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.8 KiB

+25
View File
@@ -0,0 +1,25 @@
<?xml version="1.0" encoding="utf-8"?>
<html xmlns:MadCap="http://www.madcapsoftware.com/Schemas/MadCap.xsd" MadCap:disableMasterStylesheet="true" MadCap:tocPath="" MadCap:InPreviewMode="false" MadCap:PreloadImages="false" MadCap:RuntimeFileType="Glossary" MadCap:TargetType="WebHelp" lang="en-us" xml:lang="en-us" MadCap:PathToHelpSystem="../" MadCap:HelpSystemFileName="Default.xml">
<head>
<link href="SkinSupport/MadCap.css" rel="stylesheet" type="text/css" />
<title>Glossary</title>
<link href="Resources/Stylesheets/BSE_Help.css" rel="stylesheet" type="text/css" />
<script src="SkinSupport/MadCapAll.js" type="text/javascript">
</script>
</head>
<body style="background-color: #fafafa;">
<div id="GlossaryBody">
<div class="GlossaryPageEntry">
<div class="GlossaryPageTerm">
<a href="javascript:void(0);" class="GlossaryPageTerm" id="MCDropDownHotSpot_557459045_0" onclick="FMCDropDown( this ); FMCScrollToVisible( window, this.parentNode.parentNode ); return false;">My Term</a>
<a name="557459045_anchor1">
</a>
</div>
<div class="GlossaryPageDefinition" id="MCDropDownBody_557459045_0" style="display: none;">My definition</div>
</div>
</div>
<p>&#160;</p>
<script type="text/javascript" src="SkinSupport/MadCapBodyEnd.js">
</script>
</body>
</html>
+28
View File
@@ -0,0 +1,28 @@
CMCXmlParser._FilePathToXmlStringMap.Add(
'Glossary',
'<?xml version=\"1.0\" encoding=\"utf-8\"?>' +
'<html xmlns:MadCap=\"http://www.madcapsoftware.com/Schemas/MadCap.xsd\" MadCap:disableMasterStylesheet=\"true\" MadCap:tocPath=\"\" MadCap:InPreviewMode=\"false\" MadCap:PreloadImages=\"false\" MadCap:RuntimeFileType=\"Glossary\" MadCap:TargetType=\"WebHelp\" lang=\"en-us\" xml:lang=\"en-us\" MadCap:PathToHelpSystem=\"../\" MadCap:HelpSystemFileName=\"Default.xml\">' +
' <head>' +
' <link href=\"SkinSupport/MadCap.css\" rel=\"stylesheet\" type=\"text/css\" />' +
' <title>Glossary</title>' +
' <link href=\"Resources/Stylesheets/BSE_Help.css\" rel=\"stylesheet\" type=\"text/css\" />' +
' <script src=\"SkinSupport/MadCapAll.js\" type=\"text/javascript\">' +
' </script>' +
' </head>' +
' <body style=\"background-color: #fafafa;\">' +
' <div id=\"GlossaryBody\">' +
' <div class=\"GlossaryPageEntry\">' +
' <div class=\"GlossaryPageTerm\">' +
' <a href=\"javascript:void(0);\" class=\"GlossaryPageTerm\" id=\"MCDropDownHotSpot_557459045_0\" onclick=\"FMCDropDown( this ); FMCScrollToVisible( window, this.parentNode.parentNode ); return false;\">My Term</a>' +
' <a name=\"557459045_anchor1\">' +
' </a>' +
' </div>' +
' <div class=\"GlossaryPageDefinition\" id=\"MCDropDownBody_557459045_0\" style=\"display: none;\">My definition</div>' +
' </div>' +
' </div>' +
' <p>&#160;</p>' +
' <script type=\"text/javascript\" src=\"SkinSupport/MadCapBodyEnd.js\">' +
' </script>' +
' </body>' +
'</html>'
);
+25
View File
@@ -0,0 +1,25 @@
<?xml version="1.0" encoding="utf-8"?>
<html xmlns:MadCap="http://www.madcapsoftware.com/Schemas/MadCap.xsd" MadCap:disableMasterStylesheet="true" MadCap:tocPath="" MadCap:InPreviewMode="false" MadCap:PreloadImages="false" MadCap:RuntimeFileType="Glossary" MadCap:TargetType="WebHelp" lang="en-us" xml:lang="en-us" MadCap:PathToHelpSystem="../" MadCap:HelpSystemFileName="Default.xml">
<head>
<link href="SkinSupport/MadCap.css" rel="stylesheet" type="text/css" />
<title>Glossary</title>
<link href="Resources/Stylesheets/BSE_Help.css" rel="stylesheet" type="text/css" />
<script src="SkinSupport/MadCapAll.js" type="text/javascript">
</script>
</head>
<body style="background-color: #fafafa;">
<div id="GlossaryBody">
<div class="GlossaryPageEntry">
<div class="GlossaryPageTerm">
<a href="javascript:void(0);" class="GlossaryPageTerm" id="MCDropDownHotSpot_557459045_0" onclick="FMCDropDown( this ); FMCScrollToVisible( window, this.parentNode.parentNode ); return false;">My Term</a>
<a name="557459045_anchor1">
</a>
</div>
<div class="GlossaryPageDefinition" id="MCDropDownBody_557459045_0" style="display: none;">My definition</div>
</div>
</div>
<p>&#160;</p>
<script type="text/javascript" src="SkinSupport/MadCapBodyEnd.js">
</script>
</body>
</html>
@@ -0,0 +1,464 @@
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns:MadCap="http://www.madcapsoftware.com/Schemas/MadCap.xsd" MadCap:lastBlockDepth="6" MadCap:lastHeight="94" MadCap:lastWidth="853" MadCap:disableMasterStylesheet="true" MadCap:tocPath="" MadCap:InPreviewMode="false" MadCap:PreloadImages="false" MadCap:RuntimeFileType="Topic" MadCap:TargetType="WebHelp" lang="en-us" xml:lang="en-us" MadCap:PathToHelpSystem="../../" MadCap:HelpSystemFileName="Default.xml" MadCap:SearchType="Stem">
<head><title>Products</title>
<link href="../SkinSupport/MadCap.css" rel="stylesheet" />
<link href="../Resources/Stylesheets/BSE_Help.css" rel="stylesheet" />
<script src="../SkinSupport/MadCapAll.js" type="text/javascript">
</script>
</head>
<body>
<div class="MCBreadcrumbsBox_0"><span class="MCBreadcrumbsPrefix">You are here: </span><span class="MCBreadcrumbs">Products</span>
</div>
<h1>BASIC Stamp Comparison Chart</h1>
<p class="PlainText">BASIC Stamp microcontroller modules are like tiny single-board computers.&#160; Many projects that require an embedded system with some level of intelligence can use a BASIC Stamp module as the controller. Each BASIC Stamp module contains a PBASIC Interpreter chip, internal memory (RAM and EEPROM), a 5-volt regulator, a number of general-purpose I/O pins (TTL-level, 0-5 volts), and a set of built-in commands for math and I/O pin operations.&#160; </p>
<p class="PlainText">See the <a href="PinDesc.htm" target="" title="" alt="" class="MCXref_0" xrefformat="{paratext}">Pin Descriptions</a> <![CDATA[ ]]>and <a href="ConnSchematics.htm" target="" title="" alt="" class="MCXref_0" xrefformat="{paratext}">Connection Schematics</a> pages for more information.</p>
<table width="100%" cellpadding="4" cellspacing="0" border="1">
<tr align="center" bgcolor="CFCFCF">
<td width="12%">&#160;</td>
<td>
<img src="../Resources/Images/ClearBS1.png" />
</td>
<td>
<img src="../Resources/Images/ClearBS2.png" />
</td>
<td>
<img src="../Resources/Images/ClearBS2sx.png" />
</td>
<td>
<img src="../Resources/Images/ClearBS2e.png" />
</td>
<td>
<img src="../Resources/Images/ClearBS2p24.png" />
</td>
<td>
<img src="../Resources/Images/ClearBS2p40.png" />
</td>
<td>
<img src="../Resources/Images/ClearBS2pe.png" />
</td>
<td>
<img src="../Resources/Images/ClearBS2px.png" />
</td>
</tr>
<tr align="center">
<td width="10%" bgcolor="CFCFCF">Name</td>
<td>BS1
</td>
<td>BS2
</td>
<td>BS2e
</td>
<td>BS2sx
</td>
<td>BS2p24
</td>
<td>BS2p40
</td>
<td>BS2pe
</td>
<td>BS2px
</td>
</tr>
<tr align="center">
<td width="10%" bgcolor="CFCFCF">Features</td>
<td>Affordable yet capable, the original BASIC Stamp is perfect for smaller projects or tight spaces.</td>
<td>Ideal for beginners yet quite powerful, with a vast resource base and sample code. Core of the Stamps in Class program.</td>
<td>Perfect for those who have experience with the BASIC Stamp 2 and would like more variable and program space.</td>
<td>Supports the BS2 command set with more variable and program space, and 2.5 times the execution speed.</td>
<td>Special commands support I/O polling, character LCDs, and i2C and 1-Wire protocols. </td>
<td>All of the features of the BS2p, plus an additional bank of 16 I/O&#160;pins.</td>
<td>BS2p command set paired with lower power consumption and more memory for battery-powered data logging applications.</td>
<td>The fastest BASIC Stamp microcontroller supports the BS2p command set as well as special I/O configuration features.</td>
</tr>
<tr align="center">
<td bgcolor="CFCFCF" width="11%">Environment**
</td>
<td>
<p>-40 to +85 ºC</p>
<p> (-40 to +185 F)
</p>
</td>
<td>
<p>-40 to +85 ºC</p>
<p>(-40 to +185 F)
</p>
</td>
<td>
<p>-40 to +85 ºC</p>
<p>(-40 to +185 F)
</p>
</td>
<td>
<p>-40 to +85 ºC</p>
<p>(-40 to +185 F)
</p>
</td>
<td>
<p>-40 to +85 ºC</p>
<p>(-40 to +185 F)
</p>
</td>
<td>
<p>0 to +70 ºC</p>
<p>(32 to +158 ºF)
</p>
</td>
<td>
<p>0 to +70 ºC</p>
<p>(32 to +158 ºF)
</p>
</td>
<td>
<p>0 to +70 ºC</p>
<p>(32 to +158 ºF)
</p>
</td>
</tr>
<tr align="center">
<td bgcolor="CFCFCF" width="11%">PBASIC Interpreter chip
</td>
<td>Microchip PIC'56
</td>
<td>Microchip PIC'57
</td>
<td>Ubicom SX28
</td>
<td>Ubicom SX28
</td>
<td>Ubicom SX48
</td>
<td>Ubicom SX48
</td>
<td>Ubicom SX48
</td>
<td>Ubicom SX48
</td>
</tr>
<tr align="center">
<td bgcolor="CFCFCF" width="11%">Processor Speed
</td>
<td>4 MHz
</td>
<td>20 MHz
</td>
<td>20 MHz
</td>
<td>50 MHz
</td>
<td>20 MHz Turbo
</td>
<td>20 MHz Turbo
</td>
<td>8 MHz Turbo
</td>
<td>32 MHz Turbo
</td>
</tr>
<tr align="center">
<td bgcolor="CFCFCF" width="11%">Program Execution Speed
</td>
<td>~2,000 instructions/sec.
</td>
<td>~4,000
instructions/sec.
</td>
<td>~4,000 instructions/sec.
</td>
<td>~10,000 instructions/sec.
</td>
<td>~12,000 instructions/sec.
</td>
<td>~12,000 instructions/sec.
</td>
<td>~6000 instructions/sec.
</td>
<td>~19,000 instructions/sec.
</td>
</tr>
<tr align="center">
<td bgcolor="CFCFCF" width="11%">RAM Size
</td>
<td>16 Bytes (2 I/O, 14 Variable)
</td>
<td>32 Bytes
(6 I/O, 26 Variable)
</td>
<td>32 Bytes (6 I/O, 26 Variable)
</td>
<td>32 Bytes
(6 I/O, 26 Variable)
</td>
<td>38 Bytes
(12 I/O, 26 Variable)
</td>
<td>38 Bytes
(12 I/O, 26 Variable)
</td>
<td>38 Bytes
(12 I/O, 26 Variable)
</td>
<td>38 Bytes
(12 I/O, 26 Variable)
</td>
</tr>
<tr align="center">
<td bgcolor="CFCFCF" width="11%">Scratchpad RAM
</td>
<td>N/A
</td>
<td>N/A
</td>
<td>64 Bytes
</td>
<td>64 Bytes
</td>
<td>128 Bytes
</td>
<td>128 Bytes
</td>
<td>128 Bytes
</td>
<td>128 Bytes
</td>
</tr>
<tr align="center">
<td bgcolor="CFCFCF" width="11%">EEPROM (Program) Size
</td>
<td>256 Bytes,
~80 instructions
</td>
<td>2K Bytes,
~500 instructions
</td>
<td>8 x 2K Bytes,
~4,000 inst
</td>
<td>8 x 2K Bytes,
~4,000 instructions
</td>
<td>8 x 2K Bytes,
~4,000 instructions
</td>
<td>8 x 2K Bytes,
~4,000 instructions
</td>
<td>16 x 2K Bytes
(16 K for source)
</td>
<td>8 x 2K Bytes,
~4,000 instructions
</td>
</tr>
<tr align="center">
<td bgcolor="CFCFCF" width="11%">Number of I/O Pins
</td>
<td>8
</td>
<td>16 + 2 Dedicated Serial
</td>
<td>16 + 2 Dedicated Serial
</td>
<td>16 + 2 Dedicated Serial
</td>
<td>16 + 2 Dedicated Serial
</td>
<td>32 + 2 Dedicated Serial
</td>
<td>16 + 2 Dedicated Serial
</td>
<td>16 + 2 Dedicated Serial
</td>
</tr>
<tr align="center">
<td bgcolor="CFCFCF" width="11%">Regulated Voltage Requirements
</td>
<td>5 - 15 VDC </td>
<td>5 - 15 VDC </td>
<td>5 - 12 VDC </td>
<td>5 - 12 VDC </td>
<td>5 - 12 VDC </td>
<td>5 - 12 VDC </td>
<td>5 - 12 VDC </td>
<td>5 - 12 VDC </td>
</tr>
<tr align="center">
<td bgcolor="CFCFCF" width="11%">Current Draw@ 5 volts
</td>
<td>1 mA Run,
25 µA Sleep
</td>
<td>3 mA Run,
50 µA Sleep
</td>
<td>25 mA Run,
200 µA Sleep
</td>
<td>60 mA Run,&#160;
500 µA Sleep
</td>
<td>40 mA Run,
350 µA Sleep
</td>
<td>40 mA Run,
350 µA Sleep
</td>
<td>15 mA Run,
150 µA Sleep
</td>
<td>55 mA Run,
450 µA Sleep
</td>
</tr>
<tr align="center">
<td bgcolor="CFCFCF" width="11%">Source/Sink Current per I/O
</td>
<td>20 mA / 25 mA
</td>
<td>20 mA / 25 mA
</td>
<td>30 mA / 30 mA
</td>
<td>30 mA / 30 mA
</td>
<td>30 mA /
30 mA
</td>
<td>30 mA / 30 mA
</td>
<td>30 mA / 30 mA
</td>
<td>30 mA / 30 mA
</td>
</tr>
<tr align="center">
<td bgcolor="CFCFCF" width="11%">Source/Sink
Current per unit
</td>
<td>40 mA / 50 mA
</td>
<td>40 mA / 50 mA
per 8 I/O pins
</td>
<td>60 mA / 60 mA
per 8 I/O pins
</td>
<td>60 mA / 60 mA
per 8 I/O pins
</td>
<td>60 mA / 60 mA
per 8 I/O pins
</td>
<td>60 mA /60 mA
per 8 I/O pins
</td>
<td>60 mA / 60 mA
per 8 I/O pins
</td>
<td>60 mA / 60 mA
per 8 I/O pins
</td>
</tr>
<tr align="center">
<td bgcolor="CFCFCF" width="11%">PBASIC Commands*
</td>
<td>32
</td>
<td>42
</td>
<td>45
</td>
<td>45
</td>
<td>61
</td>
<td>61
</td>
<td>61
</td>
<td>63
</td>
</tr>
<tr align="center">
<td bgcolor="CFCFCF" width="11%">PC Interface
</td>
<td>Serial
(w/BS1 Serial Adapter)
</td>
<td>Serial
(9600 baud)
</td>
<td>Serial (9600 baud)
</td>
<td>Serial (9600 baud)
</td>
<td>Serial (9600 baud)
</td>
<td>Serial
(9600 baud)
</td>
<td>Serial (9600 baud)
</td>
<td>Serial (19200 baud)
</td>
</tr>
<tr align="center">
<td bgcolor="CFCFCF" width="11%">Windows Text Editor Version
</td>
<td>Stampw.exe (v2.1 and up)
</td>
<td>Stampw.exe (v1.04 and up)
</td>
<td>Stampw.exe
(v1.096 and up)
</td>
<td>Stampw.exe
(v1.091 and up)
</td>
<td>Stampw.exe
(v1.1 and up)
</td>
<td>Stampw.exe
(v1.1 and up)
</td>
<td>Stampw.exe
(v1.33 and up)
</td>
<td>Stampw.exe
(v2.2 and up)
</td>
</tr>
</table>
<p class="PlainText">*PBASIC command count totals include PBASIC 2.5 on all BS2 models.</p>
<p class="PlainText">**Environment ratings may change with future hardware revisions; please <a href="../HomeTopics/Resources.htm#Contact_Parallax" target="" title="" alt="" class="MCXref_0" xrefformat="{paratext}">Contact Parallax</a> for more information.</p>
<div class="Col2">
<div class="MasterFoot">
<p MadCap:conditions="BSEconditions.BSEWebHelp (Primary)-INCLUDE"><a href="../HomeTopics/HomePage.htm">Go to Welcome page</a>
</p>
</div>
</div>
<div class="Col2">
<div class="MasterFoot">
<p style="text-align: right;"><span class="ContactInfoProjectName">BASIC Stamp Help</span> <![CDATA[ ]]><span class="ContactInfoVersion#">Version 2.5.4</span> <![CDATA[ ]]></p>
<p style="text-align: right;">Copyright ©&#160;<span class="ContactInfoCompanyName">Parallax Inc.</span></p>
<p style="text-align: right;"><span class="SystemShortDate">8/8/2012</span>
</p>
</div>
</div>
<script type="text/javascript">/* <![CDATA[ */
var _gaq = _gaq || [];
_gaq.push(['_setAccount', 'UA-285614-1']);
_gaq.push(['_trackPageview']);
(function() {
var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
})();
/* ]]> */</script>
<script type="text/javascript" src="../SkinSupport/MadCapBodyEnd.js">
</script>
</body>
</html>
@@ -0,0 +1,74 @@
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns:MadCap="http://www.madcapsoftware.com/Schemas/MadCap.xsd" MadCap:lastBlockDepth="6" MadCap:lastHeight="94" MadCap:lastWidth="853" MadCap:disableMasterStylesheet="true" MadCap:tocPath="BASIC Stamp Hardware" MadCap:InPreviewMode="false" MadCap:PreloadImages="false" MadCap:RuntimeFileType="Topic" MadCap:TargetType="WebHelp" lang="en-us" xml:lang="en-us" MadCap:PathToHelpSystem="../../" MadCap:HelpSystemFileName="Default.xml" MadCap:SearchType="Stem">
<head><title>Connection Schematics</title>
<link href="../SkinSupport/MadCap.css" rel="stylesheet" />
<link href="../Resources/Stylesheets/BSE_Help.css" rel="stylesheet" />
<script src="../SkinSupport/MadCapAll.js" type="text/javascript">
</script>
</head>
<body>
<div class="MCBreadcrumbsBox_0"><span class="MCBreadcrumbsPrefix">You are here: </span><a class="MCBreadcrumbsLink" href="BS_Chart.htm">BASIC Stamp Hardware</a><span class="MCBreadcrumbsDivider"> &gt; </span><span class="MCBreadcrumbs">Connection Schematics</span>
</div>
<h1>Connection Schematics</h1>
<p class="PlainText">We recommend using a Parallax development board and cable for programming BASIC Stamp modules. When these items are not available, you may create your own board by duplicating the following diagrams with your own circuits and cables.</p>
<p class="PlainText">Be very careful to follow these diagrams closely; it is quite common for programming problems with the BASIC Stamp to be a result of a poorly made custom cable or programming connections on your applications board. For example, with the programming connections for all the BS2 models, it is possible to reverse a couple of wires and still get positive results using some of the "connection" tests and yet you still will not be able to communicate with the BASIC Stamp. It is vital that you check your connections with a meter and verify the pin numbering to avoid problems like this.</p>
<h2>Programming and Run-time Communication Connections for all BS2 models</h2>
<p class="PlainText">Though it is not shown, power must be connected to the BASIC Stamp to program it. Note that the programming connections for the 40-pin BS2p40 are the same as for the 24-pin BS2 models.</p>
<p class="PlainText">
<img src="../Resources/Images/BS24connSchem.png" />
</p>
<p>&#160;</p>
<h2>BS1 Programming Connections with BS1 Serial Adapter</h2>
<p class="PlainText">Though it is not shown, power must be connected to the BS1 to program it.</p>
<p>
<img src="../Resources/Images/BS1connSchem.png" />
</p>
<p>&#160;</p>
<h3>BASIC Stamp 1 Serial Adapter</h3>
<p class="PlainText">Starting with Version 2.1, the BASIC Stamp Editor/Compiler supports programming
BASIC Stamp 1 modules through a standard serial connection using the adapter shown above and below. The adapter translates the voltage
and mechanical differences of the BS1 to be compatible with the serial port. For convenience, Parallax
manufactures the BASIC Stamp 1 Serial Adapter (#27111) that plugs into the end of a serial cable and connects
to the programming header of the BS1.</p>
<p>
<img src="../Resources/Images/BS1adapter.png" />
</p>
<p>&#160;</p>
<p class="PlainText">For those that would like to make their own adapter, the schematic is shown
below.</p>
<p>
<img src="../Resources/Images/BS1adapterSch.png" border="0" />
</p>
<p class="PlainText">&#160;</p>
<div class="Col2">
<div class="MasterFoot">
<p MadCap:conditions="BSEconditions.BSEWebHelp (Primary)-INCLUDE"><a href="../HomeTopics/HomePage.htm">Go to Welcome page</a>
</p>
</div>
</div>
<div class="Col2">
<div class="MasterFoot">
<p style="text-align: right;"><span class="ContactInfoProjectName">BASIC Stamp Help</span> <![CDATA[ ]]><span class="ContactInfoVersion#">Version 2.5.4</span> <![CDATA[ ]]></p>
<p style="text-align: right;">Copyright ©&#160;<span class="ContactInfoCompanyName">Parallax Inc.</span></p>
<p style="text-align: right;"><span class="SystemShortDate">8/8/2012</span>
</p>
</div>
</div>
<script type="text/javascript">/* <![CDATA[ */
var _gaq = _gaq || [];
_gaq.push(['_setAccount', 'UA-285614-1']);
_gaq.push(['_trackPageview']);
(function() {
var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
})();
/* ]]> */</script>
<script type="text/javascript" src="../SkinSupport/MadCapBodyEnd.js">
</script>
</body>
</html>
@@ -0,0 +1,492 @@
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns:MadCap="http://www.madcapsoftware.com/Schemas/MadCap.xsd" MadCap:lastBlockDepth="6" MadCap:lastHeight="94" MadCap:lastWidth="853" MadCap:disableMasterStylesheet="true" MadCap:tocPath="BASIC Stamp Hardware" MadCap:InPreviewMode="false" MadCap:PreloadImages="false" MadCap:RuntimeFileType="Topic" MadCap:TargetType="WebHelp" lang="en-us" xml:lang="en-us" MadCap:PathToHelpSystem="../../" MadCap:HelpSystemFileName="Default.xml" MadCap:SearchType="Stem">
<head><title>Pin Descriptions</title>
<link href="../SkinSupport/MadCap.css" rel="stylesheet" />
<link href="../Resources/Stylesheets/BSE_Help.css" rel="stylesheet" />
<script src="../SkinSupport/MadCapAll.js" type="text/javascript">
</script>
</head>
<body>
<div class="MCBreadcrumbsBox_0"><span class="MCBreadcrumbsPrefix">You are here: </span><a class="MCBreadcrumbsLink" href="BS_Chart.htm">BASIC Stamp Hardware</a><span class="MCBreadcrumbsDivider"> &gt; </span><span class="MCBreadcrumbs">Pin Descriptions</span>
</div>
<h1>Pin Descriptions</h1>
<div class="ImagePlusCaption">
<div class="Col2">
<p>
<img src="../graphics/pgm_icon1.gif" border="0" alt="BS1 icon" title="BS1 icon" />
<img src="../graphics/pgm_icon2.gif" border="0" alt="BS2 icon" title="BS2 icon" />
<img src="../graphics/pgm_icon2e.gif" border="0" alt="BS2e icon" title="BS2e icon" />
<img src="../graphics/pgm_icon2sx.gif" border="0" alt="BS2sx icon" title="BS2sx icon" />
<img src="../graphics/pgm_icon2p.gif" border="0" alt="BS2p icon" title="BS2p icon" />
<img src="../graphics/pgm_icon2pe.gif" border="0" alt="BS2pe icon" title="BS2pe icon" />
<img src="../graphics/pgm_icon2px.gif" border="0" alt="BS2px icon" title="BS2px icon" />
</p>
</div>
<p style="text-align: right;">&#160;</p>
<p>&#160;</p>
</div>
<p class="clear">&#160;</p>
<p class="PlainText">&#160;</p>
<h2>BASIC Stamp 1</h2>
<table width="100%" cellpadding="4" cellspacing="0" border="1">
<col />
<col />
<col />
<col />
<tr bgcolor="CFCFCF">
<td rowspan="8" style="background-color: #ffffff;">
<img src="../Resources/Images/BS1pinout.png" />
</td>
<td width="15%">Pin
</td>
<td width="15%">Name
</td>
<td width="70%">Description
</td>
</tr>
<tr>
<td>
<p>1</p>
</td>
<td>
<p>VIN</p>
</td>
<td>
<p>Unregulated power in: accepts 5.5 - 15 VDC (6-40 VDC on BS1&#8209;IC rev. b), which is then internally regulated to 5 volts. May be left unconnected if 5 volts is applied to the VDD (+5V) pin.</p>
</td>
</tr>
<tr>
<td>
<p>2</p>
</td>
<td>
<p>VSS</p>
</td>
<td>
<p>System ground: connects to BS1 Serial Adapter ground for programming.</p>
</td>
</tr>
<tr>
<td>
<p>3</p>
</td>
<td>
<p>PCO</p>
</td>
<td>
<p>PC Out: 4800 baud serial output (TTL level) to PC.</p>
</td>
</tr>
<tr>
<td>
<p>4</p>
</td>
<td>
<p>PCI</p>
</td>
<td>
<p>PC In:&#160; 4800 baud serial input (TTL level) from PC.</p>
</td>
</tr>
<tr>
<td>
<p>5</p>
</td>
<td>
<p>VDD</p>
</td>
<td>
<p>5-volt DC input/output: (Also called +5V) if an unregulated voltage is applied to the VIN pin, then this pin will output 5 volts.&#160; If no voltage is applied to the VIN pin, then a regulated voltage between 4.5V and 5.5V should be applied to this pin.</p>
</td>
</tr>
<tr>
<td>
<p>6</p>
</td>
<td>
<p>RES</p>
</td>
<td>
<p>Reset input/output: goes low when power supply is less than approximately 4.2 volts, causing the BASIC Stamp to reset.&#160; Can be driven low to force a reset.&#160; This pin is internally pulled high and may be left disconnected if not needed.&#160; Do not drive high.</p>
</td>
</tr>
<tr>
<td>
<p>7-14</p>
</td>
<td>
<p>P0-P7</p>
</td>
<td>
<p>General-purpose I/O pins: each can sink 25 mA and source 20 mA. However, the total of all pins should not exceed 50 mA (sink) and 40 mA (source).</p>
</td>
</tr>
</table>
<h2>BASIC Stamp 2</h2>
<table width="100%" cellpadding="4" cellspacing="0" border="1">
<col />
<col />
<col />
<col />
<tr bgcolor="CFCFCF">
<td rowspan="10" style="background-color: #ffffff;">
<img src="../Resources/Images/BS24_dimensions.png" />
</td>
<td width="15%">Pin
</td>
<td width="15%">Name
</td>
<td width="70%">Description
</td>
</tr>
<tr>
<td>1
</td>
<td>SOUT
</td>
<td>Serial Out: connects to PC serial port RX pin (DB9 pin 2 / DB25 pin 3) for programming.
</td>
</tr>
<tr>
<td>2
</td>
<td>SIN
</td>
<td>Serial In: connects to PC serial port TX pin (DB9 pin 3 / DB25 pin 2) for programming.
</td>
</tr>
<tr>
<td>3
</td>
<td>ATN
</td>
<td>Attention: connects to PC serial port DTR pin (DB9 pin 4 / DB25 pin 20) for programming.
</td>
</tr>
<tr>
<td>4
</td>
<td>VSS
</td>
<td>System ground: (same as pin 23) connects to PC serial port GND pin (DB9 pin 5 / DB25 pin 7) for programming.
</td>
</tr>
<tr>
<td>5-20
</td>
<td>P0-P15
</td>
<td>General-purpose I/O pins: each can sink 25 mA and source 20 mA. However, the total of all pins should not exceed 50 mA (sink) and 40 mA (source) if using the internal 5-volt regulator.&#160; The total per 8-pin groups (P0 P7 or P8 15) should not exceed 50 mA (sink) and 40 mA (source) if using an external 5-volt regulator.
</td>
</tr>
<tr>
<td>21
</td>
<td>VDD
</td>
<td>5-volt DC input/output: if an unregulated voltage is applied to the VIN pin, then this pin will output 5 volts.&#160; If no voltage is applied to the VIN pin, then a regulated voltage between 4.5V and 5.5V should be applied to this pin.
</td>
</tr>
<tr>
<td>22
</td>
<td>RES
</td>
<td>Reset input/output: goes low when power supply is less than approximately 4.2 volts, causing the BASIC Stamp to reset.&#160; Can be driven low to force a reset.&#160; This pin is internally pulled high and may be left disconnected if not needed.&#160; Do not drive high.
</td>
</tr>
<tr>
<td>23
</td>
<td>VSS
</td>
<td>System ground: (same as pin 4) connects to power supplys ground (GND) terminal.
</td>
</tr>
<tr>
<td>24
</td>
<td>VIN
</td>
<td>Unregulated power in: accepts 5.5 - 15 VDC (6-40 VDC on BS2-IC Rev. e, f, and g), which is then internally regulated to 5 volts. Must be left unconnected if 5 volts is applied to the VDD (+5V) pin.
</td>
</tr>
</table>
<h2>BASIC Stamp 2e, 2sx, 2p, 2pe, 2px</h2>
<table width="100%" cellpadding="4" cellspacing="0" border="1">
<col />
<col />
<col />
<col />
<tr bgcolor="CFCFCF">
<td rowspan="10" style="background-color: #ffffff;">
<img src="../Resources/Images/BS24_dimensions.png" />
</td>
<td width="15%">Pin
</td>
<td width="15%">Name
</td>
<td width="70%">Description
</td>
</tr>
<tr>
<td>
<p>1</p>
</td>
<td>
<p>SOUT</p>
</td>
<td>
<p>Serial Out: connects to PC serial port RX pin (DB9 pin 2 / DB25 pin 3) for programming.</p>
</td>
</tr>
<tr>
<td>
<p>2</p>
</td>
<td>
<p>SIN</p>
</td>
<td>
<p>Serial In: connects to PC serial port TX pin (DB9 pin 3 / DB25 pin 2) for programming.</p>
</td>
</tr>
<tr>
<td>
<p>3</p>
</td>
<td>
<p>ATN</p>
</td>
<td>
<p>Attention: connects to PC serial port DTR pin (DB9 pin 4 / DB25 pin 20) for programming.</p>
</td>
</tr>
<tr>
<td>
<p>4</p>
</td>
<td>
<p>VSS</p>
</td>
<td>
<p>System ground: (same as pin 23), connects to PC serial port GND pin (DB9 pin 5 / DB25 pin 7) for programming.</p>
</td>
</tr>
<tr>
<td>
<p>5-20</p>
</td>
<td>
<p>P0-P15</p>
</td>
<td>
<p>General-purpose I/O pins: each can source and sink 30 mA. However, the total of all pins should not exceed 75 mA (source or sink) if using the internal 5-volt regulator.&#160; The total per 8-pin groups P0 P7 or P8 15 should not exceed 60 mA (source or sink) if using an external 5-volt regulator.</p>
</td>
</tr>
<tr>
<td>
<p>21</p>
</td>
<td>
<p>VDD</p>
</td>
<td>
<p>5-volt DC input/output: if an unregulated voltage is applied to the VIN pin, then this pin will output 5 volts.&#160; If no voltage is applied to the VIN pin, then a regulated voltage between 4.5V and 5.5V should be applied to this pin.</p>
</td>
</tr>
<tr>
<td>
<p>22 </p>
</td>
<td>
<p>RES</p>
</td>
<td>
<p>Reset input/output: goes low when power supply is less than approximately 4.2 volts, causing the BASIC Stamp to reset.&#160; Can be driven low to force a reset.&#160; This pin is internally pulled high and may be left disconnected if not needed.&#160; Do not drive high.</p>
</td>
</tr>
<tr>
<td>
<p>23 </p>
</td>
<td>
<p>VSS</p>
</td>
<td>
<p>System ground: (same as pin 4) connects to power supplys ground (GND) terminal.</p>
</td>
</tr>
<tr>
<td>
<p>24 </p>
</td>
<td>
<p>VIN</p>
</td>
<td>
<p>Unregulated power in: accepts 5.5 - 12 VDC (7.5 recommended), which is then internally regulated to 5 volts. Must be left unconnected if 5 volts is applied to the VDD (+5V) pin.</p>
</td>
</tr>
</table>
<h2>BASIC Stamp 2p40</h2>
<table width="100%" cellpadding="4" cellspacing="0" border="1">
<col />
<col />
<col />
<col />
<tr bgcolor="CFCFCF">
<td rowspan="11" style="background-color: #ffffff;">
<img src="../Resources/Images/BS40_dimensions.png" />
</td>
<td width="15%">Pin
</td>
<td width="15%">Name
</td>
<td width="70%">Description
</td>
</tr>
<tr>
<td>
<p>1</p>
</td>
<td>
<p>SOUT</p>
</td>
<td>
<p>Serial Out: connects to PC serial port RX pin (DB9 pin 2 / DB25 pin 3) for programming.</p>
</td>
</tr>
<tr>
<td>
<p>2</p>
</td>
<td>
<p>SIN</p>
</td>
<td>
<p>Serial In: connects to PC serial port TX pin (DB9 pin 3 / DB25 pin 2) for programming.</p>
</td>
</tr>
<tr>
<td>
<p>3</p>
</td>
<td>
<p>ATN</p>
</td>
<td>
<p>Attention: connects to PC serial port DTR pin (DB9 pin 4 / DB25 pin 20) for programming.</p>
</td>
</tr>
<tr>
<td>
<p>4</p>
</td>
<td>
<p>VSS</p>
</td>
<td>
<p>System ground: (same as pin 39) connects to PC serial port GND pin (DB9 pin 5 / DB25 pin 7) for programming.</p>
</td>
</tr>
<tr>
<td>
<p>5-20</p>
</td>
<td>
<p>P0-P15</p>
</td>
<td>
<p>General-purpose I/O pins: each can source and sink 30 mA. However, the total of all pins (including X0-X15) should not exceed 75 mA (source or sink) if using the internal 5-volt regulator.&#160; The total per 8-pin groups (P0 P7, P8 15, X0 X7 or X8 X15)&#160; should not exceed 100 mA (source or sink) if using an external 5-volt regulator.</p>
</td>
</tr>
<tr>
<td>
<p>21-36</p>
</td>
<td>
<p>X0-X15</p>
</td>
<td>
<p>Auxiliary Bank of General-purpose I/O pins: each can source and sink 30 mA. However, the total of all pins (including P0 P15) should not exceed 75 mA (source or sink) if using the internal 5-volt regulator.&#160; The total per 8-pin groups (P0 P7, P8 15, X0 X7 or X8 X15) should not exceed 60 mA (source or sink) if using an external 5-volt regulator.</p>
</td>
</tr>
<tr>
<td>
<p>37</p>
</td>
<td>
<p>VDD</p>
</td>
<td>
<p>5-volt DC input/output: if an unregulated voltage is applied to the VIN pin, then this pin will output 5 volts.&#160; If no voltage is applied to the VIN pin, then a regulated voltage between 4.5V and 5.5V should be applied to this pin.</p>
</td>
</tr>
<tr>
<td>
<p>38</p>
</td>
<td>
<p>RES</p>
</td>
<td>
<p>Reset input/output: goes low when power supply is less than approximately 4.2 volts, causing the BASIC Stamp to reset.&#160; Can be driven low to force a reset.&#160; This pin is internally pulled high and may be left disconnected if not needed.&#160; Do not drive high.</p>
</td>
</tr>
<tr>
<td>
<p>39</p>
</td>
<td>
<p>VSS</p>
</td>
<td>
<p>System ground: (same as pin 4) connects to power supplys ground (GND) terminal.</p>
</td>
</tr>
<tr>
<td>
<p>40</p>
</td>
<td>
<p>VIN</p>
</td>
<td>
<p>Unregulated power in: accepts 5.5 - 12 VDC (7.5 recommended), which is then internally regulated to 5 volts. Must be left unconnected if 5 volts is applied to the VDD (+5V) pin.</p>
</td>
</tr>
</table>
<p>&#160;</p>
<div class="Col2">
<div class="MasterFoot">
<p MadCap:conditions="BSEconditions.BSEWebHelp (Primary)-INCLUDE"><a href="../HomeTopics/HomePage.htm">Go to Welcome page</a>
</p>
</div>
</div>
<div class="Col2">
<div class="MasterFoot">
<p style="text-align: right;"><span class="ContactInfoProjectName">BASIC Stamp Help</span> <![CDATA[ ]]><span class="ContactInfoVersion#">Version 2.5.4</span> <![CDATA[ ]]></p>
<p style="text-align: right;">Copyright ©&#160;<span class="ContactInfoCompanyName">Parallax Inc.</span></p>
<p style="text-align: right;"><span class="SystemShortDate">8/8/2012</span>
</p>
</div>
</div>
<script type="text/javascript">/* <![CDATA[ */
var _gaq = _gaq || [];
_gaq.push(['_setAccount', 'UA-285614-1']);
_gaq.push(['_trackPageview']);
(function() {
var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
})();
/* ]]> */</script>
<script type="text/javascript" src="../SkinSupport/MadCapBodyEnd.js">
</script>
</body>
</html>
@@ -0,0 +1,62 @@
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns:MadCap="http://www.madcapsoftware.com/Schemas/MadCap.xsd" MadCap:lastBlockDepth="6" MadCap:lastHeight="94" MadCap:lastWidth="853" MadCap:disableMasterStylesheet="true" MadCap:tocPath="Welcome" MadCap:InPreviewMode="false" MadCap:PreloadImages="false" MadCap:RuntimeFileType="Topic" MadCap:TargetType="WebHelp" lang="en-us" xml:lang="en-us" MadCap:PathToHelpSystem="../../" MadCap:HelpSystemFileName="Default.xml" MadCap:SearchType="Stem">
<head><title>Fine Print</title>
<link href="../SkinSupport/MadCap.css" rel="stylesheet" />
<link href="../Resources/Stylesheets/BSE_Help.css" rel="stylesheet" />
<script src="../SkinSupport/MadCapAll.js" type="text/javascript">
</script>
</head>
<body>
<div class="MCBreadcrumbsBox_0"><span class="MCBreadcrumbsPrefix">You are here: </span><a class="MCBreadcrumbsLink" href="HomePage.htm">Welcome</a><span class="MCBreadcrumbsDivider"> &gt; </span><span class="MCBreadcrumbs">Fine Print</span>
</div>
<h1>Fine Print</h1>
<h2><a name="Copyrigh"></a>Copyright</h2>
<p class="PlainText">This <span class="ContactInfoProjectName">BASIC Stamp Help</span> is copyright © <span class="SystemShortDate">8/8/2012</span> by <span class="ContactInfoCompanyName">Parallax Inc.</span></p>
<p class="PlainText">No site license or end user license is required to use this software. By downloading or otherwise obtaining a copy of this software, you agree that it is to be used exclusively with Parallax BASIC Stamp products. Any other uses are not permitted and may represent a violation of Parallax copyrights, legally punishable according to Federal copyright or intellectual property laws. Any duplication of this documentation for commercial uses is expressly prohibited <span class="ContactInfoCompanyName">Parallax Inc.</span> Duplication for educational use is permitted subject to the following Conditions of Duplication: <span class="ContactInfoCompanyName">Parallax Inc.</span> grants the user a conditional right to download, duplicate, and distribute the Help content without Parallax's permission, under the following conditions: the material, or any portion thereof, may not be duplicated for commercial use; it may be duplicated only for educational purposes when used solely in conjunction with Parallax BASIC Stamp products, and the user may recover from the student only the cost of duplication.</p>
<p class="PlainText">Contact <a href="mailto:editor@parallax.com?subject=BASIC Stamp Editor Help Copyright">editor@parallax.com</a>.</p>
<h2>Trademark Information</h2>
<p class="PlainText">BASIC Stamp, Board of Education, and Boe-Bot are federally registered trademarks of <span class="ContactInfoCompanyName">Parallax Inc.</span></p>
<p class="PlainText">PBASIC, Parallax and the Parallax logo are trademarks of <span class="ContactInfoCompanyName">Parallax Inc.</span></p>
<p class="PlainText">Windows is a registered trademark of Microsoft Corporation.</p>
<p class="PlainText">I<sup>2</sup>C is a registered trademark of Philips Corporation.</p>
<p class="PlainText">1-Wire is a registered trademark of Maxim/Dallas Semiconductor. </p>
<p class="PlainText">Other brand and product names are trademarks or registered trademarks of
their respective holders.</p>
<h2>Disclaimer of Liability</h2>
<p class="PlainText"><span class="ContactInfoCompanyName">Parallax Inc.</span> is not responsible for special, incidental, or consequential
damages resulting from any breach of warranty, or under any legal theory,
including lost profits, downtime, goodwill, damage to or replacement of equipment
or property, and any costs of recovering, reprogramming, or reproducing any data
stored in or used with Parallax products. <span class="ContactInfoCompanyName">Parallax Inc.</span> is also not responsible for any personal damage, including that to life and health, resulting from use of any Parallax products. You take full responsibility for your BASIC Stamp application, no matter how life-threatening it may be.</p>
<div class="Col2">
<div class="MasterFoot">
<p MadCap:conditions="BSEconditions.BSEWebHelp (Primary)-INCLUDE"><a href="HomePage.htm">Go to Welcome page</a>
</p>
</div>
</div>
<div class="Col2">
<div class="MasterFoot">
<p style="text-align: right;"><span class="ContactInfoProjectName">BASIC Stamp Help</span> <![CDATA[ ]]><span class="ContactInfoVersion#">Version 2.5.4</span> <![CDATA[ ]]></p>
<p style="text-align: right;">Copyright ©&#160;<span class="ContactInfoCompanyName">Parallax Inc.</span></p>
<p style="text-align: right;"><span class="SystemShortDate">8/8/2012</span>
</p>
</div>
</div>
<script type="text/javascript">/* <![CDATA[ */
var _gaq = _gaq || [];
_gaq.push(['_setAccount', 'UA-285614-1']);
_gaq.push(['_trackPageview']);
(function() {
var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
})();
/* ]]> */</script>
<script type="text/javascript" src="../SkinSupport/MadCapBodyEnd.js">
</script>
</body>
</html>
@@ -0,0 +1,56 @@
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns:MadCap="http://www.madcapsoftware.com/Schemas/MadCap.xsd" MadCap:lastBlockDepth="5" MadCap:lastHeight="47" MadCap:lastWidth="590" MadCap:conditions="BSEconditions.BSEWebHelp (Primary)-INCLUDE,BSEconditions.BSHweb-PBASIC-EXCLUDE,BSEconditions.BSHweb-SIC-EXCLUDE,BSEconditions.BSHweb-Connect-EXCLUDE" MadCap:disableMasterStylesheet="true" MadCap:tocPath="" MadCap:InPreviewMode="false" MadCap:PreloadImages="false" MadCap:RuntimeFileType="Topic" MadCap:TargetType="WebHelp" lang="en-us" xml:lang="en-us" class="HomePage" MadCap:PathToHelpSystem="../../" MadCap:HelpSystemFileName="Default.xml" MadCap:SearchType="Stem">
<head><title>Welcome</title>
<link href="../SkinSupport/MadCap.css" rel="stylesheet" />
<link href="../Resources/Stylesheets/BSE_Help.css" rel="stylesheet" />
<script src="../SkinSupport/MadCapAll.js" type="text/javascript">
</script>
</head>
<body>
<div class="background">
<p style="text-align: center;">&#160;</p>
<p style="text-align: center;"><a href="http://www.parallax.com/" target="_blank" title="Open Parallax website in new window" alt="Open Parallax website in new window"><img src="../Resources/Images/ParallaxLogo-Chrome.png" /></a>
</p>
<p style="text-align: center;">
<img src="../Resources/Images/Clear_8_modules.png" style="padding-left: 0px;padding-top: 30px;padding-bottom: 30px;border-left-style: none;border-right-style: none;border-top-style: none;border-bottom-style: none;" />
</p>
<h1 style="text-align: center;"><span class="ContactInfoProjectName">BASIC Stamp Help</span> <![CDATA[ ]]><span class="ContactInfoVersion#">Version 2.5.4</span></h1>
<p style="text-align: center;">&#160;&#160;<a href="FinePrint.htm#Copyrigh">Copyright</a> © <span class="ContactInfoCompanyName">Parallax Inc.</span> <![CDATA[ ]]><span class="SystemShortDate">8/8/2012</span></p>
<p class="cheddarline">&#160;</p>
<div class="Col2">
<p><a href="WhatsNew.htm" target="" title="" alt="" class="MCXref_0">What's New</a>
</p>
<p>&#160;</p>
<p>&#160;</p>
<p>&#160;</p>
</div>
<div class="Col2">
<p style="text-align: right;"><a href="../StartTopics/Start.htm" target="" title="" alt="" class="MCXref_0">Getting Started with Stamps in Class</a>
</p>
<p style="text-align: right;"> <![CDATA[ ]]></p>
<p style="text-align: right;">&#160;</p>
<p style="text-align: right;">&#160;</p>
<p style="text-align: right;">&#160;</p>
</div>
<p>&#160;</p>
<p>&#160;</p>
<p>&#160;</p>
<p>&#160;</p>
<p>&#160;</p>
<p>&#160;</p>
<p>&#160;</p>
<p>&#160;</p>
<p>&#160;</p>
<p>&#160;</p>
<p>&#160;</p>
<p>&#160;</p>
<p>&#160;</p>
<p>&#160;</p>
<p>&#160;</p>
<p>&#160;</p>
</div>
<script type="text/javascript" src="../SkinSupport/MadCapBodyEnd.js">
</script>
</body>
</html>
@@ -0,0 +1,84 @@
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns:MadCap="http://www.madcapsoftware.com/Schemas/MadCap.xsd" MadCap:lastBlockDepth="6" MadCap:lastHeight="94" MadCap:lastWidth="853" MadCap:disableMasterStylesheet="true" MadCap:tocPath="Welcome" MadCap:InPreviewMode="false" MadCap:PreloadImages="false" MadCap:RuntimeFileType="Topic" MadCap:TargetType="WebHelp" lang="en-us" xml:lang="en-us" MadCap:PathToHelpSystem="../../" MadCap:HelpSystemFileName="Default.xml" MadCap:SearchType="Stem">
<head><title>Resources</title>
<link href="../SkinSupport/MadCap.css" rel="stylesheet" />
<link href="../Resources/Stylesheets/BSE_Help.css" rel="stylesheet" />
<script src="../SkinSupport/MadCapAll.js" type="text/javascript">
</script>
</head>
<body>
<div class="MCBreadcrumbsBox_0"><span class="MCBreadcrumbsPrefix">You are here: </span><a class="MCBreadcrumbsLink" href="HomePage.htm">Welcome</a><span class="MCBreadcrumbsDivider"> &gt; </span><span class="MCBreadcrumbs">Resources</span>
</div>
<h1>Resources</h1>
<h3 MadCap:conditions="BSEconditions.BSHweb-Connect-EXCLUDE,BSEconditions.BSHweb-PBASIC-EXCLUDE,BSEconditions.BSHweb-SIC-EXCLUDE,BSEconditions.BSEWebHelp (Primary)-INCLUDE">PDF files included with the BASIC Stamp Editor</h3>
<ul MadCap:conditions="BSEconditions.BSHweb-Connect-EXCLUDE,BSEconditions.BSHweb-PBASIC-EXCLUDE,BSEconditions.BSHweb-SIC-EXCLUDE,BSEconditions.BSEWebHelp (Primary)-INCLUDE">
<li value="1"><a href="../../../BASIC Stamp Manual v2.2.pdf" target="_blank" title="Open PDF in new window" alt="Open PDF in new window">BASIC Stamp Manual</a>
</li>
<li value="2"><a href="../../../What's A Microcontroller v3.0.pdf" target="_blank" title="Open PDF in new window" alt="Open PDF in new window">What's a Microcontroller? Tutorial</a>
</li>
</ul>
<h3>Additional Online Downloads &amp; Resources</h3>
<ul>
<li value="1">BASIC Stamp information: <a href="http://www.parallax.com/basicstamp" target="_blank" title="Open website in new window" alt="Open website in new window">www.parallax.com/basicstamp</a> <![CDATA[ ]]></li>
<li value="2">Latest Version of this software: <a href="http://www.parallax.com/basicstampsoftware" target="_blank" title="Open website in new window" alt="Open website in new window">www.parallax.com/basicstampsoftware</a></li>
<li value="3">Parallax Education and DIY tutorials: <a href="http://learn.parallax.com/" target="_blank">learn.parallax.com</a></li>
<li value="4">Parallax Forums: <a href="http://forums.parallax.com/forums/" title="Open website in new window" alt="Open website in new window" target="_blank">forums.parallax.com</a></li>
</ul>
<h2><a name="Contact_Parallax"></a>Contact Parallax</h2>
<h3>By telephone: <![CDATA[ ]]></h3>
<ul>
<li value="1">Technical Support: <span class="ContactInfoPhoneSupport">888-997-8267</span></li>
<li value="2">Sales: <span class="ContactInfoPhoneSales">888-512-1024</span></li>
<li value="3">Outside Continental US: <span class="ContactInfoPhoneMain">916-624-8333</span></li>
<li value="4">Fax: <span class="ContactInfoPhoneFax">916-624-8003</span></li>
</ul>
<h3>By email:</h3>
<ul>
<li value="1"><a href="mailto:support@parallax.com" title="Send email to Support" alt="Send email to Support">support@parallax.com</a>
</li>
<li value="2"><a href="mailto:sales@parallax.com" title="Send email to Sales" alt="Send email to Sales">sales@parallax.com</a>
</li>
<li value="3"><a href="mailto:editor@parallax.com?subject=BASIC Stamp Editor Help" title="Send email to Editor" alt="Send email to Editor">editor@parallax.com</a>
</li>
</ul>
<h3>Mailing Address:</h3>
<p class="PlainTextIndent"><span class="ContactInfoCompanyName">Parallax Inc.</span>
<br /><span class="ContactInfoAddrStreet">599 Menlo Drive</span>
<br /><span class="ContactInfoAddrCityStateZip">Rocklin, CA 95765</span>
<br /><span class="ContactInfoAddrCountry">USA</span>
</p>
<p>&#160;</p>
<p>For Copyright, Trademark, and Disclaimer of Liability, please read the <a href="FinePrint.htm" target="" title="" alt="" class="MCXref_0">Fine Print</a>.</p>
<p>&#160;</p>
<div class="Col2">
<div class="MasterFoot">
<p MadCap:conditions="BSEconditions.BSEWebHelp (Primary)-INCLUDE"><a href="HomePage.htm">Go to Welcome page</a>
</p>
</div>
</div>
<div class="Col2">
<div class="MasterFoot">
<p style="text-align: right;"><span class="ContactInfoProjectName">BASIC Stamp Help</span> <![CDATA[ ]]><span class="ContactInfoVersion#">Version 2.5.4</span> <![CDATA[ ]]></p>
<p style="text-align: right;">Copyright ©&#160;<span class="ContactInfoCompanyName">Parallax Inc.</span></p>
<p style="text-align: right;"><span class="SystemShortDate">8/8/2012</span>
</p>
</div>
</div>
<script type="text/javascript">/* <![CDATA[ */
var _gaq = _gaq || [];
_gaq.push(['_setAccount', 'UA-285614-1']);
_gaq.push(['_trackPageview']);
(function() {
var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
})();
/* ]]> */</script>
<script type="text/javascript" src="../SkinSupport/MadCapBodyEnd.js">
</script>
</body>
</html>
@@ -0,0 +1,135 @@
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns:MadCap="http://www.madcapsoftware.com/Schemas/MadCap.xsd" MadCap:lastBlockDepth="6" MadCap:lastHeight="94" MadCap:lastWidth="853" MadCap:disableMasterStylesheet="true" MadCap:tocPath="Welcome" MadCap:InPreviewMode="false" MadCap:PreloadImages="false" MadCap:RuntimeFileType="Topic" MadCap:TargetType="WebHelp" lang="en-us" xml:lang="en-us" MadCap:PathToHelpSystem="../../" MadCap:HelpSystemFileName="Default.xml" MadCap:SearchType="Stem">
<head><title>What's New</title>
<link href="../SkinSupport/MadCap.css" rel="stylesheet" />
<link href="../Resources/Stylesheets/BSE_Help.css" rel="stylesheet" />
<script src="../SkinSupport/MadCapAll.js" type="text/javascript">
</script>
</head>
<body>
<div class="MCBreadcrumbsBox_0"><span class="MCBreadcrumbsPrefix">You are here: </span><a class="MCBreadcrumbsLink" href="HomePage.htm">Welcome</a><span class="MCBreadcrumbsDivider"> &gt; </span><span class="MCBreadcrumbs">What's New</span>
</div>
<h1>What's New</h1>
<p class="PlainText">Each release of <span class="ContactInfoProjectName">BASIC Stamp Help</span> and the <span class="ContactInfoSoftwareName">BASIC Stamp Editor</span> software can include new or enhanced items that may not be readily apparent. This topic is a summary of these notable changes.</p>
<p class="PlainText">Note that these changes are also reflected in the online version of the Help files. The Online Help is divided into three sections:</p>
<ul>
<li style="font-style: normal;" value="1"><a href="http://www.parallax.com/portals/0/help/BASICStamp/Start/" target="_blank" title="Open online Help in new window" alt="Open online Help in new window">BASIC Stamp - Getting Started Help</a>
</li>
<li style="font-style: normal;" value="2"><a href="http://www.parallax.com/portals/0/help/BASICStamp/Connect/" target="_blank" title="Open online Help in new window" alt="Open online Help in new window">BASIC Stamp - Connection Help</a>
</li>
<li style="font-style: normal;" value="3"><a href="http://www.parallax.com/portals/0/help/BASICStamp/PBASIC/" target="_blank" title="Open online Help in new window" alt="Open online Help in new window">BASIC Stamp - PBASIC Language Help</a>
</li>
</ul>
<p style="font-style: normal;">&#160;</p>
<h2><span class="ContactInfoProjectName">BASIC Stamp Help</span>
</h2>
<h3><span class="ContactInfoVersion#">Version 2.5.4</span> <![CDATA[ ]]><span style="font-size: 8pt;">(Released with <span class="ContactInfoSoftwareName">BASIC Stamp Editor</span> Software <span class="ContactInfoIDEversionShort">v2.5.3</span>)</span> <![CDATA[  ]]></h3>
<ul>
<li style="font-style: normal;" value="1">A <a href="../LanguageTopics/Commands/SLEEP.htm#Sleep" target="" title="" alt="" class="MCXref_0">Sleep Units vs Sleep Resolution</a> section with a table and equations was added to the <span class="keyword_in_text">SLEEP</span> command explanation.</li>
<li style="font-style: normal;" value="2">Updated explanations of watchdog timer and power conserving commands for <a href="../LanguageTopics/Commands/END.htm" target="" title="" alt="" class="MCXref_0">END</a>, <a href="../LanguageTopics/Commands/NAP.htm">NAP</a>, <a href="../LanguageTopics/Commands/POLLWAIT.htm">POLLWAIT</a>, and <a href="../LanguageTopics/Commands/SLEEP.htm">SLEEP</a>&#160;commands.</li>
<li style="font-style: normal;" value="3">Added USB 3.0 Caution to all the board connection topics in <a href="../StartTopics/Start.htm" target="" title="" alt="" class="MCXref_0">Getting Started with Stamps in Class</a>, and to <a href="../FAQTopics/TFAQ.htm" target="" title="" alt="" class="MCXref_0">Connection Troubleshooting</a>.</li>
<li style="font-style: normal;" value="4">Various small misspellings were corrected.</li>
</ul>
<h3>Version 2.5.3 <span style="font-size: 8pt;">(Released on web only)</span> <![CDATA[  ]]></h3>
<ul>
<li style="font-style: normal;" value="1">The hardware portion of the <a href="../StartTopics/Start.htm" target="" title="" alt="" class="MCXref_0">Getting Started with Stamps in Class</a> section was expanded to support the <a href="../StartTopics/HWB-usb.htm" target="" title="" alt="" class="MCXref_0">HomeWork Board - USB&#160;</a>. </li>
<li style="font-style: normal;" value="2">A note about USB Boards and Resets was added at the bottom of the <a href="../StartTopics/HWB-usb.htm" target="" title="" alt="" class="MCXref_0">HomeWork Board - USB&#160;</a> and <a href="../StartTopics/BOE-usb.htm" target="" title="" alt="" class="MCXref_0">Board of Education - USB</a> topics. It links to the next item.</li>
<li style="font-style: normal;" value="3">An extensive article <a href="../FAQTopics/UsbBoardResets.htm" target="" title="" alt="" class="MCXref_0">USB Resets BASIC Stamp</a> was added, with explanations and programming tips.</li>
</ul>
<h3>Version 2.5.2 <span style="font-size: 8pt;">(Released with <span class="ContactInfoSoftwareName">BASIC Stamp Editor</span> Software v2.5.2)</span> <![CDATA[  ]]></h3>
<ul>
<li style="font-style: normal;" value="1">No updates to help other than this page to reflect new version of software.</li>
</ul>
<h3>Version 2.5.1 <span style="font-size: 8pt;">(Released with <span class="ContactInfoSoftwareName">BASIC Stamp Editor</span> Software v2.5.1)</span>&#160;</h3>
<ul>
<li value="1">Updated <a href="../FAQTopics/TFAQ.htm" target="" title="" alt="" class="MCXref_0">Connection Troubleshooting</a> system to direct user to <a href="../FAQTopics/LatencyTimer.htm" target="" title="" alt="" class="MCXref_0">Latency Timer Settings</a> if experiencing intermittent programming connection.</li>
<li style="font-style: normal;" value="2">Corrected some tiny text errors.</li>
</ul>
<h3>Version 2.5 <![CDATA[ ]]><span style="font-size: 8pt;">(Released with BASIC Stamp Editor Software v2.5)</span></h3>
<p class="PlainText">This is a much-improved help system that coincides with the release of <i>What's A Microcontroller? v3.0</i>.</p>
<ul>
<li style="font-style: normal;" value="1">Now includes a <a href="../StartTopics/Start.htm" target="" title="" alt="" class="MCXref_0">Getting Started with Stamps in Class</a> section to assist new users following Stamps in Class tutorials such as <i>What's a Microcontroller?</i> and <i>Robotics with the Boe-Bot</i>.</li>
<li style="font-style: normal;" value="2">Features step-by-step <a href="../FAQTopics/TFAQ.htm" target="" title="" alt="" class="MCXref_0">Connection Troubleshooting</a> details to help resolve BASIC&#160;Stamp setup issues.</li>
<li style="font-style: normal;" value="3"><a href="../HardwareTopics/BS_Chart.htm">BASIC&#160;Stamp Hardware</a> details now include feature comparisons and notes about hardware functions.</li>
<li style="font-style: normal;" value="4">Tips are now included for those who want to <a href="../LanguageTopics/Reference/Adapt.htm" target="" title="" alt="" class="MCXref_0">Adapt BS2 Code to Other Models</a>.</li>
<li style="font-style: normal;" value="5">Improvements were made to discussions of <a href="../LanguageTopics/Reference/Operators.htm" target="" title="" alt="" class="MCXref_0">PBASIC Operators</a>, <a href="../LanguageTopics/Reference/MemoryOrg.htm" target="" title="" alt="" class="MCXref_0">Memory Organization </a>, <a href="../LanguageTopics/Reference/Variables.htm" target="" title="" alt="" class="MCXref_0">Variables</a>, and <a href="../LanguageTopics/Reference/Directives.htm" target="" title="" alt="" class="MCXref_0">Compiler Directives</a>.</li>
<li style="font-style: normal;" value="6">Contains many enhancements to aid navigation, save favorite topics for later, search for information, and find additional BASIC&#160;Stamp resources.</li>
<li style="font-style: normal;" value="7">Published in Web Help format (.htm).</li>
</ul>
<h3>Versions 1.0 - 1.4</h3>
<p class="PlainText">The first releases of <span class="ContactInfoProjectName">BASIC Stamp Help</span> in compiled HTML help format (.chm).</p>
<p>&#160;</p>
<p>&#160;</p>
<h2><span class="ContactInfoSoftwareName">BASIC Stamp Editor</span> Software</h2>
<h3>Version 2.5.3</h3>
<h4>General</h4>
<ul>
<li value="1">Updated installer to include BASIC Stamp Help v2.5.4 and updated a few related source code examples.</li>
<li value="2">Updated BASIC Stamp Editor to include the adjusted source code examples in module libraries.</li>
</ul>
<h3>Version 2.5.2</h3>
<h4>Bug Fix</h4>
<ul>
<li value="1">Fixed bug that was preventing the Generate Object Code feature from properly extracting the Stamp Loader.</li>
</ul>
<p>&#160;</p>
<h3>Version 2.5.1</h3>
<h4>Bug Fix</h4>
<ul>
<li value="1">Fixed bug causing Edit Tips button to fail on the Tip of the Day window.</li>
<li value="2">Fixed bug causing copy/paste operations to fail from BASIC&#160;Stamp Help.</li>
</ul>
<h4>General</h4>
<ul>
<li value="1">Updated error 305 - "Hardware communication failure! Check serial cable and power supply" to use the term "programming cable" instead of "serial cable" since it applies to both serial cables and USB cables.</li>
<li value="2">Fixed misspelled word "occurrence" in error and status messages.</li>
<li value="3">Updated Run menu to include function key shortcuts instead of Ctrl+ shortcuts. NOTE: Ctrl+ shortcuts still remain in effect.</li>
<li value="4">Added serial search rule to automatically exclude the PropScope from serial port search operations.</li>
</ul>
<h4>Misc</h4>
<ul>
<li value="1">Updated the included Parallax USB&#160;Driver Installer to <span>v2.08.02</span>.</li>
</ul>
<p>&#160;</p>
<h3>Version 2.5</h3>
<h4>General</h4>
<ul>
<li value="1">Enhanced Help menu to include links to new BASIC Stamp Help, <i>BASIC Stamp Manual v2.2</i>, and <i>What's A Microcontroller? v3.0</i> text.</li>
<li value="2">Updated a number of example BASIC Stamp programs.</li>
</ul>
<h4>Misc</h4>
<ul>
<li value="1">Replaced USB Drivers with Parallax USB&#160;Driver Installer v2.04.16 (R2).</li>
</ul>
<div class="Col2">
<div class="MasterFoot">
<p MadCap:conditions="BSEconditions.BSEWebHelp (Primary)-INCLUDE"><a href="HomePage.htm">Go to Welcome page</a>
</p>
</div>
</div>
<div class="Col2">
<div class="MasterFoot">
<p style="text-align: right;"><span class="ContactInfoProjectName">BASIC Stamp Help</span> <![CDATA[ ]]><span class="ContactInfoVersion#">Version 2.5.4</span> <![CDATA[ ]]></p>
<p style="text-align: right;">Copyright ©&#160;<span class="ContactInfoCompanyName">Parallax Inc.</span></p>
<p style="text-align: right;"><span class="SystemShortDate">8/8/2012</span>
</p>
</div>
</div>
<script type="text/javascript">/* <![CDATA[ */
var _gaq = _gaq || [];
_gaq.push(['_setAccount', 'UA-285614-1']);
_gaq.push(['_trackPageview']);
(function() {
var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
})();
/* ]]> */</script>
<script type="text/javascript" src="../SkinSupport/MadCapBodyEnd.js">
</script>
</body>
</html>
@@ -0,0 +1,121 @@
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns:MadCap="http://www.madcapsoftware.com/Schemas/MadCap.xsd" MadCap:lastBlockDepth="6" MadCap:lastHeight="94" MadCap:lastWidth="853" MadCap:disableMasterStylesheet="true" MadCap:tocPath="" MadCap:InPreviewMode="false" MadCap:PreloadImages="false" MadCap:RuntimeFileType="Topic" MadCap:TargetType="WebHelp" lang="en-us" xml:lang="en-us" MadCap:PathToHelpSystem="../../../" MadCap:HelpSystemFileName="Default.xml" MadCap:SearchType="Stem">
<head><title>AUXIO</title>
<link href="../../SkinSupport/MadCap.css" rel="stylesheet" />
<link href="../../Resources/Stylesheets/BSE_Help.css" rel="stylesheet" />
<script src="../../SkinSupport/MadCapAll.js" type="text/javascript">
</script>
</head>
<body>
<h1 class="code">AUXIO</h1>
<div class="ImagePlusCaption">
<div class="Col2">
<p>
<img src="../../graphics/pgm_icon2p.gif" border="0" alt="BS2p icon" title="BS2p icon" /> (BS2p40)</p>
</div>
<p style="text-align: right;"><a href="../ExampleTopics/AuMainIotermEx.htm" target="" title="" alt="" class="MCXref_0" xrefformat="{paratext}">AUXIO / MAINIO / IOTERM Example</a>
</p>
<p>&#160;</p>
</div>
<p class="clear">&#160;</p>
<p>&#160;</p>
<p class="PlainText">Syntax: <span class="keyword_in_text">AUXIO</span></p>
<h2>Function</h2>
<p class="PlainText">Switch from control of main I/O pins</p>
<h2>Quick Facts</h2>
<table cellpadding="4" cellspacing="0" border="1" style="caption-side: top;width: 100%;">
<col />
<col />
<tr bgcolor="#CFCFCF">
<td width="15%" align="center">&#160;</td>
<td width="85%" align="center">BS2p, BS2pe, and BS2px</td>
</tr>
<tr>
<td align="center" bgcolor="#CFCFCF">I/O Pin IDs</td>
<td>0 - 15 (just like main I/O, but after AUXIO command, all references affect
physical pins 21 - 36).</td>
</tr>
<tr>
<td align="center" bgcolor="#CFCFCF">Special Notes</td>
<td>
<p>Command is accepted by the 24-pin BS2p, BS2pe, and BS2px, but only the 40-pin BS2p40 gives access to the auxiliary I/O pins.</p>
</td>
</tr>
<tr>
<td align="center" bgcolor="#CFCFCF">Related Commands</td>
<td>
<p colspan="2" align="center"><a href="MAINIO.htm" target="" title="" alt="" class="MCXref_0" xrefformat="{paratext}">MAINIO</a>, <a href="IOTERM.htm" target="" title="" alt="" class="MCXref_0" xrefformat="{paratext}">IOTERM</a></p>
</td>
</tr>
</table>
<h2>Explanation</h2>
<p class="PlainText">The BS2p, BS2pe, and BS2px is available as a 24-pin module that is pin-compatible
with the BS2, BS2e, and BS2sx. Also available is a 40-pin module called the BS2p40
with an additional 16 I/O pins (for a total of 32). The BS2p40's extra, or
<i>auxiliary</i>, I/O pins can be accessed in the same manner as the main I/O pins
(by using the IDs 0 to 15) but only after issuing an <span class="keyword_in_text">AUXIO</span> or <span class="keyword_in_text">IOTERM 1</span> command. The <span class="keyword_in_text">AUXIO</span> command causes the BASIC
Stamp to affect the auxiliary I/O pins instead of the main I/O pins in all further
code until the <span class="keyword_in_text">MAINIO</span> or <span class="keyword_in_text">IOTERM 0</span> command is reached, or the BASIC Stamp
is reset or power-cycled. <span class="keyword_in_text"> AUXIO</span> is also used when setting the DIRS register
for auxiliary IO pins on the BS2p40.</p>
<p class="PlainText">The following example illustrates this:</p><pre class="BScode" xml:space="preserve">
Main:
HIGH 0
AUXIO
LOW 0
</pre>
<p class="PlainText">The first line of the above example will set I/O pin 0 of the main I/O pins
(physical pin 5) high. Afterward, the <span class="keyword_in_text">AUXIO</span> command tells the BASIC
Stamp that all commands following it should affect the auxiliary I/O pins.
The following <span class="keyword_in_text">LOW</span> command will set I/O pin 0 of the auxiliary I/O pins
(physical pin 21) low.&#160;</p>
<p class="PlainText">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.</p>
<h3> Reducing Power Consumption </h3>
<p class="PlainText">When the BASIC Stamp is reset all RAM variables, including DIRS and OUTS are
cleared to zero. This goes for main and auxiliary pins. On the BS2p24,
BS2pe, and BS2px the auxiliary pins from the interpreter chip are not connected to
physical IO pins on the BASIC Stamp. While not connected to anything, these
pins do have pull-ups activated, effectively connecting them to Vdd. After
reset, reading the auxiliary pins from a BS2p24, BS2pe, or BS2px will return all 1s.
For lowest possible current consumption where required, you may set the BS2p24,
BS2pe, and BS2px auxiliary pins as output low.</p><pre class="BScode" xml:space="preserve">
Setup:
AUXIO ' select AUXIO pins
OUTS = $0000 ' force outputs low
DIRS = $FFFF ' make (unconnected) pins outputs
MAINIO ' back to MAINIO group
</pre>
<div class="Col2">
<div class="MasterFoot">
<p MadCap:conditions="BSEconditions.BSEWebHelp (Primary)-INCLUDE"><a href="../../HomeTopics/HomePage.htm">Go to Welcome page</a>
</p>
</div>
</div>
<div class="Col2">
<div class="MasterFoot">
<p style="text-align: right;"><span class="ContactInfoProjectName">BASIC Stamp Help</span> <![CDATA[ ]]><span class="ContactInfoVersion#">Version 2.5.4</span> <![CDATA[ ]]></p>
<p style="text-align: right;">Copyright ©&#160;<span class="ContactInfoCompanyName">Parallax Inc.</span></p>
<p style="text-align: right;"><span class="SystemShortDate">8/8/2012</span>
</p>
</div>
</div>
<script type="text/javascript">/* <![CDATA[ */
var _gaq = _gaq || [];
_gaq.push(['_setAccount', 'UA-285614-1']);
_gaq.push(['_trackPageview']);
(function() {
var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
})();
/* ]]> */</script>
<script type="text/javascript" src="../../SkinSupport/MadCapBodyEnd.js">
</script>
</body>
</html>
@@ -0,0 +1,107 @@
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns:MadCap="http://www.madcapsoftware.com/Schemas/MadCap.xsd" MadCap:lastBlockDepth="6" MadCap:lastHeight="94" MadCap:lastWidth="853" MadCap:disableMasterStylesheet="true" MadCap:tocPath="" MadCap:InPreviewMode="false" MadCap:PreloadImages="false" MadCap:RuntimeFileType="Topic" MadCap:TargetType="WebHelp" lang="en-us" xml:lang="en-us" MadCap:PathToHelpSystem="../../../" MadCap:HelpSystemFileName="Default.xml" MadCap:SearchType="Stem">
<head><title>BRANCH</title>
<link href="../../SkinSupport/MadCap.css" rel="stylesheet" />
<link href="../../Resources/Stylesheets/BSE_Help.css" rel="stylesheet" />
<script src="../../SkinSupport/MadCapAll.js" type="text/javascript">
</script>
</head>
<body>
<h1 class="code">BRANCH</h1>
<div class="ImagePlusCaption">
<div class="Col2">
<p>
<img src="../../graphics/pgm_icon1.gif" border="0" alt="BS1 icon" title="BS1 icon" />
<img src="../../graphics/pgm_icon2.gif" border="0" alt="BS2 icon" title="BS2 icon" />
<img src="../../graphics/pgm_icon2e.gif" border="0" alt="BS2e icon" title="BS2e icon" />
<img src="../../graphics/pgm_icon2sx.gif" border="0" alt="BS2sx icon" title="BS2sx icon" />
<img src="../../graphics/pgm_icon2p.gif" border="0" alt="BS2p icon" title="BS2p icon" />
<img src="../../graphics/pgm_icon2pe.gif" border="0" alt="BS2pe icon" title="BS2pe icon" />
<img src="../../graphics/pgm_icon2px.gif" border="0" alt="BS2px icon" title="BS2px icon" />
</p>
</div>
<p style="text-align: right;"><a href="../ExampleTopics/BranchEx.htm" target="" title="" alt="" class="MCXref_0">BRANCH Examples</a>
</p>
<p>&#160;</p>
</div>
<p class="clear">&#160;</p>
<p>&#160;</p>
<p class="PlainText">Syntax <img align="absmiddle" src="../../graphics/mini_1.gif" />:
<span class="keyword_in_text">BRANCH</span> <![CDATA[ ]]><i>Offset<u style="font-style: normal; text-decoration: none;">, (</u>Address1</i>,<i> Address2</i>, ..<i>.AddressN</i>)</p>
<p class="PlainText">Syntax <img align="absmiddle" src="../../graphics/mini_2.gif" />: <span class="keyword_in_text">BRANCH</span> <![CDATA[ ]]><i>Offset,</i> [<i>Address1</i>,<i> Address2</i>, ...<i>AddressN</i>]</p>
<h2>Function</h2>
<p class="PlainText">Go to the <i>Address</i> specified by <i>Offset</i> (if in range).</p>
<ul>
<li value="1"><b><i>Offset</i></b> is a variable/constant/expression* (0 - 255) that
specifies the index of the address, in the list, to branch to (0 - N).</li>
<li value="2"><b><i>Addresses</i></b> are labels that specify where to go. <span class="keyword_in_text">BRANCH </span>will ignore any list entries beyond offset 255.</li>
</ul>
<p class="PlainText">*<img src="../../graphics/bs1note.gif" style="vertical-align: super;" /> Note: expressions are not allowed as arguments on the BS1.</p>
<h2>Quick Facts</h2>
<table width="100%" cellpadding="4" cellspacing="0" border="1">
<tr>
<td align="center" width="150" bgcolor="#CFCFCF">&#160;</td>
<td align="center" width="40%" bgcolor="#CFCFCF">BS1</td>
<td align="center" width="40%" bgcolor="#CFCFCF">BS2 Family</td>
</tr>
<tr>
<td align="center" bgcolor="#CFCFCF">Limit of <i>Address</i> entries</td>
<td align="center">Limited only by memory</td>
<td align="center">256</td>
</tr>
<tr>
<td align="center" bgcolor="#CFCFCF">Related Commands</td>
<td align="center">None</td>
<td align="center">
<p align="center"><a href="ON_GOTO.htm" target="" title="" alt="" class="MCXref_0">ON...GOTO</a>
</p>
</td>
</tr>
</table>
<p>&#160;</p>
<h2>Explanation</h2>
<p class="PlainText">The <span class="keyword_in_text">BRANCH </span>instruction is useful when you want to write something like this:</p><pre class="BScode" xml:space="preserve">Test_Value:
IF value = 0 THEN Case_0 ' if value is 0, jump to Case_0
IF value = 1 THEN Case_1 ' if value is 1, jump to Case_1
IF value = 2 THEN Case_2 ' if value is 2, jump to Case_2
</pre>
<p class="PlainText">You can use <span class="keyword_in_text">BRANCH</span> to organize this into a single statement:</p>
<p class="PlainText">
<img src="../../graphics/bs1_inline.gif" />
</p><pre class="BScode" xml:space="preserve">&#160;&#160;BRANCH value, (Case_0, Case_1, Case_2)</pre>
<p class="PlainText">
<img src="../../graphics/bs2all_inline.gif" />
</p><pre class="BScode" xml:space="preserve">&#160;&#160;BRANCH value, (Case_0, Case_1, Case_2)</pre>
<p class="PlainText">This works exactly the same as the previous <a href="IF_THEN.htm" target="" title="" alt="" class="MCXref_0">IF…THEN</a> example. If the value isnt in range (in this case if value is greater than 2), <span class="keyword_in_text">BRANCH </span>does nothing and the program continues with the next instruction after <span class="keyword_in_text">BRANCH</span>.</p>
<div class="Col2">
<div class="MasterFoot">
<p MadCap:conditions="BSEconditions.BSEWebHelp (Primary)-INCLUDE"><a href="../../HomeTopics/HomePage.htm">Go to Welcome page</a>
</p>
</div>
</div>
<div class="Col2">
<div class="MasterFoot">
<p style="text-align: right;"><span class="ContactInfoProjectName">BASIC Stamp Help</span> <![CDATA[ ]]><span class="ContactInfoVersion#">Version 2.5.4</span> <![CDATA[ ]]></p>
<p style="text-align: right;">Copyright ©&#160;<span class="ContactInfoCompanyName">Parallax Inc.</span></p>
<p style="text-align: right;"><span class="SystemShortDate">8/8/2012</span>
</p>
</div>
</div>
<script type="text/javascript">/* <![CDATA[ */
var _gaq = _gaq || [];
_gaq.push(['_setAccount', 'UA-285614-1']);
_gaq.push(['_trackPageview']);
(function() {
var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
})();
/* ]]> */</script>
<script type="text/javascript" src="../../SkinSupport/MadCapBodyEnd.js">
</script>
</body>
</html>
@@ -0,0 +1,126 @@
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns:MadCap="http://www.madcapsoftware.com/Schemas/MadCap.xsd" MadCap:lastBlockDepth="6" MadCap:lastHeight="94" MadCap:lastWidth="853" MadCap:disableMasterStylesheet="true" MadCap:tocPath="" MadCap:InPreviewMode="false" MadCap:PreloadImages="false" MadCap:RuntimeFileType="Topic" MadCap:TargetType="WebHelp" lang="en-us" xml:lang="en-us" MadCap:PathToHelpSystem="../../../" MadCap:HelpSystemFileName="Default.xml" MadCap:SearchType="Stem">
<head><title>BUTTON</title>
<link href="../../SkinSupport/MadCap.css" rel="stylesheet" />
<link href="../../Resources/Stylesheets/BSE_Help.css" rel="stylesheet" />
<script src="../../SkinSupport/MadCapAll.js" type="text/javascript">
</script>
</head>
<body>
<h1 class="code">BUTTON</h1>
<div class="ImagePlusCaption">
<div class="Col2">
<p>
<img src="../../graphics/pgm_icon1.gif" border="0" alt="BS1 icon" title="BS1 icon" />
<img src="../../graphics/pgm_icon2.gif" border="0" alt="BS2 icon" title="BS2 icon" />
<img src="../../graphics/pgm_icon2e.gif" border="0" alt="BS2e icon" title="BS2e icon" />
<img src="../../graphics/pgm_icon2sx.gif" border="0" alt="BS2sx icon" title="BS2sx icon" />
<img src="../../graphics/pgm_icon2p.gif" border="0" alt="BS2p icon" title="BS2p icon" />
<img src="../../graphics/pgm_icon2pe.gif" border="0" alt="BS2pe icon" title="BS2pe icon" />
<img src="../../graphics/pgm_icon2px.gif" border="0" alt="BS2px icon" title="BS2px icon" />
</p>
</div>
<p style="text-align: right;"><a href="../ExampleTopics/ButtonEx.htm" target="" title="" alt="" class="MCXref_0">BUTTON Example</a>
</p>
<p>&#160;</p>
</div>
<p class="clear">&#160;</p>
<p>&#160;</p>
<p class="PlainText">Syntax: <span class="keyword_in_text">BUTTON</span> <![CDATA[ ]]><i>Pin</i>,<i> DownState</i>,<i> Delay</i>,<i> Rate</i>,<i> Workspace</i>,<i> TargetState</i>,<i> Address</i></p>
<h2>Function</h2>
<p class="PlainText">Monitor and process a pushbutton input, perform auto-repeat, and branch to address
if button is in target state. Button circuits may be active-low or active-high.
</p>
<ul>
<li value="1"><b><i>Pin</i></b> is a variable/constant/expression* (0 - 15) that specifies
the I/O pin to use. This pin will be set to input mode.</li>
<li value="2"><b><i>DownState</i></b> is a variable/constant/expression* (0 or 1) that
specifies which logical state occurs when the button is pressed.</li>
<li value="3"><b><i>Delay</i></b> is a variable/constant/expression* (0 - 255) that specifies
how long the button must be pressed before auto-repeat starts. The delay is
measured in cycles of the <span class="keyword_in_text">BUTTON</span> routine. <i>Delay</i> has two special
settings: 0 and 255. If <i>Delay</i> is 0, <span class="keyword_in_text">BUTTON</span> performs no debounce
or auto-repeat. If <i>Delay</i> is 255, Button performs debounce, but no
auto-repeat. </li>
<li value="4"><b><i>Rate</i></b> is a variable/constant/expression* (0 - 255) that specifies
the number of cycles between auto-repeats. The rate is expressed in cycles
of the <span class="keyword_in_text">BUTTON</span> routine. </li>
<li value="5"><b><i>Workspace</i></b> is a byte variable used by <span class="keyword_in_text">BUTTON</span> for workspace.
It must be cleared to 0 before being used by <span class="keyword_in_text">BUTTON</span> for the first time
and should not be adjusted outside of the <span class="keyword_in_text">BUTTON</span> instruction. NOTE:
All RAM is cleared to 0 by default upon power-up or reset of the BASIC
Stamp. </li>
<li value="6"><b><i>TargetState</i></b> is a variable/constant/expression* (0 or 1) that
specifies which state the button should be in for a branch to occur (0=not
pressed, 1=pressed).</li>
<li value="7"><b><i>Address</i></b> is a label that specifies where to branch if the button
is in the target state.</li>
</ul>
<p class="PlainText">*<img src="../../graphics/bs1note.gif" style="vertical-align: super;" /> Note: expressions are not allowed as arguments on the BS1. The range
of the <i>Pin</i> argument on the BS1 is 07.</p>
<h2>Explanation<br /></h2>
<p class="PlainText">When you press a button or flip a switch, the contacts make or break a connection.
A brief (1 to 20-ms) burst of noise occurs as the contacts scrape and bounce against
each other. By scanning an input within a loop to ensure that the contact remains
in a specified state for a minimum duration, spurious multiple inputs caused by
contact noise can be eliminated. The <span class="keyword_in_text">BUTTON </span>instruction helps prevent this
noise from being interpreted as more than one switch action; this is the function
of the <i>Delay</i> parameter. (For a demonstration of switch bounce, see the demo
program for the <a href="COUNT.htm" target="" title="" alt="" class="MCXref_0">COUNT</a> instruction.) <i>Delay</i>, combined
with the <i>Rate</i> parameter, allows the programmer to control the rate at which
multiple inputs are accepted by the BASIC Stamp.</p>
<p class="PlainText"><span class="keyword_in_text">BUTTON</span> also lets PBASIC react to a button press the way your computer
keyboard does to a key press. When you press a key, a character immediately appears
on the screen. If you hold the key down, there's a delay, then a rapid-fire stream
of characters appears on the screen. <span class="keyword_in_text">BUTTON</span>'s auto-repeat function can be
set up to work much the same way. </p>
<p class="PlainText"><span class="keyword_in_text">BUTTON</span> is designed for use inside a program loop. Each time through the
loop, <span class="keyword_in_text">BUTTON</span> checks the state of the specified pin. When it first matches
<i>DownState</i>, <span class="keyword_in_text">BUTTON</span> begins the <i>Delay</i> countdown for auto-repeat.
Then, in accordance with <i>TargetState</i>, it either branches to address
(TargetState = 1) or doesn't (TargetState = 0).</p>
<p class="PlainText">If the switch stays in <i>DownState</i>, <span class="keyword_in_text">BUTTON</span> counts the number of
program loops that execute. When this count equals <i>Delay</i>, <span class="keyword_in_text">BUTTON</span>once again triggers the action specified by <i>TargetState</i> and <i>Address</i>. Hereafter,
if the switch remains in <i>DownState</i>, <span class="keyword_in_text">BUTTON</span> waits <i>Rate</i> number
of cycles between actions. The <i>Workspace</i> variable is used by <span class="keyword_in_text">BUTTON</span>
to keep track of how many cycles have occurred since the pin switched to
<i>TargetState</i> or since the last auto-repeat.</p>
<p class="PlainText"><span class="keyword_in_text">BUTTON</span> does not stop program execution. In order for its delay and auto
repeat functions to work properly, <span class="keyword_in_text">BUTTON</span> must be executed from within a
program loop.</p>
<center>
<img src="../../graphics/button_sch.gif" border="0" />
</center>
<div class="Col2">
<div class="MasterFoot">
<p MadCap:conditions="BSEconditions.BSEWebHelp (Primary)-INCLUDE"><a href="../../HomeTopics/HomePage.htm">Go to Welcome page</a>
</p>
</div>
</div>
<div class="Col2">
<div class="MasterFoot">
<p style="text-align: right;"><span class="ContactInfoProjectName">BASIC Stamp Help</span> <![CDATA[ ]]><span class="ContactInfoVersion#">Version 2.5.4</span> <![CDATA[ ]]></p>
<p style="text-align: right;">Copyright ©&#160;<span class="ContactInfoCompanyName">Parallax Inc.</span></p>
<p style="text-align: right;"><span class="SystemShortDate">8/8/2012</span>
</p>
</div>
</div>
<script type="text/javascript">/* <![CDATA[ */
var _gaq = _gaq || [];
_gaq.push(['_setAccount', 'UA-285614-1']);
_gaq.push(['_trackPageview']);
(function() {
var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
})();
/* ]]> */</script>
<script type="text/javascript" src="../../SkinSupport/MadCapBodyEnd.js">
</script>
</body>
</html>
@@ -0,0 +1,117 @@
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns:MadCap="http://www.madcapsoftware.com/Schemas/MadCap.xsd" MadCap:lastBlockDepth="6" MadCap:lastHeight="94" MadCap:lastWidth="853" MadCap:disableMasterStylesheet="true" MadCap:tocPath="" MadCap:InPreviewMode="false" MadCap:PreloadImages="false" MadCap:RuntimeFileType="Topic" MadCap:TargetType="WebHelp" lang="en-us" xml:lang="en-us" MadCap:PathToHelpSystem="../../../" MadCap:HelpSystemFileName="Default.xml" MadCap:SearchType="Stem">
<head><title>COMPARE</title>
<link href="../../SkinSupport/MadCap.css" rel="stylesheet" />
<link href="../../Resources/Stylesheets/BSE_Help.css" rel="stylesheet" />
<script src="../../SkinSupport/MadCapAll.js" type="text/javascript">
</script>
</head>
<body>
<h1 class="code">COMPARE</h1>
<div class="ImagePlusCaption">
<div class="Col2">
<p>
<img src="../../graphics/pgm_icon2px.gif" border="0" alt="BS2px icon" title="BS2px icon" />
</p>
</div>
<p style="text-align: right;"><a href="../ExampleTopics/CompareEx.htm" target="" title="" alt="" class="MCXref_0" xrefformat="{paratext}">COMPARE Example</a>
</p>
<p>&#160;</p>
</div>
<p class="clear">&#160;</p>
<p>&#160;</p>
<p class="PlainText">Syntax: <span class="keyword_in_text">COMPARE</span> <![CDATA[ ]]><i>Mode,</i> <![CDATA[ ]]><i>Result</i></p>
<h2>Function</h2>
<p>Enable or disable comparator, compare voltages on P1 and P2 and retrieve
comparison result to store in <i>Result</i>.
</p>
<ul>
<li value="1"><b><i>Mode</i></b> is a variable/constant/expression (0 2) that enables
or disables the comparator (input pins P1 and P2) and determines if the
optional comparator output pin (pin P0) is enabled or not. See the table
below for an explanation of the <i>Mode</i> values.</li>
<li value="2"><b><i>Result</i></b> is a variable (usually a bit) in which the
comparison result is stored.</li>
</ul>
<h2>Quick Facts<br /></h2>
<table width="100%" cellpadding="4" cellspacing="0" border="1">
<tr bgcolor="#CFCFCF">
<td width="80" align="center">&#160;</td>
<td width="80%%" align="center">BS2px</td>
</tr>
<tr>
<td align="center" rowspan="3" bgcolor="#CFCFCF"><i>Mode</i> Values</td>
<td>0: Disables comparator.</td>
</tr>
<tr>
<td>1: Enables comparator with P0 as <i>Result</i> output.</td>
</tr>
<tr>
<td>2: Enables comparator without P0 as <i>Result</i> output.</td>
</tr>
<tr>
<td align="center" rowspan="2" bgcolor="#CFCFCF"><i>Result</i> Values</td>
<td>0: Voltage P1 &gt; P2; P0 optionally outputs 0.</td>
</tr>
<tr>
<td>1: Voltage P1 &lt; P2; P0 optionally outputs 1.</td>
</tr>
</table>
<h2>Explanation</h2>
<p class="PlainText">The <span class="keyword_in_text">COMPARE</span> command enables or disables the built-in comparator
hardware on the BS2px's I/O pins P0, P1, and P2. I/O pins P1 and P2 are
the comparator inputs and P0 is optionally the comparator result output
pin.</p>
<p class="PlainText">By default, the comparator feature is disabled. Using the <span class="keyword_in_text">COMPARE</span> command with a <i>Mode</i> argument of 1 or 2 enables the comparator feature
(using input pins P1 and P2) and returns the result of the comparison in
<i>Result</i>. If <i>Mode</i> is 1, the result of the comparison is also
output on I/O pin P0. The following is an example of the <span class="keyword_in_text">COMPARE </span>command:</p><pre class="BScode" xml:space="preserve">
result VAR Bit
Main:
COMPARE 1, result
</pre>
<p class="PlainText">This example enables the comparator (setting P0 to output the result,
with P1 and P2 as the comparator inputs) and writes the result of the
comparison into <i>result</i>. Both <i>Result </i>and the output pin P0
will be 0 if the input voltage on P1 was greater than that of P2.
<i>result</i> and the output pin P0 will be 1 if the input voltage on P1
was less than that of P2.</p>
<p class="PlainText">Note that the comparator hardware operates independently of the
execution speed of the BS2px and will continue to run and update P0 if
Mode = 1, even during sleep mode (execution of <span class="keyword_in_text">END</span>, <span class="keyword_in_text">NAP</span>,
<span class="keyword_in_text">POLLWAIT</span> 8, or <span class="keyword_in_text">SLEEP</span> commands). To avoid spurious current
draw during sleep mode, disable the comparator first.</p>
<div class="Col2">
<div class="MasterFoot">
<p MadCap:conditions="BSEconditions.BSEWebHelp (Primary)-INCLUDE"><a href="../../HomeTopics/HomePage.htm">Go to Welcome page</a>
</p>
</div>
</div>
<div class="Col2">
<div class="MasterFoot">
<p style="text-align: right;"><span class="ContactInfoProjectName">BASIC Stamp Help</span> <![CDATA[ ]]><span class="ContactInfoVersion#">Version 2.5.4</span> <![CDATA[ ]]></p>
<p style="text-align: right;">Copyright ©&#160;<span class="ContactInfoCompanyName">Parallax Inc.</span></p>
<p style="text-align: right;"><span class="SystemShortDate">8/8/2012</span>
</p>
</div>
</div>
<script type="text/javascript">/* <![CDATA[ */
var _gaq = _gaq || [];
_gaq.push(['_setAccount', 'UA-285614-1']);
_gaq.push(['_trackPageview']);
(function() {
var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
})();
/* ]]> */</script>
<script type="text/javascript" src="../../SkinSupport/MadCapBodyEnd.js">
</script>
</body>
</html>
@@ -0,0 +1,208 @@
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns:MadCap="http://www.madcapsoftware.com/Schemas/MadCap.xsd" MadCap:lastBlockDepth="6" MadCap:lastHeight="94" MadCap:lastWidth="853" MadCap:disableMasterStylesheet="true" MadCap:tocPath="" MadCap:InPreviewMode="false" MadCap:PreloadImages="false" MadCap:RuntimeFileType="Topic" MadCap:TargetType="WebHelp" lang="en-us" xml:lang="en-us" MadCap:PathToHelpSystem="../../../" MadCap:HelpSystemFileName="Default.xml" MadCap:SearchType="Stem">
<head><title>CONFIGPIN</title>
<link href="../../SkinSupport/MadCap.css" rel="stylesheet" />
<link href="../../Resources/Stylesheets/BSE_Help.css" rel="stylesheet" />
<script src="../../SkinSupport/MadCapAll.js" type="text/javascript">
</script>
</head>
<body>
<h1 class="code">CONFIGPIN</h1>
<div class="ImagePlusCaption">
<div class="Col2">
<p>
<img src="../../graphics/pgm_icon2px.gif" border="0" alt="BS2px icon" title="BS2px icon" />
</p>
</div>
<p style="text-align: right;"><a href="../ExampleTopics/ConfigpinEx.htm" target="" title="" alt="" class="MCXref_0" xrefformat="{paratext}">CONFIGPIN Example</a>
</p>
<p>&#160;</p>
</div>
<p class="clear">&#160;</p>
<p>&#160;</p>
<p class="PlainText">Syntax: <span class="keyword_in_text">CONFIGPIN</span> <![CDATA[ ]]><i>Mode</i>, <i>PinMask</i></p>
<h2>Function</h2>
<p class="PlainText">Configure special properties of I/O pins.
</p>
<ul>
<li value="1"><b><i>Mode</i></b>&#160; is a variable/constant/expression (0 3), or one
of four predefined symbols, that specifies the I/O pin property to configure:
Schmitt Trigger, Logic Threshold, Pull-up Resistor or Output Direction. See
table below for an explanation of <i>Mode</i> values.</li>
<li value="2"><b><i>PinMask</i></b>&#160; is a variable/constant/expression (1 65535)
that indicates how <i>Mode</i> is applied to I/O pins. Each bit of
<i>PinMask</i> corresponds to an individual I/O pin. A high bit (1) enables
the <i>Mode</i> and a low bit (0) disables the <i>Mode</i> on the
corresponding I/O pin.</li>
</ul>
<h2>Quick Facts<br /></h2>
<table width="100%" cellpadding="4" cellspacing="0" border="1">
<tr bgcolor="#CFCFCF">
<td width="80" align="center">&#160;</td>
<td width="80%%" align="center">BS2px</td>
</tr>
<tr>
<td align="center" rowspan="4" bgcolor="#CFCFCF"><i>Mode</i> Values</td>
<td>0 (or SCHMITT): Schmitt Trigger</td>
</tr>
<tr>
<td>1 (or THRESHOLD): Logic Threshold</td>
</tr>
<tr>
<td>2 (or PULLUP): Pull-up Resistor</td>
</tr>
<tr>
<td>3 (or DIRECTION): Output Direction</td>
</tr>
<tr>
<td align="center" bgcolor="#CFCFCF">Related Commands</td>
<td align="center" colspan="1">
<p colspan="1" align="center"><a href="INPUT.htm" target="" title="" alt="" class="MCXref_0" xrefformat="{paratext}">INPUT</a>, <a href="OUTPUT.htm" target="" title="" alt="" class="MCXref_0" xrefformat="{paratext}">OUTPUT</a></p>
</td>
</tr>
</table>
<h2>Explanation</h2>
<p class="PlainText">The <span class="keyword_in_text">CONFIGPIN</span> command enables or disables special I/O pin properties
on all 16 I/O pins at once. There are four properties, or modes, available:
Schmitt Trigger, Logic Threshold, Pull-up Resistor, and Output Direction.
Each I/O pin on the BS2px contains special hardware dedicated to each of
these properties.</p>
<p class="PlainText">By default, all BASIC Stamp I/O pins are set to inputs. Enabling the
Output Direction mode sets an I/O pins direction to output. Disabling
the Output Direction mode sets an I/O pins direction to input. This has
the same effect as using the <span class="keyword_in_text">OUTPUT</span> or <span class="keyword_in_text">INPUT</span> commands, or the
DIRx = # assignment statement to configure I/O pin directions. The
following is an example of the <span class="keyword_in_text">CONFIGPIN</span> command using the Output
Direction mode:</p><pre class="BScode" xml:space="preserve">
CONFIGPIN DIRECTION, %0000000100010011
</pre>
<p class="PlainText">Every high bit (1) in the <i>PinMask</i> argument enables the output direction
for the corresponding I/O pin while every low bit (0) disables the output
direction. In the above example, I/O pins 8, 4, 1, and 0 are set to the
output direction and all other I/O pins are set to the input direction. This
is similar to the following statement:</p><pre class="BScode" xml:space="preserve">
DIRS = %0000000100010011
</pre>
<p class="PlainText">Pull-up resistors are commonly used in circuitry where a component, such
as a button, provides an open/drain signal; the signal is either floating
(open) or is driven to ground (drain). Since the BASIC Stamp input pins
must always be connected to either 5 volts or ground (0 volts) in order to
read a reliable logic state with them, a pull-up resistor is required on
circuitry, such as the button circuit mentioned above, so that the signal is
never left floating (electrically disconnected).</p>
<p class="PlainText">The following example enables internal pull-up resistors on I/O pins 15,
12, 6, and 3, and disables internal pull-up resistors on all other I/O pins:</p><pre class="BScode" xml:space="preserve">
CONFIGPIN PULLUP, %1001000001001000
</pre>
<p class="PlainText">Note that the internal pull-up resistors are intentionally weak, about 20
kΩ. Additionally, the internal pull-up resistors can be activated for all
pins, regardless of pin direction, but really matter only when the
associated pin is set to input mode.</p>
<p class="PlainText">An input pins logic threshold determines the voltage levels that are
interpreted as logic high (1) and logic low (0). Most microcontrollers, and
other integrated circuits use one of two types of logic threshold: TTL Level
or CMOS Level. The BASIC Stamp I/O pins are, by default, configured for TTL
level logic thresholds. The figure below is an illustration of the difference
between TTL and CMOS logic levels.</p>
<table border="0">
<tr>
<td>
<img src="../../graphics/level_ttl.gif" border="0">
</img>
</td>
<td>&#160; &#160; &#160; &#160; &#160;</td>
<td>
<img src="../../graphics/level_cmos.gif" border="0">
</img>
</td>
</tr>
<tr align="center">
<td><b>TTL Logic Level</b>
</td>
<td>&#160; &#160;</td>
<td><b>CMOS Logic Level</b>
</td>
</tr>
</table>
<p class="PlainText">&#160;</p>
<p class="PlainText">The logic threshold for TTL is 1.4 volts; a voltage below 1.4 is considered
to be a logic 0 while a voltage above 1.4 is considered to be a logic 1. The
logic threshold for CMOS is 50% of Vdd; a voltage below ½ Vdd is
considered a logic 0 while a voltage above ½ Vdd is considered a logic 1.</p>
<p class="PlainText">For the <span class="keyword_in_text">CONFIGPIN</span> command's THRESHOLD mode, a high bit (1) in the
<i>PinMask</i> argument sets the corresponding I/O pin to CMOS threshold
level, and a low bit sets it to a TTL threshold level. The following example
sets CMOS threshold level on I/O pins 3, 2, 1, and 0, and TTL threshold
level on all other I/O pins.</p><pre class="BScode" xml:space="preserve">
CONFIGPIN THRESHOLD, %0000000000001111
</pre>
<p class="PlainText">The threshold level can be set for all pins, regardless of pin direction, but
really matters only when the associated pin is set to input mode.</p>
<p class="PlainText">Normally, if a signal on an input pin is somewhat noisy (the voltage level
randomly rises and falls beyond the logic threshold boundary) then
reading that pins input value will result in spurious highs and lows (1s
and 0s). Schmitt Triggers are circuits that make inputs more steady and
reliable by adding a region of hysteresis around the logic threshold that
the signal must completely traverse before the logic level is interpreted as
being changed. By default BASIC Stamp I/O pins are set to normal input
mode, but the BS2px can be configured for Schmitt Trigger mode as well.
The figure below illustrates Schmitt Trigger characteristics.</p>
<table border="0">
<tr>
<td>
<img src="../../graphics/level_schmitt.gif" border="0">
</img>
</td>
</tr>
</table>
<p class="PlainText">In Schmitt Trigger mode, the threshold for a logic 0 is approximately 15%
of Vdd and the threshold for a logic 1 is approximately 85% of Vdd. The
input pin defaults to an unknown state until the initial voltage crosses a
logic 0 or logic 1 boundary. Thereafter, the voltage must cross above 85%
of Vdd to be interpreted as a logic 1 and must cross below 15% of Vdd to
be interpreted as a logic 0. If the voltage transitions somewhere between
the two thresholds, the interpreted logic state remains the same as the
previous state.</p>
<p class="PlainText">For the <span class="keyword_in_text">CONFIGPIN</span> commands SCHMITT mode, a high bit (1) in the
<i>PinMask</i> argument enables the Schmitt Trigger on the corresponding I/O
pin and a low bit (0) disables the Schmitt Trigger. The following example
sets Schmitt Triggers on I/O pins 7, 6, 5, and 4, and sets all other I/O pins
to normal mode.</p><pre class="BScode" xml:space="preserve">
CONFIGPIN SCHMITT, %0000000011110000
</pre>
<p class="PlainText">Schmitt Trigger mode can be activated for all pins, regardless of pin
direction, but really matters only when the associated pin is set to input
mode.</p>
<div class="Col2">
<div class="MasterFoot">
<p MadCap:conditions="BSEconditions.BSEWebHelp (Primary)-INCLUDE"><a href="../../HomeTopics/HomePage.htm">Go to Welcome page</a>
</p>
</div>
</div>
<div class="Col2">
<div class="MasterFoot">
<p style="text-align: right;"><span class="ContactInfoProjectName">BASIC Stamp Help</span> <![CDATA[ ]]><span class="ContactInfoVersion#">Version 2.5.4</span> <![CDATA[ ]]></p>
<p style="text-align: right;">Copyright ©&#160;<span class="ContactInfoCompanyName">Parallax Inc.</span></p>
<p style="text-align: right;"><span class="SystemShortDate">8/8/2012</span>
</p>
</div>
</div>
<script type="text/javascript">/* <![CDATA[ */
var _gaq = _gaq || [];
_gaq.push(['_setAccount', 'UA-285614-1']);
_gaq.push(['_trackPageview']);
(function() {
var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
})();
/* ]]> */</script>
<script type="text/javascript" src="../../SkinSupport/MadCapBodyEnd.js">
</script>
</body>
</html>
@@ -0,0 +1,141 @@
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns:MadCap="http://www.madcapsoftware.com/Schemas/MadCap.xsd" MadCap:lastBlockDepth="6" MadCap:lastHeight="94" MadCap:lastWidth="853" MadCap:disableMasterStylesheet="true" MadCap:tocPath="" MadCap:InPreviewMode="false" MadCap:PreloadImages="false" MadCap:RuntimeFileType="Topic" MadCap:TargetType="WebHelp" lang="en-us" xml:lang="en-us" MadCap:PathToHelpSystem="../../../" MadCap:HelpSystemFileName="Default.xml" MadCap:SearchType="Stem">
<head><title>COUNT</title>
<link href="../../SkinSupport/MadCap.css" rel="stylesheet" />
<link href="../../Resources/Stylesheets/BSE_Help.css" rel="stylesheet" />
<script src="../../SkinSupport/MadCapAll.js" type="text/javascript">
</script>
</head>
<body>
<h1 class="code">COUNT</h1>
<div class="ImagePlusCaption">
<div class="Col2">
<p>
<img src="../../graphics/pgm_icon2.gif" border="0" alt="BS2 icon" title="BS2 icon" />
<img src="../../graphics/pgm_icon2e.gif" border="0" alt="BS2e icon" title="BS2e icon" />
<img src="../../graphics/pgm_icon2sx.gif" border="0" alt="BS2sx icon" title="BS2sx icon" />
<img src="../../graphics/pgm_icon2p.gif" border="0" alt="BS2p icon" title="BS2p icon" />
<img src="../../graphics/pgm_icon2pe.gif" border="0" alt="BS2pe icon" title="BS2pe icon" />
<img src="../../graphics/pgm_icon2px.gif" border="0" alt="BS2px icon" title="BS2px icon" />
</p>
</div>
<p style="text-align: right;"><a href="../ExampleTopics/CountEx.htm" target="" title="" alt="" class="MCXref_0" xrefformat="{paratext}">COUNT Example</a>
</p>
<p>&#160;</p>
</div>
<p class="clear">&#160;</p>
<p>&#160;</p>
<p>Syntax: <span class="keyword_in_text">COUNT</span> <![CDATA[ ]]><i>Pin</i>,<i> Duration</i>,<i> Variable</i></p>
<h2>Function</h2>
<p class="PlainText">Count the number of cycles (0-1-0 or 1-0-1) on the specified pin during the <i>Duration</i> time frame and store that number in <i>Variable</i>.
</p>
<ul>
<li value="1"><b><i>Pin</i></b> is a variable/constant/expression (0 15) that specifies
the I/O pin to use. This pin will be set to input mode.</li>
<li value="2"><b><i>Duration</i></b> is a variable/constant/expression (1 65535) specifying
the time during which to count. The unit of time for <i>Duration</i> is described
below.</li>
<li value="3"><b><i>Variable</i></b> is a variable (usually a Word) in which the count will
be stored.</li>
</ul>
<h2>Quick Facts<br /></h2>
<table width="100%" cellpadding="4" cellspacing="0" border="1">
<tr>
<td width="20%" align="center" bgcolor="#CFCFCF">&#160;</td>
<td width="16%" align="center" bgcolor="#CFCFCF">BS2 / BS2e</td>
<td width="16%" align="center" bgcolor="#CFCFCF">BS2sx</td>
<td width="16%" align="center" bgcolor="#CFCFCF">BS2p</td>
<td width="16%" align="center" bgcolor="#CFCFCF">BS2pe</td>
<td width="16%" align="center" bgcolor="#CFCFCF">BS2px</td>
</tr>
<tr>
<td align="center" bgcolor="#CFCFCF">Units in <i>Duration</i></td>
<td align="center">1 ms</td>
<td align="center">400 µs</td>
<td align="center">287 µs</td>
<td align="center">720 µs</td>
<td align="center">287 µs</td>
</tr>
<tr>
<td align="center" bgcolor="#CFCFCF"><i>Duration</i> range</td>
<td align="center">1 ms to 65.535 s</td>
<td align="center">400 µs to 26.214 s</td>
<td align="center">287 µs to 18.809 s</td>
<td align="center">720 µs to 47.180 s</td>
<td align="center">287 µs to 18.809 s</td>
</tr>
<tr>
<td align="center" bgcolor="#CFCFCF">Minimum pulse width</td>
<td align="center">4.16 µs</td>
<td align="center">1.66 µs</td>
<td align="center">1.20 µs</td>
<td align="center">3.00 µs</td>
<td align="center">1.20 µs</td>
</tr>
<tr>
<td align="center" bgcolor="#CFCFCF">Maximum frequency<br></br>(square wave)</td>
<td align="center">120,000 Hz</td>
<td align="center">300,000 Hz</td>
<td align="center">416,700 Hz</td>
<td align="center">166,667 Hz</td>
<td align="center">416,700 Hz</td>
</tr>
<tr>
<td align="center" bgcolor="#CFCFCF">Related Commands</td>
<td align="center" colspan="5">
<p colspan="5" align="center"><a href="PULSIN.htm" target="" title="" alt="" class="MCXref_0" xrefformat="{paratext}">PULSIN</a>
</p>
</td>
</tr>
</table>
<h2>Explanation</h2>
<p class="PlainText">The <span class="keyword_in_text">COUNT</span> instruction makes the <i>Pin</i> an input, then for the specified
<i>duration</i>, counts cycles on that pin and stores the total in a variable. A
cycle is a change in state from 1 to 0 to 1, or from 0 to 1 to 0.</p>
<p class="PlainText">According to table above, <span class="keyword_in_text">COUNT</span> on the BS2 can respond to transitions
(pulse widths) as small as 4.16 microseconds (µs). A cycle consists of two transitions
(e.g., 0 to 1, then 1 to 0), so <span class="keyword_in_text">COUNT</span> (on the BS2) can respond to square
waves with periods as short as 8.32 µs; up to 120 kilohertz (kHz) in frequency.
For non-square waves (those whose high time and low time are unequal), the shorter
of the high and low times must be at least 4.16 µs in width (on the BS2). Refer
to the table for data on other BASIC Stamp modules.</p>
<p class="PlainText">If you use <span class="keyword_in_text">COUNT</span> on slowly changing analog waveforms like sine waves,
you may find that the value returned is higher than expected. This is because the
waveform may pass through the BASIC Stamps 1.4-volt logic threshold slowly enough
that noise causes false counts. You can fix this by passing the signal through
a Schmitt Trigger, like one of the inverters of a 74HCT14. Or, you may use the
BS2pxs built-in Schmitt-Trigger pin property; see
<a href="CONFIGPIN.htm" target="" title="" alt="" class="MCXref_0" xrefformat="{paratext}">CONFIGPIN</a> for details. </p>
<div class="Col2">
<div class="MasterFoot">
<p MadCap:conditions="BSEconditions.BSEWebHelp (Primary)-INCLUDE"><a href="../../HomeTopics/HomePage.htm">Go to Welcome page</a>
</p>
</div>
</div>
<div class="Col2">
<div class="MasterFoot">
<p style="text-align: right;"><span class="ContactInfoProjectName">BASIC Stamp Help</span> <![CDATA[ ]]><span class="ContactInfoVersion#">Version 2.5.4</span> <![CDATA[ ]]></p>
<p style="text-align: right;">Copyright ©&#160;<span class="ContactInfoCompanyName">Parallax Inc.</span></p>
<p style="text-align: right;"><span class="SystemShortDate">8/8/2012</span>
</p>
</div>
</div>
<script type="text/javascript">/* <![CDATA[ */
var _gaq = _gaq || [];
_gaq.push(['_setAccount', 'UA-285614-1']);
_gaq.push(['_trackPageview']);
(function() {
var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
})();
/* ]]> */</script>
<script type="text/javascript" src="../../SkinSupport/MadCapBodyEnd.js">
</script>
</body>
</html>
@@ -0,0 +1,269 @@
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns:MadCap="http://www.madcapsoftware.com/Schemas/MadCap.xsd" MadCap:lastBlockDepth="6" MadCap:lastHeight="94" MadCap:lastWidth="853" MadCap:disableMasterStylesheet="true" MadCap:tocPath="" MadCap:InPreviewMode="false" MadCap:PreloadImages="false" MadCap:RuntimeFileType="Topic" MadCap:TargetType="WebHelp" lang="en-us" xml:lang="en-us" MadCap:PathToHelpSystem="../../../" MadCap:HelpSystemFileName="Default.xml" MadCap:SearchType="Stem">
<head><title>DATA</title>
<link href="../../SkinSupport/MadCap.css" rel="stylesheet" />
<link href="../../Resources/Stylesheets/BSE_Help.css" rel="stylesheet" />
<script src="../../SkinSupport/MadCapAll.js" type="text/javascript">
</script>
</head>
<body>
<h1 class="code">DATA</h1>
<div class="ImagePlusCaption">
<div class="Col2">
<p>
<img src="../../graphics/pgm_icon2.gif" border="0" alt="BS2 icon" title="BS2 icon" />
<img src="../../graphics/pgm_icon2e.gif" border="0" alt="BS2e icon" title="BS2e icon" />
<img src="../../graphics/pgm_icon2sx.gif" border="0" alt="BS2sx icon" title="BS2sx icon" />
<img src="../../graphics/pgm_icon2p.gif" border="0" alt="BS2p icon" title="BS2p icon" />
<img src="../../graphics/pgm_icon2pe.gif" border="0" alt="BS2pe icon" title="BS2pe icon" />
<img src="../../graphics/pgm_icon2px.gif" border="0" alt="BS2px icon" title="BS2px icon" />
</p>
</div>
<p style="text-align: right;"><a href="../ExampleTopics/DataEx.htm" target="" title="" alt="" class="MCXref_0" xrefformat="{paratext}">DATA Example</a>
</p>
<p>&#160;</p>
</div>
<p class="clear">&#160;</p>
<p>&#160;</p>
<p class="PlainText">Syntax: {<i>Symbol</i>} <span class="keyword_in_text">DATA</span>
{@<i>Address</i>,} {Word} <i>DataItem </i>{,<i> DataItem ...</i>}</p>
<h2>Function</h2>
<p class="PlainText">Write user data to the EEPROM location(s) during program download.
</p>
<ul>
<li value="1"><b><i>Symbol</i></b> is an optional, unique symbol name that will be
automatically defined as a constant equal to the location number of the first
data item.</li>
<li value="2"><b><i>Address</i></b> is an optional starting location for subsequent
<i>DataItems</i></li>
<li value="3"><b><i>DataItem</i></b> is a constant/expression (0 - 65535) indicating a value
or how to store a value.</li>
</ul>
<h2>Quick Facts</h2>
<table cellpadding="4" cellspacing="0" border="1" style="caption-side: top;width: 100%;">
<col />
<col />
<tr bgcolor="#CFCFCF">
<td width="15%" align="center">&#160;</td>
<td width="85%" align="center">All BS2 Models</td>
</tr>
<tr>
<td align="center" bgcolor="#CFCFCF">Special Notes</td>
<td>Writes values to EEPROM during download in blocks of 16 bytes. Writes byte- or word-sized values. Can be used to decrease program size.</td>
</tr>
<tr>
<td align="center" bgcolor="#CFCFCF">Related Commands</td>
<td align="center"><a href="READ.htm" target="" title="" alt="" class="MCXref_0" xrefformat="{paratext}">READ</a>, <a href="WRITE.htm" target="" title="" alt="" class="MCXref_0" xrefformat="{paratext}">WRITE</a></td>
</tr>
</table>
<h2>Explanation</h2>
<p class="PlainText">When you download a program into the BASIC Stamp, it is stored in the EEPROM starting
at the highest address (2047) and working towards the lowest address. Most programs
don't use the entire EEPROM, so the lower portion is available for other uses.
The <span class="keyword_in_text">DATA</span> directive allows you to define a set of data to store in the available
EEPROM locations. It is called a "directive" rather than a "command" because it
performs an activity at compile-time rather than at run-time (i.e.: the <span class="keyword_in_text">DATA</span>directive is not downloaded to the BASIC Stamp, but the data it contains is downloaded).</p>
<p class="PlainText">The simplest form of the <span class="keyword_in_text">DATA</span> directive is something like the following:</p><pre class="BScode" xml:space="preserve">
DATA 100, 200, 52, 45
</pre>
<p class="PlainText">This example, when downloaded, will cause the values 100, 200, 52 and 45 to be
written to EEPROM locations 0, 1, 2 and 3, respectively. You can then use the
<span class="keyword_in_text">READ</span> and <span class="keyword_in_text">WRITE</span> commands in your code to access these locations and
the data you've stored there.</p>
<p class="PlainText"><span class="keyword_in_text">DATA</span> uses a counter, called a pointer, to keep track of available EEPROM
addresses. The value of the pointer is initially 0. When a program is downloaded,
the <span class="keyword_in_text">DATA</span> directive stores the first byte value at the current pointer address,
then increments (adds 1 to) the pointer. If the program contains more than one
<span class="keyword_in_text">DATA</span> directive, subsequent <span class="keyword_in_text">DATA</span>s start with the pointer value left
by the previous <span class="keyword_in_text">DATA</span>. For example, if the program contains:</p><pre class="BScode" xml:space="preserve">
DATA 72, 69, 76, 76, 79
DATA 104, 101, 108, 108, 111
</pre>
<p class="PlainText">The first <span class="keyword_in_text">DATA</span> directive will start at location 0 and increment the pointer
for each data value it stores (1, 2, 3, 4, and 5). The second <span class="keyword_in_text">DATA</span> directive
will start with the pointer value of 5 and work upward from there. As a result,
the first 10 bytes of EEPROM will look like the following:</p>
<table width="100%" cellpadding="4" cellspacing="0" border="1">
<tr>
<td width="20%" align="center" bgcolor="#CFCFCF" rowspan="2">&#160;</td>
<td align="center" bgcolor="#CFCFCF" colspan="10">EEPROM Location (address)</td>
</tr>
<tr>
<td width="8%" align="center" bgcolor="#CFCFCF">0</td>
<td width="8%" align="center" bgcolor="#CFCFCF">1</td>
<td width="8%" align="center" bgcolor="#CFCFCF">2</td>
<td width="8%" align="center" bgcolor="#CFCFCF">3</td>
<td width="8%" align="center" bgcolor="#CFCFCF">4</td>
<td width="8%" align="center" bgcolor="#CFCFCF">5</td>
<td width="8%" align="center" bgcolor="#CFCFCF">6</td>
<td width="8%" align="center" bgcolor="#CFCFCF">7</td>
<td width="8%" align="center" bgcolor="#CFCFCF">8</td>
<td width="8%" align="center" bgcolor="#CFCFCF">9</td>
</tr>
<tr>
<td width="20%" align="center" bgcolor="#CFCFCF">Contents</td>
<td width="8%" align="center">72</td>
<td width="8%" align="center">69</td>
<td width="8%" align="center">76</td>
<td width="8%" align="center">76</td>
<td width="8%" align="center">79</td>
<td width="8%" align="center">104</td>
<td width="8%" align="center">101</td>
<td width="8%" align="center">108</td>
<td width="8%" align="center">108</td>
<td width="8%" align="center">111</td>
</tr>
</table>
<p>&#160;</p>
<p class="PlainText">What if you don't want to store values starting at location 0? Fortunately,
the <span class="keyword_in_text">DATA</span> directive has an option to specify the next location to use. You
can specify the next location number (to set the pointer to) by inserting a
<i>DataItem</i> in the form @x ;where x is the location number. The following code
writes the same data in the table above to locations 100 through 109:</p><pre class="BScode" xml:space="preserve">
DATA @100, 72, 69, 76, 76, 79, 104, 101, 108, 108, 111
</pre>
<p class="PlainText">In this example, the first <i>DataItem </i>is @100. This tells the <span class="keyword_in_text">DATA</span> directive
to store the following <i>DataItem</i>(s) starting at location 100. All the
<i>DataItems</i> to the right of the @100 are stored in their respective locations
(100, 101, 102... 109).</p>
<p>In addition, the <span class="keyword_in_text">DATA</span> directive allows you to specify new starting locations
at any time within the <i>DataItem</i> list. If, for example, you wanted to store
56 at location 100 and 47 at location 150 (while leaving every other location intact),
you could type the following:</p><pre class="BScode" xml:space="preserve">
DATA @100, 56, @150, 47
</pre>
<p class="PlainText">If you have multiple <span class="keyword_in_text">DATA</span> directives in your program, it may be difficult
to remember exactly what locations contain the desired data. For this reason, the
<span class="keyword_in_text">DATA</span> directive can optionally be prefixed with a unique symbol name. This
symbol becomes a constant that is set equal to the location number of the first
byte of data within the directive. For example,</p><pre class="BScode" xml:space="preserve">
MyNumbers DATA @100, 72, 73
</pre>
<p class="PlainText">This would store the values 72 and 73 starting with location 100 and will create
a constant, called MyNumbers, which is set equal to 100. Your program can then
use the MyNumbers constant as a reference to the start of the data within a <span class="keyword_in_text">READ</span>or <span class="keyword_in_text">WRITE</span> command. Each <span class="keyword_in_text">DATA</span> directive can have a unique symbol preceding
it, allowing you to reference the data defined at different locations.</p>
<p class="PlainText">There may be a time when you wish to reserve a section of EEPROM for use by your
BASIC code, but not necessarily store data there to begin with. To do this, simply
specify a <i>DataItem</i> within parentheses, as in:</p><pre class="BScode" xml:space="preserve">
DATA @100, (20)
</pre>
<p class="PlainText">The above <span class="keyword_in_text">DATA</span> directive will reserve 20 bytes of EEPROM, starting with
location 100. It doesn't store any values there, rather it simply leaves the data
as it is and increments <span class="keyword_in_text">DATA</span>'s location pointer by 20. A good reason to
do this is when you have a program already downloaded into the BASIC Stamp that
has created or manipulated some data in EEPROM. To protect that section of EEPROM
from being overwritten by your next program (perhaps a new version of the same
program) you can reserve the space as shown above. The EEPROM's contents from
locations 100 to 119 will remain intact. NOTE: This only "reserves" the space for
the program you are currently downloading; the BASIC Stamp does not know to
"reserve" the space for future programs. In other words, make sure use this
feature of the <span class="keyword_in_text">DATA</span> directive in every program you download if you don't
want to risk overwriting valuable EEPROM data.</p>
<p class="PlainText">It is important to realize that EEPROM is not overwritten during programming
unless it is needed for program storage, or is filled by a <span class="keyword_in_text">DATA</span> directive
specifying data to be written. During downloading, EEPROM is always written in
16-byte sections if, and only if, any location within that section needs writing. </p>
<p class="PlainText"><span class="keyword_in_text">DATA</span> can also store the same number in a block of consecutive locations.
This is similar to reserving a block of EEPROM, above, but with a value added before
the first parenthesis. For example,</p><pre class="BScode" xml:space="preserve">
DATA @100, 0 (20)
</pre>
<p class="PlainText">This statement writes the value 0 in all the EEPROM locations from 100 to 119.</p>
<p>A common use for <span class="keyword_in_text">DATA</span> is to store strings; sequences of bytes representing
text. PBASIC converts quoted text like "A" into the corresponding ASCII character
code (65 in this case). To make data entry easier, you can place quotes around a
whole chunk of text used in a <span class="keyword_in_text">DATA</span> directive, and PBASIC will understand
it to mean a series of bytes (see the last line of code below). The following
three <span class="keyword_in_text">DATA</span> directives are equivalent: </p><pre class="BScode" xml:space="preserve">
DATA 72, 69, 76, 76, 79
DATA "H", "E", "L", "L", "O"
DATA "HELLO"
</pre>
<p class="PlainText">All three lines of code, above, will result in the numbers 72, 69, 76, 76, and
79 being stored into EEPROM upon downloading. These numbers are simply the ASCII
character codes for "H", "E", "L", "L", and "O", respectively. See the
Example program link at the top for a demonstration of storing and
reading multiple text strings.</p>
<p class="PlainText">The EEPROM is organized as a sequential set of byte-sized memory locations.
By default, the <span class="keyword_in_text">DATA</span> directive stores bytes into EEPROM. If you try to
store a word-size value (ex: <span class="keyword_in_text">DATA</span> 1125) only the lower byte of the value
will be stored. This does not mean that you can't store word-sized values, however.
A word consists of two bytes, called a low-byte and a high-byte. If you wanted
to store the value 1125 using the <span class="keyword_in_text">DATA</span> directive, simply insert the prefix
"Word" before the number, as in:</p><pre class="BScode" xml:space="preserve">
DATA Word 1125
</pre>
<p class="PlainText">The directive above will automatically break the word-size value into two bytes
and store them into two sequential EEPROM locations (the low-byte first, followed
by the high-byte, or "<i>Little Endian</i>"). In this case, the low-byte is 101
and the high byte is 4 and they will be stored in locations 0 and 1, respectively.
If you have multiple word-size values, you must prefix each value with "Word",
as in:</p><pre class="BScode" xml:space="preserve">
DATA Word 1125, Word 2000
</pre>
<p class="PlainText">To retrieve a word-size value, you'll need to use the Word modifier with
<span class="keyword_in_text">READ</span> (only available in PBASIC 2.5 syntax). For example,</p><pre class="BScode" xml:space="preserve">
' {$PBASIC 2.5}
result VAR Word
Storage:
DATA Word 1125
Main:
READ 0, Word result
DEBUG DEC result
END
</pre>
<p class="PlainText">This code would write the low-byte and high-byte of the number 1125 into locations
0 and 1 during download. When the program runs, the <span class="keyword_in_text">READ</span> function (with
the Word modifier) will retrieve the value out of EEPROM and then display the value
on the screen. See the <a href="READ.htm" target="" title="" alt="" class="MCXref_0" xrefformat="{paratext}">READ</a> and <a href="WRITE.htm" target="" title="" alt="" class="MCXref_0" xrefformat="{paratext}">WRITE</a> commands for more information.</p>
<p class="PlainText">Finally, a <i>DataItem</i> may be defined using a simple expression with the binary
operators as shown below:</p><pre class="BScode" xml:space="preserve">
MinLvl CON 10
myLvl VAR Byte
Level1 DATA MinLvl + 10
Level2 DATA MinLvl * 5 + 21
Main:
READ Level2, myLvl ' read EE location Level2
DEBUG DEC myLvl ' show value of myLvl (71)
END
</pre>
<div class="Col2">
<div class="MasterFoot">
<p MadCap:conditions="BSEconditions.BSEWebHelp (Primary)-INCLUDE"><a href="../../HomeTopics/HomePage.htm">Go to Welcome page</a>
</p>
</div>
</div>
<div class="Col2">
<div class="MasterFoot">
<p style="text-align: right;"><span class="ContactInfoProjectName">BASIC Stamp Help</span> <![CDATA[ ]]><span class="ContactInfoVersion#">Version 2.5.4</span> <![CDATA[ ]]></p>
<p style="text-align: right;">Copyright ©&#160;<span class="ContactInfoCompanyName">Parallax Inc.</span></p>
<p style="text-align: right;"><span class="SystemShortDate">8/8/2012</span>
</p>
</div>
</div>
<script type="text/javascript">/* <![CDATA[ */
var _gaq = _gaq || [];
_gaq.push(['_setAccount', 'UA-285614-1']);
_gaq.push(['_trackPageview']);
(function() {
var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
})();
/* ]]> */</script>
<script type="text/javascript" src="../../SkinSupport/MadCapBodyEnd.js">
</script>
</body>
</html>
@@ -0,0 +1,620 @@
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns:MadCap="http://www.madcapsoftware.com/Schemas/MadCap.xsd" MadCap:lastBlockDepth="6" MadCap:lastHeight="94" MadCap:lastWidth="853" MadCap:disableMasterStylesheet="true" MadCap:tocPath="" MadCap:InPreviewMode="false" MadCap:PreloadImages="false" MadCap:RuntimeFileType="Topic" MadCap:TargetType="WebHelp" lang="en-us" xml:lang="en-us" MadCap:PathToHelpSystem="../../../" MadCap:HelpSystemFileName="Default.xml" MadCap:SearchType="Stem">
<head><title>DEBUG</title>
<link href="../../SkinSupport/MadCap.css" rel="stylesheet" />
<link href="../../Resources/Stylesheets/BSE_Help.css" rel="stylesheet" />
<script src="../../SkinSupport/MadCapAll.js" type="text/javascript">
</script>
</head>
<body>
<h1 class="code">DEBUG</h1>
<div class="ImagePlusCaption">
<div class="Col2">
<p>
<img src="../../graphics/pgm_icon1.gif" border="0" alt="BS1 icon" title="BS1 icon" />
<img src="../../graphics/pgm_icon2.gif" border="0" alt="BS2 icon" title="BS2 icon" />
<img src="../../graphics/pgm_icon2e.gif" border="0" alt="BS2e icon" title="BS2e icon" />
<img src="../../graphics/pgm_icon2sx.gif" border="0" alt="BS2sx icon" title="BS2sx icon" />
<img src="../../graphics/pgm_icon2p.gif" border="0" alt="BS2p icon" title="BS2p icon" />
<img src="../../graphics/pgm_icon2pe.gif" border="0" alt="BS2pe icon" title="BS2pe icon" />
<img src="../../graphics/pgm_icon2px.gif" border="0" alt="BS2px icon" title="BS2px icon" />
</p>
</div>
<p style="text-align: right;"><a href="../ExampleTopics/DebugEx.htm" target="" title="" alt="" class="MCXref_0">DEBUG Examples</a>
</p>
<p>&#160;</p>
</div>
<p class="clear">&#160;</p>
<p>&#160;</p>
<p class="PlainText">Syntax: <span class="keyword_in_text">DEBUG</span> <![CDATA[ ]]><i>OutputData </i>{, <i>OutputData</i>}</p>
<h2>Function</h2>
<p class="PlainText">Display information on the PC screen within the BASIC Stamp editor program. This
command can be used to display text or numbers in various formats on the PC screen
in order to follow program flow (called debugging) or as part of the functionality
of the BASIC Stamp application.
</p>
<ul>
<li value="1"><b><i>OutputData</i></b> is a variable/constant/expression* (0 - 65535) that
specifies the information to output. Valid data can be ASCII characters (text
strings and control characters), decimal numbers (0 - 65535), hexadecimal numbers
($0000 - $FFFF) or binary numbers (up to %1111111111111111). Data can be
modified with special formatters as explained below.</li>
</ul>
<p>*<img align="absmiddle" src="../../graphics/bs1note.gif" style="vertical-align: super;" /> Note: Expressions are not allowed as arguments on the BS1. The only
constant allowed for the BS1 <span class="keyword_in_text">DEBUG</span> command is a text string.</p>
<h2>Quick Facts<br /></h2>
<table width="100%" cellpadding="4" cellspacing="0" border="1">
<tr bgcolor="#CFCFCF">
<td width="16%" align="center">&#160;</td>
<td width="28%" align="center">BS1</td>
<td width="28%" align="center">BS2, BS2e, BS2sx, BS2p, and BS2pe</td>
<td width="28%" align="center">BS2px</td>
</tr>
<tr>
<td align="center" bgcolor="#CFCFCF">Serial Protocol</td>
<td align="center">Asychronous 4800 baud, N, 8, 1<br></br>Inverted polarity,
Raw Data<br></br>Custom packetized format</td>
<td align="center">Asychronous 9600 baud, N, 8, 1<br></br>Inverted polarity,
Raw Data</td>
<td align="center">Asychronous 19.2 kBaud, N, 8, 1<br></br>Inverted polarity,
Raw Data</td>
</tr>
<tr>
<td align="center" bgcolor="#CFCFCF">Related Commands</td>
<td align="center" colspan="3">
<p colspan="3" align="center"><a href="DEBUGIN.htm" target="" title="" alt="" class="MCXref_0">DEBUGIN</a>, <a href="SEROUT.htm" target="" title="" alt="" class="MCXref_0">SEROUT</a></p>
</td>
</tr>
</table>
<h2>Explanation</h2>
<p class="PlainText"><span class="keyword_in_text">DEBUG</span> provides a convenient way for your BASIC Stamp to send messages to
the PC screen while running. The name "debug" suggests its most popular use;
debugging programs by showing you the value of a variable or expression, or by
indicating what portion of a program is currently executing. <span class="keyword_in_text">DEBUG</span> is also
a great way to rehearse programming techniques. Throughout this manual, we use
<span class="keyword_in_text">DEBUG</span> to give you immediate feedback on the effects of instructions. The
following example demonstrates using the <span class="keyword_in_text">DEBUG</span> command to send the text
string message "Hello World!". </p><pre class="BScode" xml:space="preserve">
DEBUG "Hello, World!" ' test Message
</pre>
<p class="PlainText">After you download this one-line program, the BASIC Stamp Editor will open a
Debug terminal on your PC screen and wait for a response from the BASIC Stamp.
A moment later, the phrase "Hello World!" will appear. Note that if you close the
Debug terminal, your program keeps executing, but you can't see the <span class="keyword_in_text">DEBUG</span>
data anymore.</p>
<p class="PlainText">Multiple pieces of data can be sent with one <span class="keyword_in_text">DEBUG</span> command by separating
the data with commas (,). The following example produces exactly the same results
as the example above.</p><pre class="BScode" xml:space="preserve">
DEBUG "Hello, ", "World!" ' test Message
</pre>
<p class="PlainText"><span class="keyword_in_text">DEBUG</span> can also print and format numbers (values) from both constants
and variables. Please note that formatting the <span class="keyword_in_text">DEBUG</span> output with the BS1
differs significantly from formatting the <span class="keyword_in_text">DEBUG</span> output with the BS2 family.
Please read the appropriate sections that follow carefully.</p>
<p class="Tip" MadCap:autonum="Tip: &#160;"><span class="autonumber"><span class="TipSpan">Tip: &#160;</span></span><b>Don't let your BASIC Stamp be mistaken for a mouse! </b>
<br />
<br />Connecting USB-based boards to your PC may cause the BASIC Stamp to reset. If your BASIC Stamp program immediately starts sending serial data to the computer via a <span class="keyword_in_text">DEBUG</span> or <span class="keyword_in_text">SEROUT</span> command, your computer's operating system may mistake it for a mouse or other serial plug-and-play device. To avoid this, place a 1-second pause at the beginning of the program. </p>
<h2>
<img align="absmiddle" src="../../graphics/bs1_inline.gif" border="0" />&#160; BASIC Stamp 1 Formatting</h2>
<p class="PlainText">On the BS1, the <span class="keyword_in_text">DEBUG</span> command, by default, displays numbers in the format
"symbol = value" (followed by a carriage return), using the decimal number system.
For example: </p><pre class="BScode" xml:space="preserve">
SYMBOL x = B2
Init:
x = 75
Main:
DEBUG x
END
</pre>
<p class="PlainText">...displays "x = 75" on the screen. To display the value, in decimal, without
the "x =" text, use the decimal formatter (#) before the variable name. For
example, the following code displays "75" on the screen:</p><pre class="BScode" xml:space="preserve">
SYMBOL x = B2
Init:
x = 75
Main:
DEBUG #x
END
</pre>
<p class="PlainText">To display numbers in hexadecimal or binary form, use the $ or % formatter,
respectively. The code below displays the same number in its hexadecimal and binary
forms.</p><pre class="BScode" xml:space="preserve">
SYMBOL x = B2
Init:
x = 75
Main:
DEBUG $x, %x
END
</pre>
<p class="PlainText">After running the above code, "X = $4B" and "X = %01001011" should appear on the
screen. To display hexadecimal ($) or binary (%) values without the "symbol = "
preface, use the # modifier as shown below:</p><pre class="BScode" xml:space="preserve">
SYMBOL x = B2
x = 75
DEBUG #x, "as HEX is ", #$x ' displays "75 as HEX is $4B"
</pre>
<p class="PlainText">To display a number as its ASCII character equivalent, use the ASCII formatter
(@). Typing <span class="keyword_in_text">DEBUG</span> @x (in place of the <span class="keyword_in_text">DEBUG</span> statement in the code
above) would display "x = 'K'" on the screen.</p>
<p class="PlainText">Two pre-defined symbols, CR and CLS, can be used to send a carriage-return or
clear-screen command to the Debug Terminal. The CR symbol will cause the Debug
Terminal to start a new line and the CLS symbol will cause the Debug Terminal to
clear itself and place the cursor at the top-left corner of the screen. The
following code demonstrates this.</p><pre class="BScode" xml:space="preserve">
DEBUG "You can not see this.", CLS, "Here is line 1", CR, "Here is line 2"
</pre>
<p class="PlainText">When the above is run, the final result is "Here is line 1" on the first line
of the screen and "Here is line 2" on the second line. You may or may not have
seen "You can not see this." appear first. This is because it was immediately
followed by a clear-screen symbol, CLS, which caused the display to clear the
screen before displaying the rest of the information.</p>
<p class="Tip" MadCap:autonum="Tip: &#160;"><span class="autonumber"><span class="TipSpan">Tip: &#160;</span></span><b>The rest of this discussion does not apply to the BASIC Stamp
1.</b>
</p>
<h2>
<img align="absmiddle" src="../../graphics/bsall_inline.gif" border="0" />&#160; BASIC Stamp 2 Series Formatting</h2>
<p class="PlainText">On the all BASIC Stamp models except the BS1, the <span class="keyword_in_text">DEBUG</span> command, by default,
displays everything as ASCII characters. What if you want to display a number?
You might think the following example would do this:</p><pre class="BScode" xml:space="preserve">
x VAR Byte
Init:
x = 65
Main:
DEBUG x ' show value of x
END
</pre>
<p class="PlainText">Since we set x equal to 65 (in line 2), you might expect the <span class="keyword_in_text">DEBUG</span> line
to display "65" on the screen. Instead of "65", however, you'll see the letter
"A" if you run this example. The problem is that we never told the BASIC Stamp
how to output x, and it defaults to ASCII (the ASCII character at position 65 is
"A"). Instead, we need to tell it to display the "decimal form" of the number in
X. We can do this by using the decimal formatter (DEC) before the variable. The
example below will display "65" on the screen.</p><pre class="BScode" xml:space="preserve">
x VAR Byte
Init:
x = 65
Main:
DEBUG DEC x ' show decimal value of x
END
</pre>
<p class="PlainText">In addition to decimal (DEC), <span class="keyword_in_text">DEBUG</span> can display numbers in hexadecimal
(HEX) and binary (BIN). See the table below for a complete list of formatters.</p>
<p>Expressions are allowed within the <span class="keyword_in_text">DEBUG</span> command arguments as well. In
the above code, <span class="keyword_in_text">DEBUG</span> DEC x+25 would yield "90" and <span class="keyword_in_text">DEBUG</span> DEC
x*10/2-3 would yield "322".</p>
<p>&#160;</p>
<table width="100%" cellpadding="4" cellspacing="0" border="1">
<tr bgcolor="#CFCFCF" align="center" valign="top">
<td width="150">Formatter</td>
<td width="80%">Description</td>
</tr>
<tr valign="top">
<td>?</td>
<td>Displays "symbol = x' + carriage return; where x is a number. Default
format is decimal, but may be combined with conversion formatters (ex:
BIN ? x to display "x = binary_number").</td>
</tr>
<tr valign="top">
<td>ASC ?</td>
<td>Displays "symbol = 'x'" + carriage return; where x is an ASCII character.</td>
</tr>
<tr valign="top">
<td>DEC{1..5}</td>
<td>Decimal, optionally fixed to 1 - 5 digits</td>
</tr>
<tr valign="top">
<td>SDEC{1..5}</td>
<td>Signed decimal, optionally fixed to 1 - 5 digits</td>
</tr>
<tr valign="top">
<td>HEX{1..4}</td>
<td>Hexadecimal, optionally fixed to 1 - 4 digits</td>
</tr>
<tr valign="top">
<td>SHEX{1..4}</td>
<td>Signed hexadecimal, optionally fixed to 1 - 4 digits </td>
</tr>
<tr valign="top">
<td>IHEX{1..4}</td>
<td>Indicated hexadecimal, optionally fixed to 1 - 4 digits</td>
</tr>
<tr valign="top">
<td>ISHEX{1..4}</td>
<td>Signed, indicated hexadecimal, optionally fixed to 1 - 4 digits ($ prefix)</td>
</tr>
<tr valign="top">
<td>BIN{1..16}</td>
<td>Binary, optionally fixed to 1 - 16 digits</td>
</tr>
<tr valign="top">
<td>SBIN{1..16}</td>
<td>Signed binary, optionally fixed to 1 - 16 digits</td>
</tr>
<tr valign="top">
<td>IBIN{1..16}</td>
<td>Indicated binary, optionally fixed to 1 - 16 digits</td>
</tr>
<tr valign="top">
<td>ISBIN{1..16}</td>
<td>Signed, indicated binary, optionally fixed to 1 - 16 digits</td>
</tr>
<tr valign="top">
<td>STR ByteArray</td>
<td>ASCII string from bytearray until byte = 0.</td>
</tr>
<tr valign="top">
<td>STR ByteArray {\L}</td>
<td>ASCII string consisting of n bytes from bytearray.</td>
</tr>
<tr valign="top">
<td>REP Byte\L</td>
<td>Display ASCII character n times.</td>
</tr>
</table>
<p class="PlainText">As seen above, special versions of the DEC, HEX and BIN formatters allow for
the display of indicated, signed and fixed-width numbers. The term "indicated"
simply means that a special symbol is displayed, before the number, indicating
what number system it belongs to. For example:</p><pre class="BScode" xml:space="preserve">
x VAR Byte
Init:
x = 65
Main:
DEBUG HEX x ' show hexadecimal value of x
END
</pre>
<p class="PlainText">...displays "41" (65, in decimal, is 41, in hexadecimal). You might see a problem
here... unless you knew the number was supposed to be hexadecimal, you might think
it was 41, in decimal... a totally different number. To help avoid this, use the
IHEX formatter (the "I" stands for indicated). Changing the <span class="keyword_in_text">DEBUG</span> line to
read: <span class="keyword_in_text">DEBUG</span> IHEX x would print "$41" on the screen. A similar formatter
for binary also exists, IBIN, which prints a "%" before the number.</p>
<p class="PlainText">Signed numbers are preceded with a space ( ) or a minus sign (-) to indicate a
positive or negative number, respectively. Normally, any number displayed by the
BASIC Stamp is shown in its unsigned (positive) form without any indicator. The
signed formatters allow
you to display the number as a signed (rather than unsigned) value.</p>
<p class="Tip" MadCap:autonum="Tip: &#160;"><span class="autonumber"><span class="TipSpan">Tip: &#160;</span></span><b>Only
Word-sized variables can be used for signed number display. </b>
</p>
<p class="PlainText">The code below
demonstrates the difference in all three numbering schemes.</p><pre class="BScode" xml:space="preserve">
x VAR Word
Init:
x = -65
Main:
DEBUG "Signed: ", SDEC x, " ", ISHEX x, " ", ISBIN x, CR
DEBUG "Unsigned: ", DEC x, " ", IHEX x, " ", IBIN x
END
</pre>
<p class="PlainText">This code will generate the display shown below:</p><pre>Signed: -65 -$41 -%1000001<br />Unsigned: 65471 $FFBF %1111111110111111
</pre>
<p class="PlainText">The signed form of the number -65 is shown in decimal, hexadecimal and then in
binary on the top line. The unsigned form, in all three number systems, is shown
on the bottom line. If the unsigned form looks strange to you, it's because negative
numbers are stored in twos-compliment format within the BASIC Stamp. </p>
<p class="PlainText">Suppose that your program contained several <span class="keyword_in_text">DEBUG</span> instructions showing
the contents of different variables. You would want some way to tell them apart.
One possible way is to do the following:</p><pre class="BScode" xml:space="preserve">
x VAR Byte
y VAR Byte
Init:
x = 100
y = 250
Main:
DEBUG "X = ", DEC x, CR ' show decimal value of x
DEBUG "Y = ", DEC y, CR ' show decimal value of y
END
</pre>
<p class="PlainText">...but typing the name of the variables in quotes (for the display) can get a
little tedious. A special formatter, the question mark (?), can save you a lot
of time. The code below does exactly the same thing (with less typing):</p><pre class="BScode" xml:space="preserve">
x VAR Byte
y VAR Byte
Init:
x = 100
y = 250
Main:
DEBUG DEC ? x ' show decimal value of x
DEBUG DEC ? y ' show decimal value of y
END
</pre>
<p class="PlainText">The display would look something like this:</p><pre>x = 100<br />y = 250
</pre>
<p class="PlainText">The ? formatter always displays data in the form "symbol = value" (followed by
a carriage return). In addition, it defaults to displaying in decimal, so we really
only needed to type: <span class="keyword_in_text">DEBUG</span> ? x for the above code. You can, of course,
use any of the three number systems. For example: <span class="keyword_in_text">DEBUG</span> HEX ? x or
<span class="keyword_in_text">DEBUG</span> BIN ? y. </p>
<p class="PlainText">It's important to note that the "symbol" it displays is taken directly from what
appears to the right of the ?. If you were to use an expression, for example:
<span class="keyword_in_text">DEBUG</span> ? x*10/2+3 in the above code, the display would show: "x*10/2+3
= 503". </p>
<p class="PlainText">A special formatter, ASC, is also available for use only with the ? formatter
to display ASCII characters, as in: <span class="keyword_in_text">DEBUG</span> ASC ? x.</p>
<p class="PlainText">What if you need to display a table of data; multiple rows and columns? The
Signed/Unsigned code (above) approaches this but, if you notice, the columns don't
line up. The number formatters (DEC, HEX and BIN) have some useful variations to
make the display fixed-width. Up to 5 digits can be displayed for decimal numbers.
To fix the value to a specific number of decimal digits, you can use DEC1, DEC2,
DEC3, DEC4 or DEC5. For example:</p><pre class="BScode" xml:space="preserve">
x VAR Byte
Init:
x = 165
Main:
DEBUG DEC5 x ' show decimal value of x
END ' in 5 digits
</pre>
<p class="PlainText">...displays "00165". Notice that leading zeros? The display is "fixed" to 5 digits,
no more and no less. Any unused digits will be filled with zeros.</p>
<p class="PlainText">Using DEC4 in the same code would display "0165". DEC3 would display "165".
What would happen if we used DEC2? Regardless of the number, the BASIC Stamp will
ensure that it is always the exact number of digits you specified. In this case,
it would truncate the "1" and only display "65". </p>
<p class="PlainText">Using the fixed-width version of the formatters in the Signed/Unsigned code
above, may result in the following code:</p><pre class="BScode" xml:space="preserve">
x VAR Word
Init:
x = -65
Main:
DEBUG "Signed: ", SDEC5 x, " ", ISHEX4 x, " ", ISBIN16 x, CR
DEBUG "Unsigned: ", DEC5 x, " ", IHEX4 x, " ", IBIN16 x
END
</pre>
<p>...and displays:</p><pre>Signed: -00065 -$0041 -%0000000001000001<br />Unsigned: 65471 $FFBF %1111111110111111
</pre>
<p class="PlainText">Note that the columns don't line up exactly (due to the extra "sign" characters
in the first row), but it certainly looks better than the alternative.</p>
<h3><a name="Displayi"></a>Displaying Strings (Byte Arrays)</h3>
<p class="PlainText">If you have a string of characters to display (a byte array), you can use the
STR formatter to do so. The STR formatter has two forms (as shown in the table above)
for variable-width and fixed-width data. The example below is the variable-width
form.</p><pre class="BScode" xml:space="preserve">
alpha VAR Byte(5)
Init:
alpha(0) = "A"
alpha(1) = "B"
alpha(2) = "C"
alpha(3) = "D"
alpha(4) = 0
Main:
DEBUG STR alpha, CR ' display "ABCD"
END
</pre>
<p class="PlainText">This code displays "ABCD" on the screen. In this form, the STR formatter displays
each character contained in the byte array until it finds a character that is equal
to 0 (value 0, not "0"). This is convenient for use with the <a href="SERIN.htm" target="" title="" alt="" class="MCXref_0">SERIN</a> command's STR
formatter, which appends 0's to the end of variable-width character string inputs.
NOTE: If your byte array doesn't end with 0, the BASIC Stamp will read and output
all RAM register contents until it finds a 0 or until it cycles through all RAM
locations.</p>
<p class="PlainText">To specify a fixed-width format for the STR formatter, use the form STR alpha\n;
where alpha is the byte array and n is the number of characters to print. Changing
the <span class="keyword_in_text">DEBUG</span> line in the example above to: <span class="code_in_text">DEBUG STR alpha\2</span> would display
"AB" on the screen.</p>
<p class="PlainText">If you need to display the same ASCII character multiple times, the REP (repeat)
formatter can help. REP takes the form: REP x\n ;where x is the character and
n is the number of times to repeat it. For example:</p><pre class="BScode" xml:space="preserve">
DEBUG REP "-"\10
</pre>
<p class="PlainText">...would display 10 hyphens on the screen, "<tt>----------</tt>". </p>
<p class="PlainText">Since individual <span class="keyword_in_text">DEBUG</span> instructions can grow to be fairly complicated,
and since a program can contain many <span class="keyword_in_text">DEBUG</span>s, you'll probably want to control
the character positioning of the Debug Terminal screen. <span class="keyword_in_text">DEBUG</span> supports a
number of different control characters, some with pre-defined symbols. The Debug
Terminal in the Windows<sup>®</sup> version of the editor supports all the
control characters shown below, while the DOS version only supports a few of them.</p>
<p class="PlainText">Some of the control characters have pre-defined symbols associated with them.
In your <span class="keyword_in_text">DEBUG</span> commands, you can use those symbols, for example: <span class="keyword_in_text">DEBUG</span>"Hello", CR displays "Hello" followed by a carriage return. You can always use
the ASCII value for any of the control characters, however. For example: <span class="keyword_in_text">DEBUG</span>"Hello", 13 is exactly the same as the code above.</p>
<p class="PlainText">The Move To control character is perhaps the most unique of the set. If the
Debug Terminal receives this character, it expects to see an x and y position value
to follow (in the next two characters received). The following line moves the
cursor to column number 4 in row number 5 and displays "Hello":</p><pre class="BScode" xml:space="preserve">
DEBUG CRSRXY, 4, 5, "Hello"
</pre>
<p class="PlainText">The upper-left cursor position is 0, 0 (that is column 0, line 0). The right-most
cursor positions depend on the size of the Debug Terminal window (which is user
adjustable). If a character position that is out of range is received, the Debug
Terminal wraps back around to the opposite side of the screen.</p>
<p class="PlainText">The Clear EOL (end of line) control character clears the characters that appear
to the right of, and on, the cursor's current position. The cursor is not moved
by this action.</p>
<p class="PlainText">The Clear Down control character clears the characters that appear below, and
on, the cursor's current line. The cursor is not moved by this action.</p>
<table width="100%" cellpadding="4" cellspacing="0" border="1">
<tr bgcolor="#CFCFCF" align="center" valign="top">
<td width="150">Name</td>
<td width="75">Symbol</td>
<td width="75">ASCII<br></br>Value</td>
<td width="1000">Description</td>
</tr>
<tr valign="top">
<td width="150">Clear Screen</td>
<td width="75" align="center">CLS <sup>1</sup></td>
<td width="75" align="center">0</td>
<td width="1000">Clear the screen and place cursor at home position.</td>
</tr>
<tr valign="top">
<td width="150">Home</td>
<td width="75" align="center">HOME</td>
<td width="75" align="center">1</td>
<td width="1000">Place cursor at home in upper-left corner of the screen.</td>
</tr>
<tr valign="top">
<td width="150">Move To (x, y)</td>
<td width="75" align="center">CRSRXY <sup>2</sup></td>
<td width="75" align="center">2</td>
<td width="1000">Move cursor to specified location (column, line). Must be
followed by two values (x and then y)</td>
</tr>
<tr valign="top">
<td width="150">Cursor Left</td>
<td width="75" align="center">CRSRLF <sup>2</sup></td>
<td width="75" align="center">3</td>
<td width="1000">Move cursor one character to left.</td>
</tr>
<tr valign="top">
<td width="150">Cursor Right</td>
<td width="75" align="center">CRSRRT <sup>2</sup></td>
<td width="75" align="center">4</td>
<td width="1000">Move cursor one character to right.</td>
</tr>
<tr valign="top">
<td width="150">Cursor Up</td>
<td width="75" align="center">CRSRUP <sup>2</sup></td>
<td width="75" align="center">5</td>
<td width="1000">Move cursor one character up.</td>
</tr>
<tr valign="top">
<td width="150">Cursor Down</td>
<td width="75" align="center">CRSRDN <sup>2</sup></td>
<td width="75" align="center">6</td>
<td width="1000">Move cursor one character down.</td>
</tr>
<tr valign="top">
<td width="150">Bell</td>
<td width="75" align="center">BELL</td>
<td width="75" align="center">7</td>
<td width="1000">Beep the PC speaker.</td>
</tr>
<tr valign="top">
<td width="150">Backspace</td>
<td width="75" align="center">BKSP</td>
<td width="75" align="center">8</td>
<td width="1000">Back up cursor to left one space.</td>
</tr>
<tr valign="top">
<td width="150">Tab</td>
<td width="75" align="center">TAB</td>
<td width="75" align="center">9</td>
<td width="1000">Tab to the next column.</td>
</tr>
<tr valign="top">
<td width="150">Line Feed</td>
<td width="75" align="center">LF</td>
<td width="75" align="center">10</td>
<td width="1000">Move cursor down one line.</td>
</tr>
<tr valign="top">
<td width="150">Clear to End of Line</td>
<td width="75" align="center">CLREOL <sup>2</sup></td>
<td width="75" align="center">11</td>
<td width="1000">Clear line contents to the right of cursor.</td>
</tr>
<tr valign="top">
<td width="150">Clear Down</td>
<td width="75" align="center">CLRDN <sup>2</sup></td>
<td width="75" align="center">12</td>
<td width="1000">Clear screen contents below cursor.</td>
</tr>
<tr valign="top">
<td width="150">Carriage Return</td>
<td width="75" align="center">CR <sup>1</sup></td>
<td width="75" align="center">13</td>
<td width="1000">Move cursor to the first column of the next line (shift any
data on the right down to that line as well)</td>
</tr>
<tr valign="top">
<td width="150">Move To Column X</td>
<td width="75" align="center">CRSRX <sup>2</sup></td>
<td width="75" align="center">14</td>
<td width="1000">Move cursor to specified column. Must be followed by byte
value (x) for the column (0 is the left-most column)</td>
</tr>
<tr valign="top">
<td width="150">Move To Line Y</td>
<td width="75" align="center">CRSRY <sup>2</sup></td>
<td width="75" align="center">15</td>
<td width="1000">Move cursor to specified line. Must be followed by byte
value (y) for the line (0 is the top-most line)</td>
</tr>
</table>
<p><sup>1</sup> Supported by BS1 <span class="keyword_in_text">DEBUG </span>command (others not supported).<br /><sup>2</sup> This control character only works with the Windows<sup>®</sup>
version of the editor software.</p>
<p class="PlainText">&#160;</p>
<p class="PlainText">In the BS2 family, <span class="keyword_in_text">DEBUG</span> is actually a special case of the <span class="keyword_in_text">SEROUT</span>instruction. It is set for inverted (RS-232-compatible) serial output through the
programming connector (the SOUT pin) at 9600 baud (BS2, BS2e, BS2sx, BS2p, and
BS2pe) or 19.2 kBaud (BS2px), no parity, 8 data bits, and 1 stop bit.
For example,</p><pre class="BScode" xml:space="preserve">
DEBUG "Hello"
</pre>
<p class="PlainText">...is exactly like:</p><pre class="BScode" xml:space="preserve">
SEROUT 16, $4054, ["Hello"]
</pre>
<p class="PlainText">in terms of function (on a BS2). The <span class="keyword_in_text">DEBUG</span> line actually takes less
program space, and is obviously easier to type.</p>
<p class="PlainText">You may view <span class="keyword_in_text">DEBUG</span>'s output using a terminal program set to the above
parameters, but you may have to modify either your carrier board or the serial
cable to temporarily disconnect pin 3 of the BASIC Stamp (pin 4 of the DB-9
connector). See the <a href="SEROUT.htm" target="" title="" alt="" class="MCXref_0">SEROUT</a> command for more detail. </p>
<p class="PlainText">Another method to decrease program space is to reduce the number of <span class="keyword_in_text">DEBUG</span>
instructions by spreading <span class="keyword_in_text">DEBUG</span> data across multiple lines. To do this,
each line that wraps around must end with a comma as in the example below:
</p><pre class="BScode" xml:space="preserve">
DEBUG "This is line 1", CR,
"This is line 2"
</pre>
<p class="PlainText">The example above works identically to, but uses less program space than, this version:</p><pre class="BScode" xml:space="preserve">
DEBUG "This is line 1", CR
DEBUG "This is line 2"
</pre>
<p class="Tip" MadCap:autonum="Tip: &#160;"><span class="autonumber"><span class="TipSpan">Tip: &#160;</span></span>Note that spreading a <span class="keyword_in_text">DEBUG</span> statement across multiple lines requires the
declaration of PBASIC 2.5 syntax.</p>
<div class="Col2">
<div class="MasterFoot">
<p MadCap:conditions="BSEconditions.BSEWebHelp (Primary)-INCLUDE"><a href="../../HomeTopics/HomePage.htm">Go to Welcome page</a>
</p>
</div>
</div>
<div class="Col2">
<div class="MasterFoot">
<p style="text-align: right;"><span class="ContactInfoProjectName">BASIC Stamp Help</span> <![CDATA[ ]]><span class="ContactInfoVersion#">Version 2.5.4</span> <![CDATA[ ]]></p>
<p style="text-align: right;">Copyright ©&#160;<span class="ContactInfoCompanyName">Parallax Inc.</span></p>
<p style="text-align: right;"><span class="SystemShortDate">8/8/2012</span>
</p>
</div>
</div>
<script type="text/javascript">/* <![CDATA[ */
var _gaq = _gaq || [];
_gaq.push(['_setAccount', 'UA-285614-1']);
_gaq.push(['_trackPageview']);
(function() {
var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
})();
/* ]]> */</script>
<script type="text/javascript" src="../../SkinSupport/MadCapBodyEnd.js">
</script>
</body>
</html>
@@ -0,0 +1,305 @@
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns:MadCap="http://www.madcapsoftware.com/Schemas/MadCap.xsd" MadCap:lastBlockDepth="6" MadCap:lastHeight="94" MadCap:lastWidth="853" MadCap:disableMasterStylesheet="true" MadCap:tocPath="" MadCap:InPreviewMode="false" MadCap:PreloadImages="false" MadCap:RuntimeFileType="Topic" MadCap:TargetType="WebHelp" lang="en-us" xml:lang="en-us" MadCap:PathToHelpSystem="../../../" MadCap:HelpSystemFileName="Default.xml" MadCap:SearchType="Stem">
<head><title>DEBUGIN</title>
<link href="../../SkinSupport/MadCap.css" rel="stylesheet" />
<link href="../../Resources/Stylesheets/BSE_Help.css" rel="stylesheet" />
<script src="../../SkinSupport/MadCapAll.js" type="text/javascript">
</script>
</head>
<body>
<h1 class="code">DEBUGIN</h1>
<div class="ImagePlusCaption">
<div class="Col2">
<p>
<img src="../../graphics/pgm_icon2.gif" border="0" alt="BS2 icon" title="BS2 icon" />
<img src="../../graphics/pgm_icon2e.gif" border="0" alt="BS2e icon" title="BS2e icon" />
<img src="../../graphics/pgm_icon2sx.gif" border="0" alt="BS2sx icon" title="BS2sx icon" />
<img src="../../graphics/pgm_icon2p.gif" border="0" alt="BS2p icon" title="BS2p icon" />
<img src="../../graphics/pgm_icon2pe.gif" border="0" alt="BS2pe icon" title="BS2pe icon" />
<img src="../../graphics/pgm_icon2px.gif" border="0" alt="BS2px icon" title="BS2px icon" /><span class="code_in_text"> {PBASIC&#160;2.5}</span>
</p>
</div>
<p style="text-align: right;"><a href="../ExampleTopics/DebugDebuginEx.htm" target="" title="" alt="" class="MCXref_0" xrefformat="{paratext}">DEBUG / DEBUGIN Example</a>
</p>
<p>&#160;</p>
</div>
<p class="clear">&#160;</p>
<p>&#160;</p>
<p class="PlainText">Syntax: <span class="keyword_in_text">DEBUGIN</span> <![CDATA[ ]]><i>InputData</i></p>
<h2>Function</h2>
<p class="PlainText">Retrieve information from the user via the Debug Terminal window within the BASIC Stamp editor program.
</p>
<ul>
<li value="1"><b><i>InputData</i></b> is list of variables and formatters that tells
<span class="keyword_in_text">DEBUGIN</span> what to do with incoming data. <span class="keyword_in_text">DEBUGIN</span> can store data in
a variable or array, interpret numeric text (decimal, binary, or hex) and store
the corresponding value in a variable, wait for a fixed or variable sequence of
bytes, or ignore a specified number of bytes. These actions can be combined
in any order in the <i>InputData</i> list.</li>
</ul>
<h2>Quick Facts<br /></h2>
<table width="100%" cellpadding="4" cellspacing="0" border="1">
<tr bgcolor="#CFCFCF">
<td width="20%" align="center">&#160;</td>
<td width="40%" align="center">BS2, BS2e, BS2sx, BS2p, and BS2pe</td>
<td width="40%" align="center">BS2px</td>
</tr>
<tr>
<td align="center" bgcolor="#CFCFCF">Serial Protocol</td>
<td align="center">Asychronous 9600 baud, N, 8, 1<br></br>Inverted polarity,
Raw Data</td>
<td align="center">Asychronous 19.2 kBaud, N, 8, 1<br></br>Inverted polarity,
Raw Data</td>
</tr>
<tr>
<td align="center" bgcolor="#CFCFCF">Related Commands</td>
<td align="center" colspan="2">
<p colspan="2" align="center"><a href="DEBUG.htm" target="" title="" alt="" class="MCXref_0" xrefformat="{paratext}">DEBUG</a>, <a href="SERIN.htm" target="" title="" alt="" class="MCXref_0" xrefformat="{paratext}">SERIN</a></p>
</td>
</tr>
</table>
<h2>Explanation</h2>
<p class="PlainText"><span class="keyword_in_text">DEBUGIN</span> provides a convenient way for your BASIC Stamp accept input from
the use via the Debug Terminal. <span class="keyword_in_text">DEBUGIN</span> can wait for, filter and
convert incoming data in powerful ways, using the same techniques and modifiers
as <a href="SERIN.htm" target="" title="" alt="" class="MCXref_0" xrefformat="{paratext}">SERIN</a>.
</p>
<p class="PlainText">This simple example waits for a number from the user, then prints a message
the specified number of times: </p><pre class="BScode" xml:space="preserve">
lines VAR Nib
idx VAR Nib
Main:
DEBUG CLS, "How many lines to print (1 - 5)? --&gt; "
DEBUGIN DEC1 lines
IF ((lines &gt;= 1) AND (lines &lt;= 5)) THEN
DEBUG CR, CR
FOR idx = 1 TO lines ' print message specified times
DEBUG DEC1 idx, ". "
DEBUG "BASIC Stamp!", CR
NEXT
END ' end of program
ELSE
DEBUG CR, "Invalid entry!" ' warning message
PAUSE 2000 ' wait 2 seconds
GOTO Main ' get another entry
ENDIF
</pre>
<p class="PlainText">After you download this program, the BASIC Stamp Editor will open a Debug
Terminal on your PC screen and wait for an entry from the user. Since the DEC1
modifier is used with <span class="keyword_in_text">DEBUGIN</span>, the program will ignore all keys except
"0" - "9". If the value entered is between 1 and 5, the message will be printed,
otherwise the program will display an "Invalid entry" message, then loop back
and wait for another entry.</p>
<p class="PlainText"><span class="keyword_in_text">DEBUGIN</span> is actually a special case of the <span class="keyword_in_text">SERIN</span> instruction. It
is set for inverted (RS-232-compatible) serial output through the programming
connector (the SIN pin) at 9600 baud (BS2, BS2e, BS2sx, BS2p, and BS2pe) or
19.2 kBaud (BS2px), no parity, 8 data bits, and 1 stop bit.
For example,</p><pre class="BScode" xml:space="preserve">
DEBUGIN DEC1 lines
</pre>
<p class="PlainText">...is exactly like:</p><pre class="BScode" xml:space="preserve">
SERIN 16, $4054, [DEC1 lines]
</pre>
<p class="PlainText">...in terms of function (on a BS2). The <span class="keyword_in_text">DEBUGIN</span> line actually takes less
program space, and is obviously easier to type.</p>
<p class="PlainText">The tables below list all the available conversion formatters and special
formatters available to the <span class="keyword_in_text">DEBUGIN</span> command. See the
<a href="SERIN.htm" target="" title="" alt="" class="MCXref_0" xrefformat="{paratext}">SERIN</a> command for additional information and examples
of their use.</p>
<table width="100%" cellpadding="4" cellspacing="0" border="1">
<tr bgcolor="#CFCFCF" align="center" valign="top">
<td width="15%">Conversion Formatter</td>
<td width="45%">Type of Number</td>
<td width="30%">Numeric Characters Accepted</td>
<td width="10%">Notes</td>
</tr>
<tr align="center">
<td>DEC{1..5}</td>
<td>Decimal, optionally limited to 1 - 5 digits</td>
<td>0 through 9</td>
<td>1</td>
</tr>
<tr align="center">
<td>SDEC{1..5}</td>
<td>Signed decimal, optionally limited to 1 - 5 digits</td>
<td>-, 0 through 9</td>
<td>1,2</td>
</tr>
<tr align="center">
<td>HEX{1..4}</td>
<td>Hexadecimal, optionally limited to 1 - 4 digits</td>
<td>0 through 9, A through F</td>
<td>1,3</td>
</tr>
<tr align="center">
<td>SHEX{1..4}</td>
<td>Signed hexadecimal, optionally limited to 1 - 4 digits </td>
<td>-, 0 through 9, A through F</td>
<td>1,2,3</td>
</tr>
<tr align="center">
<td>IHEX{1..4}</td>
<td>Indicated hexadecimal, optionally limited to 1 - 4 digits</td>
<td>$, 0 through 9, A through F</td>
<td>1,3,4</td>
</tr>
<tr align="center">
<td>ISHEX{1..4}</td>
<td>Signed, indicated hexadecimal, optionally limited to 1 - 4 digits</td>
<td>-, $, 0 through 9, A through F</td>
<td>1,2,3,4</td>
</tr>
<tr align="center">
<td>BIN{1..16}</td>
<td>Binary, optionally limited to 1 - 16 digits</td>
<td>0, 1</td>
<td>1</td>
</tr>
<tr align="center">
<td>SBIN{1..16}</td>
<td>Signed binary, optionally limited to 1 - 16 digits</td>
<td>-, 0, 1</td>
<td>1,2</td>
</tr>
<tr align="center">
<td>IBIN{1..16}</td>
<td>Indicated binary, optionally limited to 1 - 16 digits</td>
<td>%, 0, 1</td>
<td>1,4</td>
</tr>
<tr align="center">
<td>ISBIN{1..16}</td>
<td>Signed, indicated binary, optionally limited to 1 - 16 digits</td>
<td>-, %, 0, 1</td>
<td>1,2,4</td>
</tr>
<tr align="center">
<td>NUM</td>
<td>Generic numeric input; hex or binary number must be indicated</td>
<td>$, %, 0 through 9, A through F</td>
<td>1,3,4</td>
</tr>
<tr align="center">
<td>SNUM</td>
<td>Similar to NUM with value treated as signed with range -32768 to +32767</td>
<td>-, $, %, 0 through 9, A through F</td>
<td>1,2,3,4</td>
</tr>
</table>
<ol>
<li value="1">All numeric conversions will continue to accept new data until receiving
either the specified number of digits (ex: three digits for DEC3) or a
non-numeric character.</li>
<li value="2">To be recognized as part of a number, the minus sign (-) must immediately
precede a numeric character. The minus sign character occurring in non-numeric
text is ignored and any character (including a space) between a minus and a
number causes the minus to be ignored.</li>
<li value="3">The hexadecimal formatters are not case-sensitive; "a" through "f" means
the same as "A" through "F".</li>
<li value="4">Indicated hexadecimal and binary formatters ignore all characters, even
valid numerics, until they receive the appropriate prefix ($ for hexadecimal,
% for binary). The indicated formatters can differentiate between text and
hexadecimal (ex: ABC would be interpreted by HEX as a number but IHEX would
ignore it unless expressed as $ABC). Likewise, the binary version can
distinguish the decimal number 10 from the binary number %10. A prefix
occurring in non-numeric text is ignored, and any character (including a
space) between a prefix and a number causes the prefix to be ignored. Indicated,
signed formatters require that the minus sign come before the prefix, as
in -$1B45.</li>
</ol>
<p>&#160;</p>
<table width="100%" cellpadding="4" cellspacing="0" border="1">
<tr bgcolor="#CFCFCF" align="center" valign="top">
<td width="150">Special Formatter</td>
<td>Action</td>
</tr>
<tr>
<td align="center">STR ByteArray \L {\E}</td>
<td>Input a character string of length L into an array. If specified, an end
character E causes the string input to end before reaching length L.
Remaining bytes are filled with 0s (zeros).</td>
</tr>
<tr>
<td align="center">WAITSTR ByteArray {\L}</td>
<td>Wait for a sequence of bytes matching a string stored in an array variable,
optionally limited to L characters. If the optional L argument is left off,
the end of the array-string must be marked by a byte containing a zero (0).</td>
</tr>
<tr>
<td align="center">SKIP Length</td>
<td>Ignore Length bytes of characters.</td>
</tr>
</table>
<p>&#160;</p>
<p>
<img src="../../graphics/bs2ppepx_inline.gif" border="0" />
<br />
</p>
<p>
<br />
</p>
<table width="100%" cellpadding="4" cellspacing="0" border="1">
<tr bgcolor="#CFCFCF" align="center" valign="top">
<td width="150">Special Formatter</td>
<td>Action</td>
</tr>
<tr>
<td align="center">SPSTR L</td>
<td>Buffer length L bytes (up to 126) of serial characters to Scratchpad RAM,
starting at location 0. Use <a href="GET.htm" target="" title="" alt="" class="MCXref_0" xrefformat="{paratext}">GET</a> to retrieve the
characters.</td>
</tr>
</table><pre class="BScode" xml:space="preserve">
idx VAR Nib
char VAR Byte
Setup:
DEBUG CLS, "Enter (4-character) passcode: "
Main:
DEBUGIN SPSTR 4
DEBUG CLS, "Checking: "
FOR idx = 0 TO 3
GET idx, char
DEBUG char
NEXT
END
</pre>
<p class="PlainText">The example above will redirect four characters from the Debug Terminal
input to Scratchpad locations 0 - 3.</p>
<div class="Col2">
<div class="MasterFoot">
<p MadCap:conditions="BSEconditions.BSEWebHelp (Primary)-INCLUDE"><a href="../../HomeTopics/HomePage.htm">Go to Welcome page</a>
</p>
</div>
</div>
<div class="Col2">
<div class="MasterFoot">
<p style="text-align: right;"><span class="ContactInfoProjectName">BASIC Stamp Help</span> <![CDATA[ ]]><span class="ContactInfoVersion#">Version 2.5.4</span> <![CDATA[ ]]></p>
<p style="text-align: right;">Copyright ©&#160;<span class="ContactInfoCompanyName">Parallax Inc.</span></p>
<p style="text-align: right;"><span class="SystemShortDate">8/8/2012</span>
</p>
</div>
</div>
<script type="text/javascript">/* <![CDATA[ */
var _gaq = _gaq || [];
_gaq.push(['_setAccount', 'UA-285614-1']);
_gaq.push(['_trackPageview']);
(function() {
var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
})();
/* ]]> */</script>
<script type="text/javascript" src="../../SkinSupport/MadCapBodyEnd.js">
</script>
</body>
</html>
@@ -0,0 +1,148 @@
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns:MadCap="http://www.madcapsoftware.com/Schemas/MadCap.xsd" MadCap:lastBlockDepth="6" MadCap:lastHeight="94" MadCap:lastWidth="853" MadCap:disableMasterStylesheet="true" MadCap:tocPath="" MadCap:InPreviewMode="false" MadCap:PreloadImages="false" MadCap:RuntimeFileType="Topic" MadCap:TargetType="WebHelp" lang="en-us" xml:lang="en-us" MadCap:PathToHelpSystem="../../../" MadCap:HelpSystemFileName="Default.xml" MadCap:SearchType="Stem">
<head><title>DO…LOOP</title>
<link href="../../SkinSupport/MadCap.css" rel="stylesheet" />
<link href="../../Resources/Stylesheets/BSE_Help.css" rel="stylesheet" />
<script src="../../SkinSupport/MadCapAll.js" type="text/javascript">
</script>
</head>
<body>
<h1 class="code">DO…LOOP</h1>
<div class="ImagePlusCaption">
<div class="Col2">
<p>
<img src="../../graphics/pgm_icon2.gif" border="0" alt="BS2 icon" title="BS2 icon" />
<img src="../../graphics/pgm_icon2e.gif" border="0" alt="BS2e icon" title="BS2e icon" />
<img src="../../graphics/pgm_icon2sx.gif" border="0" alt="BS2sx icon" title="BS2sx icon" />
<img src="../../graphics/pgm_icon2p.gif" border="0" alt="BS2p icon" title="BS2p icon" />
<img src="../../graphics/pgm_icon2pe.gif" border="0" alt="BS2pe icon" title="BS2pe icon" />
<img src="../../graphics/pgm_icon2px.gif" border="0" alt="BS2px icon" title="BS2px icon" /><span class="code_in_text"> {PBASIC&#160;2.5}</span>
</p>
</div>
<p style="text-align: right;"><a href="../ExampleTopics/DoLoopEx.htm" target="" title="" alt="" class="MCXref_0" xrefformat="{paratext}">DO...LOOP Example</a>
</p>
<p>&#160;</p>
</div>
<p class="clear">&#160;</p>
<p>&#160;</p>
<p class="PlainText">Syntax:</p>
<p class="PlainText"><span class="keyword_in_text">DO </span>{ <span class="keyword_in_text">WHILE</span> | <span class="keyword_in_text">UNTIL</span> <![CDATA[ ]]><i>condition(s)</i> }<br />&#160; &#160; &#160;<i>Statement(s)</i><br />&#160; &#160;<span class="keyword_in_text">LOOP</span> { <span class="keyword_in_text">WHILE</span> | <span class="keyword_in_text">UNTIL</span> <![CDATA[ ]]><i>condition(s)</i> }
</p>
<h2>Function</h2>
<p class="PlainText">Create a repeating loop that executes the program lines between <span class="keyword_in_text">DO</span> and
<span class="keyword_in_text">LOOP</span>, optionally testing before or after the loop statements
</p>
<ul>
<li value="1"><b><i>Condition</i></b> is an optional variable/constant/expression (0 -
65535) which determines whether the loop will run or terminate.</li>
<li value="2"><b><i>Statement</i></b> is any valid PBASIC statement.</li>
</ul>
<h2>Quick Facts<br /></h2>
<table width="100%" cellpadding="4" cellspacing="0" border="1">
<tr>
<td width="26%" align="center" bgcolor="#CFCFCF">&#160;</td>
<td width="64%" align="center" bgcolor="#CFCFCF">BS2 Family</td>
</tr>
<tr>
<td align="center" bgcolor="#CFCFCF">Maximum nested loops</td>
<td align="center">16</td>
</tr>
<tr>
<td align="center" bgcolor="#CFCFCF">WHILE <i>Condition</i> evaluation</td>
<td align="center">Run loop if <i>Condition</i> evaluates as True (1)</td>
</tr>
<tr>
<td align="center" bgcolor="#CFCFCF">UNTIL <i>Condition</i> evaluation</td>
<td align="center">Terminate loop if <i>Condition</i> evaluates as True (1)</td>
</tr>
<tr>
<td align="center" bgcolor="#CFCFCF">Related Commands</td>
<td align="center" colspan="1">
<p colspan="1" align="center"><a href="EXIT.htm" target="" title="" alt="" class="MCXref_0" xrefformat="{paratext}">EXIT</a>, <a href="FOR_NEXT.htm" target="" title="" alt="" class="MCXref_0" xrefformat="{paratext}">FOR…NEXT</a></p>
</td>
</tr>
</table>
<h2>Explanation</h2>
<p class="PlainText"><span class="keyword_in_text">DO...LOOP</span> loops let your program execute a series of instructions
indefinitely, or until a specified condition terminates the loop. The simplest
form is shown here: </p><pre class="BScode" xml:space="preserve">
Error_Message:
DO
DEBUG "Error...", CR
PAUSE 2000
LOOP
</pre>
<p class="PlainText">In this example the error message will be printed on the
<a href="DEBUG.htm" target="" title="" alt="" class="MCXref_0" xrefformat="{paratext}">DEBUG</a> screen every two seconds until the BASIC Stamp is
reset. Simple <span class="keyword_in_text">DO...LOOP</span> loops can be terminated with
<a href="EXIT.htm" class="MCXref_0" xrefformat="{paratext}">EXIT</a>. For example:</p><pre class="BScode" xml:space="preserve">
Error_Message:
DO
DEBUG "Error...", CR
PAUSE 1000
IF (AckPin = 0) THEN EXIT ' wait for user button press
LOOP
GOTO Initialize ' re-initialize system
</pre>
<p class="PlainText">In this case the loop will continue until the pin named AckPin is pulled low,
then the loop will terminate and continue at the line <span class="code_in_text">GOTO Initialize</span>.</p>
<p class="PlainText">More often than not, you will want to test some condition to determine whether
the loop code should run or continue to run. A loop that tests the condition before
running loop code is constructed like this:</p><pre class="BScode" xml:space="preserve">
reps VAR Nib
Print_Stars:
DO WHILE (reps &lt; 3) ' test before loop statements
DEBUG "*"
reps = reps + 1
LOOP
</pre>
<p class="PlainText">In this program the loop code <span class="code_in_text">DEBUG "*"</span> will not run unless the <span class="keyword_in_text">WHILE</span>
condition evaluates as True. Another way to write the loop is like this:</p><pre class="BScode" xml:space="preserve">
reps VAR Nib
Print_Stars:
DO
DEBUG "*"
reps = reps + 1
LOOP UNTIL (reps &gt;= 3) ' test after loop statements
</pre>
<p class="PlainText">The difference is that with this loop, the loop statements will always run at
least once before the condition is tested and will continue to as long as the
<span class="keyword_in_text">UNTIL</span> condition evaluates as False.</p>
<p class="PlainText">Note that <span class="keyword_in_text">WHILE</span> (loop runs while True) and <span class="keyword_in_text">UNTIL</span> (loop runs until
True) tests can be interchanged, but are generally used as illustrated above.
</p>
<div class="Col2">
<div class="MasterFoot">
<p MadCap:conditions="BSEconditions.BSEWebHelp (Primary)-INCLUDE"><a href="../../HomeTopics/HomePage.htm">Go to Welcome page</a>
</p>
</div>
</div>
<div class="Col2">
<div class="MasterFoot">
<p style="text-align: right;"><span class="ContactInfoProjectName">BASIC Stamp Help</span> <![CDATA[ ]]><span class="ContactInfoVersion#">Version 2.5.4</span> <![CDATA[ ]]></p>
<p style="text-align: right;">Copyright ©&#160;<span class="ContactInfoCompanyName">Parallax Inc.</span></p>
<p style="text-align: right;"><span class="SystemShortDate">8/8/2012</span>
</p>
</div>
</div>
<script type="text/javascript">/* <![CDATA[ */
var _gaq = _gaq || [];
_gaq.push(['_setAccount', 'UA-285614-1']);
_gaq.push(['_trackPageview']);
(function() {
var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
})();
/* ]]> */</script>
<script type="text/javascript" src="../../SkinSupport/MadCapBodyEnd.js">
</script>
</body>
</html>
@@ -0,0 +1,201 @@
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns:MadCap="http://www.madcapsoftware.com/Schemas/MadCap.xsd" MadCap:lastBlockDepth="6" MadCap:lastHeight="94" MadCap:lastWidth="853" MadCap:disableMasterStylesheet="true" MadCap:tocPath="" MadCap:InPreviewMode="false" MadCap:PreloadImages="false" MadCap:RuntimeFileType="Topic" MadCap:TargetType="WebHelp" lang="en-us" xml:lang="en-us" MadCap:PathToHelpSystem="../../../" MadCap:HelpSystemFileName="Default.xml" MadCap:SearchType="Stem">
<head><title>DTMFOUT</title>
<link href="../../SkinSupport/MadCap.css" rel="stylesheet" />
<link href="../../Resources/Stylesheets/BSE_Help.css" rel="stylesheet" />
<script src="../../SkinSupport/MadCapAll.js" type="text/javascript">
</script>
</head>
<body>
<h1 class="code">DTMFOUT</h1>
<div class="ImagePlusCaption">
<div class="Col2">
<p>
<img src="../../graphics/pgm_icon2.gif" border="0" alt="BS2 icon" title="BS2 icon" />
<img src="../../graphics/pgm_icon2e.gif" border="0" alt="BS2e icon" title="BS2e icon" />
<img src="../../graphics/pgm_icon2sx.gif" border="0" alt="BS2sx icon" title="BS2sx icon" />
<img src="../../graphics/pgm_icon2p.gif" border="0" alt="BS2p icon" title="BS2p icon" />
<img src="../../graphics/pgm_icon2pe.gif" border="0" alt="BS2pe icon" title="BS2pe icon" />
<img src="../../graphics/pgm_icon2px.gif" border="0" alt="BS2px icon" title="BS2px icon" />
</p>
</div>
<p style="text-align: right;"><a href="../ExampleTopics/DtmfoutEx.htm" target="" title="" alt="" class="MCXref_0" xrefformat="{paratext}">DTMFOUT Example</a>
</p>
<p>&#160;</p>
</div>
<p class="clear">&#160;</p>
<p>&#160;</p>
<p class="PlainText">Syntax: <span class="keyword_in_text">DTMFOUT</span> <![CDATA[ ]]><i>Pin</i>, {<i>OnTime</i>,<i> OffTime</i>,} [<i>Tone
</i>{,<i> Tone...</i>}]</p>
<h2>Function</h2>
<p class="PlainText">Generate dual-tone, multi-frequency tones (DTMF, i.e., telephone "touch" tones).
</p>
<ul>
<li value="1"><b><i>Pin</i></b> is a variable/constant/expression (0 - 15) that specifies
the I/O pin to use. This pin will be set to output mode during generation of
tones and set to input mode afterwards.</li>
<li value="2"><b><i>OnTime</i></b> is an optional variable/constant/expression (0 - 65535)
specifying a duration of the tone. The unit of time and the default time for
<i>OnTime</i> is described below. </li>
<li value="3"><b><i>OffTime</i></b> is an optional variable/constant/expression (0 - 65535)
specifying the length of silent pause after a tone (or between tones, if
multiple tones are specified). The unit of time and the default time for
<i>OffTime</i> is described below.</li>
<li value="4"><b><i>Tone</i></b> is a variable/constant/expression (0 - 15) specifying the
DTMF tone to generate. Tones 0 through 11 correspond to the standard layout
of the telephone keypad, while 12 through 15 are the fourth-column tones used
by phone test equipment and in ham-radio applications. </li>
</ul>
<h2>Quick Facts<br /></h2>
<table width="100%" cellpadding="4" cellspacing="0" border="1">
<tr>
<td width="20%" align="center" bgcolor="#CFCFCF">&#160;</td>
<td width="16%" align="center" bgcolor="#CFCFCF">BS2 / BS2e</td>
<td width="16%" align="center" bgcolor="#CFCFCF">BS2sx</td>
<td width="16%" align="center" bgcolor="#CFCFCF">BS2p</td>
<td width="16%" align="center" bgcolor="#CFCFCF">BS2pe</td>
<td width="16%" align="center" bgcolor="#CFCFCF">BS2px</td>
</tr>
<tr>
<td align="center" bgcolor="#CFCFCF">Default <i>OnTime</i></td>
<td align="center">200 ms</td>
<td align="center">80 ms</td>
<td align="center">55 ms</td>
<td align="center">196 ms</td>
<td align="center">34 ms</td>
</tr>
<tr>
<td align="center" bgcolor="#CFCFCF">Default <i>OffTime</i></td>
<td align="center">50 ms</td>
<td align="center">50 ms</td>
<td align="center">50 ms</td>
<td align="center">50 ms</td>
<td align="center">50 ms</td>
</tr>
<tr>
<td align="center" bgcolor="#CFCFCF">Units in <i>OnTime</i></td>
<td align="center">1 ms</td>
<td align="center">0.4 ms</td>
<td align="center">0.265 ms</td>
<td align="center">1 ms</td>
<td align="center">0.166 ms</td>
</tr>
<tr>
<td align="center" bgcolor="#CFCFCF">Units in <i>OffTime</i></td>
<td align="center">1 ms</td>
<td align="center">1 ms</td>
<td align="center">1 ms</td>
<td align="center">1 ms</td>
<td align="center">1 ms</td>
</tr>
<tr>
<td align="center" bgcolor="#CFCFCF">Related Commands</td>
<td align="center" colspan="5">
<p colspan="5" align="center"><a href="SOUND.htm" target="" title="" alt="" class="MCXref_0" xrefformat="{paratext}">SOUND</a>,&#160; <a href="FREQOUT.htm" target="" title="" alt="" class="MCXref_0" xrefformat="{paratext}">FREQOUT</a></p>
</td>
</tr>
</table>
<h2>Explanation</h2>
<p class="PlainText">DTMF tones are used to dial the phone or remotely control certain radio equipment.
The BASIC Stamp can generate these tones digitally using the <span class="keyword_in_text">DTMFOUT</span>
instruction. </p>
<p class="PlainText">This figure shows how to connect an audio amplifier or speaker to hear these
tones:</p>
<center>
<img src="../../graphics/freqout_sch.gif" border="0">
</img>
</center>
<p class="PlainText">...and this figure shows how to connect the BASIC Stamp to the phone line:</p>
<center>
<img src="../../graphics/daa_sch.gif" border="0">
</img>
</center>
<p class="PlainText">The following <span class="keyword_in_text">DTMFOUT</span> instruction will generate DTMF tones on I/O pin 0:
</p><pre class="BScode" xml:space="preserve">
' Call Parallax
DTMFOUT 0, [1, 9, 1, 6, 6, 2, 4, 8, 3, 3, 3]
</pre>
<p class="PlainText">If the BASIC Stamp is connected to the phone line properly, the above command
would be equivalent to dialing 1-916-624-8333 from a phone keypad. If you wanted
to slow the pace of the dialing to accommodate a noisy phone line or radio link,
you could use the optional <i>OnTime</i> and <i>OffTime</i> values:
</p><pre class="BScode" xml:space="preserve">
' Call Parallax; dial slowly.
DTMFOUT 0, 500, 100, [1, 9, 1, 6, 6, 2, 4, 8, 3, 3, 3]
</pre>
<p>In this example, on a BS2 the<i>OnTime</i> is set to 500 ms (1/2 second) and <i>OffTime</i> to 100 ms (1/10th second).</p>
<p>&#160;</p>
<center>
<table cellpadding="4" cellspacing="0" border="1">
<tr>
<td align="center" width="75" bgcolor="#CFCFCF">Tone Value</td>
<td align="center" width="250" bgcolor="#CFCFCF">Corresponding Telephone Key</td>
</tr>
<tr>
<td align="center">0 - 9</td>
<td align="center">Digits 0 through 9</td>
</tr>
<tr>
<td align="center">10</td>
<td align="center">Star (*)</td>
</tr>
<tr>
<td align="center">11</td>
<td align="center">Pound (#)</td>
</tr>
<tr>
<td align="center">12 - 15</td>
<td align="center">Fourth column tones A through D</td>
</tr>
</table>
</center>
<p class="PlainText">&#160;</p>
<p class="PlainText">The BASIC Stamp microcontroller is a purely digital device. DTMF tones are analog
waveforms, consisting of a mixture of two sine waves at different audio frequencies.
So how does a digital device generate analog output? The BASIC Stamp creates and
mixes the sine waves mathematically, then uses the resulting stream of numbers to
control the duty cycle of a very fast pulse-width modulation (PWM) routine. So
what's actually coming out of the I/O pin is a rapid stream of pulses. The purpose
of the filtering arrangements shown in the figures above is to smooth out the
high-frequency PWM, leaving only the lower frequency audio behind. </p>
<p class="PlainText">Keep this in mind if you want to interface a BASIC Stamp module's DTMF output to radios
and other equipment that could be adversely affected by the presence of
high-frequency
noise on the input. Make sure to filter the DTMF output thoroughly. The circuits
above are only a starting point; you may want to use an active low-pass filter
with a roll-off point around 2 kHz.</p>
<div class="Col2">
<div class="MasterFoot">
<p MadCap:conditions="BSEconditions.BSEWebHelp (Primary)-INCLUDE"><a href="../../HomeTopics/HomePage.htm">Go to Welcome page</a>
</p>
</div>
</div>
<div class="Col2">
<div class="MasterFoot">
<p style="text-align: right;"><span class="ContactInfoProjectName">BASIC Stamp Help</span> <![CDATA[ ]]><span class="ContactInfoVersion#">Version 2.5.4</span> <![CDATA[ ]]></p>
<p style="text-align: right;">Copyright ©&#160;<span class="ContactInfoCompanyName">Parallax Inc.</span></p>
<p style="text-align: right;"><span class="SystemShortDate">8/8/2012</span>
</p>
</div>
</div>
<script type="text/javascript">/* <![CDATA[ */
var _gaq = _gaq || [];
_gaq.push(['_setAccount', 'UA-285614-1']);
_gaq.push(['_trackPageview']);
(function() {
var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
})();
/* ]]> */</script>
<script type="text/javascript" src="../../SkinSupport/MadCapBodyEnd.js">
</script>
</body>
</html>
@@ -0,0 +1,205 @@
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns:MadCap="http://www.madcapsoftware.com/Schemas/MadCap.xsd" MadCap:lastBlockDepth="6" MadCap:lastHeight="94" MadCap:lastWidth="853" MadCap:disableMasterStylesheet="true" MadCap:tocPath="" MadCap:InPreviewMode="false" MadCap:PreloadImages="false" MadCap:RuntimeFileType="Topic" MadCap:TargetType="WebHelp" lang="en-us" xml:lang="en-us" MadCap:PathToHelpSystem="../../../" MadCap:HelpSystemFileName="Default.xml" MadCap:SearchType="Stem">
<head><title>EEPROM</title>
<link href="../../SkinSupport/MadCap.css" rel="stylesheet" />
<link href="../../Resources/Stylesheets/BSE_Help.css" rel="stylesheet" />
<script src="../../SkinSupport/MadCapAll.js" type="text/javascript">
</script>
</head>
<body>
<h1 class="code">EEPROM</h1>
<div class="ImagePlusCaption">
<div class="Col2">
<p>
<img src="../../graphics/pgm_icon1.gif" border="0" alt="BS1 icon" title="BS1 icon" /><span class="code_in_text"> {PBASIC&#160;1.0}</span>
</p>
</div>
<p style="text-align: right;"><a href="../ExampleTopics/EepromEx.htm" target="" title="" alt="" class="MCXref_0" xrefformat="{paratext}">EEPROM Example</a>
</p>
<p>&#160;</p>
</div>
<p class="clear">&#160;</p>
<p>&#160;</p>
<p class="PlainText">Syntax: <span class="keyword_in_text">EEPROM</span> {<i>Location</i>,} (<i> DataItem
</i>{,<i> DataItem</i>,...})</p>
<h2>Function</h2>
<p class="PlainText">Write data to the EEPROM during program download.</p>
<ul>
<li value="1"><b><i>Location</i></b> is an optional variable/constant (0 - 255) that
specifies the starting location in the EEPROM at which data should be stored.
If no location is given, data is written starting at the next available
location.</li>
<li value="2"><b><i>DataItem</i></b> is a constant (0 - 255) to be stored in EEPROM.</li>
</ul>
<h2>Quick Facts</h2>
<table cellpadding="4" cellspacing="0" border="1" style="caption-side: top;width: 100%;">
<col />
<col />
<tr bgcolor="#CFCFCF">
<td width="15%" align="center">&#160;</td>
<td width="85%" align="center">BS1</td>
</tr>
<tr>
<td align="center" bgcolor="#CFCFCF">Special Notes</td>
<td>Writes values to EEPROM during download. Can be used to decrease program size.</td>
</tr>
<tr>
<td align="center" bgcolor="#CFCFCF">Related Commands</td>
<td>
<p colspan="2" align="center"><a href="READ.htm" target="" title="" alt="" class="MCXref_0" xrefformat="{paratext}">READ</a>, <a href="WRITE.htm" target="" title="" alt="" class="MCXref_0" xrefformat="{paratext}">WRITE</a></p>
</td>
</tr>
</table>
<h2>Explanation</h2>
<p class="PlainText">When you download a program into the BASIC Stamp 1, it is stored in the EEPROM
starting at the highest address (255) and working towards the lowest address. Most
programs don't use the entire EEPROM, so the lower portion is available for other
uses. The <span class="keyword_in_text">EEPROM</span> directive allows you to define a set of data to store in
the available EEPROM locations. It is called a "directive" rather than a "command"
because it performs an activity at compile-time rather than at run-time (i.e., the
<span class="keyword_in_text">EEPROM</span> directive is not downloaded to the BASIC Stamp 1, but the data it
contains is downloaded).</p>
<p>The simplest form of the <span class="keyword_in_text">EEPROM</span> directive is something like the following:</p><pre class="BScode" xml:space="preserve">
EEPROM (100, 200, 52, 45)
</pre>
<p class="PlainText">This example, when downloaded, will cause the values 100, 200, 52 and 45 to be
written to EEPROM locations 0, 1, 2 and 3, respectively. You can then use the
<span class="keyword_in_text">READ</span> and <span class="keyword_in_text">WRITE</span> commands in your code to access these locations and
the data you've stored there</p>
<p class="PlainText">The <span class="keyword_in_text">EEPROM</span> directive uses a counter, called a pointer, to keep track of
available EEPROM addresses. The value of the pointer is initially 0. When a program
is downloaded, the <span class="keyword_in_text">EEPROM</span> directive stores the first byte value at the current
pointer address, then increments (adds 1 to) the pointer. If the program contains
more than one <span class="keyword_in_text">EEPROM</span> directive, subsequent <span class="keyword_in_text">EEPROM</span> directives start
with the pointer value left by the previous <span class="keyword_in_text">EEPROM</span> directive. For example,
if the program contains:</p><pre class="BScode" xml:space="preserve">
EEPROM (72, 69, 76, 76, 79)
EEPROM (104, 101, 108, 108, 111)
</pre>
<p class="PlainText">The first <span class="keyword_in_text">EEPROM</span> directive will start at location 0 and increment the
pointer for each data value it stores (1, 2, 3, 4 and 5). The second <span class="keyword_in_text">EEPROM</span>directive will start with the pointer value of 5 and work upward from there. As
a result, the first 10 bytes of EEPROM will look like the following:</p>
<table width="100%" cellpadding="4" cellspacing="0" border="1">
<tr>
<td width="20%" align="center" bgcolor="#CFCFCF" rowspan="2">&#160;</td>
<td align="center" bgcolor="#CFCFCF" colspan="10">EEPROM Location (address)</td>
</tr>
<tr>
<td width="8%" align="center" bgcolor="#CFCFCF">0</td>
<td width="8%" align="center" bgcolor="#CFCFCF">1</td>
<td width="8%" align="center" bgcolor="#CFCFCF">2</td>
<td width="8%" align="center" bgcolor="#CFCFCF">3</td>
<td width="8%" align="center" bgcolor="#CFCFCF">4</td>
<td width="8%" align="center" bgcolor="#CFCFCF">5</td>
<td width="8%" align="center" bgcolor="#CFCFCF">6</td>
<td width="8%" align="center" bgcolor="#CFCFCF">7</td>
<td width="8%" align="center" bgcolor="#CFCFCF">8</td>
<td width="8%" align="center" bgcolor="#CFCFCF">9</td>
</tr>
<tr>
<td width="20%" align="center" bgcolor="#CFCFCF">Contents</td>
<td width="8%" align="center">72</td>
<td width="8%" align="center">69</td>
<td width="8%" align="center">76</td>
<td width="8%" align="center">76</td>
<td width="8%" align="center">79</td>
<td width="8%" align="center">104</td>
<td width="8%" align="center">101</td>
<td width="8%" align="center">108</td>
<td width="8%" align="center">108</td>
<td width="8%" align="center">111</td>
</tr>
</table>
<p class="PlainText">What if you don't want to store values starting at location 0? Fortunately,
the <span class="keyword_in_text">EEPROM</span> directive has an option to specify the next location to use.
You can specify the next location number (to set the pointer to) by using the
optional <i>Location</i> argument before the list of <i>DataItems</i>. The following
code writes the same data in the table above to locations 50 through 59:</p><pre class="BScode" xml:space="preserve">
EEPROM 50, (72, 69, 76, 76, 79, 104, 101, 108, 108, 111)
</pre>
<p class="PlainText">In this example, the <i>Location</i> argument is given and tells the <span class="keyword_in_text">EEPROM</span>directive to store the following <i>DataItem</i>(s) starting at location 50. The
<i>DataItems</i> in the list are stored in their respective locations (50, 51,
52... 59).</p>
<p class="PlainText">It is important to realize that the entire BASIC Stamp 1 EEPROM is overwritten
during programming. Any EEPROM location not containing a PBASIC program or
<i>DataItems</i> from an <span class="keyword_in_text">EEPROM</span> directive is written with a 0. </p>
<p class="PlainText">A common use for EEPROM is to store strings; sequences of bytes representing
text. PBASIC converts quoted text like "A" into the corresponding ASCII character
code (65 in this case). To make data entry easier, you can place quotes around a
whole chunk of text used in a <span class="keyword_in_text">EEPROM</span> directive, and PBASIC will understand
it to mean a series of bytes (see the last line of code below). The following three
<span class="keyword_in_text">EEPROM</span> directives are equivalent: </p><pre class="BScode" xml:space="preserve">
EEPROM (72, 69, 76, 76, 79)
EEPROM ("H", "E", "L", "L", "O")
EEPROM ("HELLO")
</pre>
<p class="PlainText">All three lines of code, above, will result in the numbers 72, 69, 76, 76, and
79 being stored into EEPROM upon downloading. These numbers are simply the ASCII
character codes for "H", "E", "L", "L", and "O", respectively. See the
Example program above for a demonstration of storing and
reading multiple text strings.</p>
<p class="PlainText">The EEPROM is organized as a sequential set of byte-sized memory locations.
The <span class="keyword_in_text">EEPROM</span> directive only stores bytes into EEPROM. If you try to store
a word-size value, for example: <span class="keyword_in_text">EEPROM</span> (1125), only the lower byte of the
value will be stored (in this case, 101). This does not mean that you can't store
word-sized values, however. A word consists of two bytes, called a low-byte and
a high-byte. If you wanted to store the value 1125 using the <span class="keyword_in_text">EEPROM</span> directive
you'll have to calculate the low-byte and the high-byte and insert them in the
list in the proper order, as in:</p><pre class="BScode" xml:space="preserve">
EEPROM (101, 4)
</pre>
<p class="PlainText">The directive above will store the two bytes into two sequential EEPROM
locations (the low-byte first, followed by the high-byte). We calculated this in
the following manner: 1) high-byte is INT(value / 256) and 2) low-byte is value -
(high-byte * 256).</p>
<p class="PlainText">To retrieve a word-size value, you'll need to use two <span class="keyword_in_text">READ</span> commands and
a word-size variable. For example,</p><pre class="BScode" xml:space="preserve">
SYMBOL result = W1 ' word-sized variable
SYMBOL resLo = B2 ' B2 is low-byte of W1
SYMBOL resHi = B3 ' B3 is high-byte of W1
EEPROM (101, 4)
Main:
READ 0, resLo
READ 1, resHi
DEBUG #result
END
</pre>
<p class="PlainText">This code would write the low-byte and high-byte of the number 1125 into
locations 0 and 1 during download. When the program runs, the two <span class="keyword_in_text">READ</span>commands will read the low-byte and high-byte out of EEPROM (reconstructing it in
a word-size variable) and then display the value on the screen. See the <a href="READ.htm" target="" title="" alt="" class="MCXref_0" xrefformat="{paratext}">READ</a>
and <a href="WRITE.htm" target="" title="" alt="" class="MCXref_0" xrefformat="{paratext}">WRITE</a> commands for more
information.</p>
<div class="Col2">
<div class="MasterFoot">
<p MadCap:conditions="BSEconditions.BSEWebHelp (Primary)-INCLUDE"><a href="../../HomeTopics/HomePage.htm">Go to Welcome page</a>
</p>
</div>
</div>
<div class="Col2">
<div class="MasterFoot">
<p style="text-align: right;"><span class="ContactInfoProjectName">BASIC Stamp Help</span> <![CDATA[ ]]><span class="ContactInfoVersion#">Version 2.5.4</span> <![CDATA[ ]]></p>
<p style="text-align: right;">Copyright ©&#160;<span class="ContactInfoCompanyName">Parallax Inc.</span></p>
<p style="text-align: right;"><span class="SystemShortDate">8/8/2012</span>
</p>
</div>
</div>
<script type="text/javascript">/* <![CDATA[ */
var _gaq = _gaq || [];
_gaq.push(['_setAccount', 'UA-285614-1']);
_gaq.push(['_trackPageview']);
(function() {
var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
})();
/* ]]> */</script>
<script type="text/javascript" src="../../SkinSupport/MadCapBodyEnd.js">
</script>
</body>
</html>
@@ -0,0 +1,127 @@
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns:MadCap="http://www.madcapsoftware.com/Schemas/MadCap.xsd" MadCap:lastBlockDepth="6" MadCap:lastHeight="94" MadCap:lastWidth="853" MadCap:disableMasterStylesheet="true" MadCap:tocPath="" MadCap:InPreviewMode="false" MadCap:PreloadImages="false" MadCap:RuntimeFileType="Topic" MadCap:TargetType="WebHelp" lang="en-us" xml:lang="en-us" MadCap:PathToHelpSystem="../../../" MadCap:HelpSystemFileName="Default.xml" MadCap:SearchType="Stem">
<head><title>END</title>
<link href="../../SkinSupport/MadCap.css" rel="stylesheet" />
<link href="../../Resources/Stylesheets/BSE_Help.css" rel="stylesheet" />
<script src="../../SkinSupport/MadCapAll.js" type="text/javascript">
</script>
</head>
<body>
<h1 class="code">END</h1>
<div class="ImagePlusCaption">
<div class="Col2">
<p>
<img src="../../graphics/pgm_icon1.gif" border="0" alt="BS1 icon" title="BS1 icon" />
<img src="../../graphics/pgm_icon2.gif" border="0" alt="BS2 icon" title="BS2 icon" />
<img src="../../graphics/pgm_icon2e.gif" border="0" alt="BS2e icon" title="BS2e icon" />
<img src="../../graphics/pgm_icon2sx.gif" border="0" alt="BS2sx icon" title="BS2sx icon" />
<img src="../../graphics/pgm_icon2p.gif" border="0" alt="BS2p icon" title="BS2p icon" />
<img src="../../graphics/pgm_icon2pe.gif" border="0" alt="BS2pe icon" title="BS2pe icon" />
<img src="../../graphics/pgm_icon2px.gif" border="0" alt="BS2px icon" title="BS2px icon" />
</p>
</div>
<p style="text-align: right;">&#160;</p>
<p>&#160;</p>
</div>
<p class="clear">&#160;</p>
<p>&#160;</p>
<p class="PlainText">Syntax: <span class="keyword_in_text">END</span></p>
<h2>Function</h2>
<p class="PlainText">End the program, placing the BASIC Stamp into low-power mode indefinitely. This
is equivalent to having a program that does not loop continuously; once the BASIC
Stamp reaches the end of the PBASIC program, it enters low-power mode indefinitely.
The <span class="keyword_in_text">END</span> command is optional, but recommended.</p>
<h2>Quick Facts</h2>
<table width="100%" cellpadding="4" cellspacing="0" border="1">
<tr align="center" bgcolor="#CFCFCF">
<td width="23%">&#160;</td>
<td width="11%">BS1</td>
<td width="11%">BS2</td>
<td width="11%">BS2e</td>
<td width="11%">BS2sx</td>
<td width="11%">BS2p</td>
<td width="11%">BS2pe</td>
<td width="11%">BS2px</td>
</tr>
<tr align="center">
<td bgcolor="#CFCFCF">Approximate current draw @ 5 VDC during Run *</td>
<td>1 mA</td>
<td>3 mA</td>
<td>25 mA</td>
<td>60 mA</td>
<td>40 mA</td>
<td>15 mA</td>
<td>55 mA</td>
</tr>
<tr align="center">
<td bgcolor="#CFCFCF">Approximate current draw @ 5 VDC during END *</td>
<td>25 µA</td>
<td>50 µA</td>
<td>200 µA</td>
<td>500 µA</td>
<td>350 µA</td>
<td>36 µA</td>
<td>450 µA</td>
</tr>
<tr>
<td align="center" bgcolor="#CFCFCF">Related Commands</td>
<td align="center" colspan="1">
<p colspan="1" align="center"><a href="NAP.htm" target="" title="" alt="" class="MCXref_0" xrefformat="{paratext}">NAP</a>, <a href="SLEEP.htm" target="" title="" alt="" class="MCXref_0" xrefformat="{paratext}">SLEEP</a></p>
</td>
<td align="center" colspan="3">
<p colspan="3" align="center"><a href="NAP.htm" target="" title="" alt="" class="MCXref_0" xrefformat="{paratext}">NAP</a>, <a href="SLEEP.htm" target="" title="" alt="" class="MCXref_0" xrefformat="{paratext}">SLEEP</a>, <a href="STOP.htm" target="" title="" alt="" class="MCXref_0" xrefformat="{paratext}">STOP</a></p>
</td>
<td align="center" colspan="3">
<p colspan="3" align="center"><a href="NAP.htm" target="" title="" alt="" class="MCXref_0" xrefformat="{paratext}">NAP</a>, <a href="SLEEP.htm" target="" title="" alt="" class="MCXref_0" xrefformat="{paratext}">SLEEP</a>, <a href="STOP.htm" target="" title="" alt="" class="MCXref_0" xrefformat="{paratext}">STOP</a>, <a href="POLLWAIT.htm" target="" title="" alt="" class="MCXref_0" xrefformat="{paratext}">POLLWAIT</a></p>
</td>
</tr>
</table>
<p>*Note: This is an approximate value, not including loads on the I/O pins</p>
<h2>Explanation</h2>
<p class="PlainText"><span class="keyword_in_text">END</span> puts the BASIC Stamp into its inactive, low-power mode. In this
mode the Stamp's current draw (excluding loads driven by the I/O pins) is
reduced to the amount shown above. <span class="keyword_in_text">END</span> keeps the BASIC Stamp
inactive until the reset line is activated, the power is cycled off and back on
or the PC downloads another program.</p>
<p class="PlainText">During execution of power conserving commands (<span class="keyword_in_text">END</span>, <span class="keyword_in_text">NAP</span>, <span class="keyword_in_text">POLLWAIT</span>, and <span class="keyword_in_text">SLEEP</span>), current will occasionally be interrupted
on I/O pins for about 18 ms durations (60 µs on the BS2pe). The reason is that the
watchdog-timer reset that awakens the BASIC Stamp during these commands also causes all of the pins to
switch to input mode for approximately 18 ms (60 µs on the BS2pe). When the interpreter
firmware regains control of the processor, it restores the I/O direction dictated
by your program.</p>
<p class="PlainText">If you plan to use <span class="keyword_in_text">END</span>, <span class="keyword_in_text">NAP</span>, <span class="keyword_in_text">POLLWAIT</span>, or <span class="keyword_in_text">SLEEP</span> in your programs,