121 lines
7.1 KiB
HTML
121 lines
7.1 KiB
HTML
<?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> </p>
|
|
</div>
|
|
<p class="clear"> </p>
|
|
<p> </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"> </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. </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 © <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> |