This repository has been archived on 2024-09-22. You can view files and clone it, but cannot push or open issues or pull requests.
pbi-ide/help/BasicStampHelp/Content/LanguageTopics/Commands/IOTERM.htm

115 lines
6.7 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>IOTERM</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">IOTERM</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">IOTERM</span> <![CDATA[ ]]><i>Port</i></p>
<h2>Function</h2>
<p class="PlainText">Switch program control to main I/O pins or auxiliary I/O pins (on the BS2p40 only)
depending on the value of <i>Port</i>.
</p>
<ul>
<li value="1"><b><i>Port</i></b> is a variable/constant/expression (0 - 1) that specifies
which I/O port to use.</li>
</ul>
<h2>Quick Facts</h2>
<table width="100%" cellpadding="4" cellspacing="0" border="1">
<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">Values for <i>Port</i></td>
<td>0 = switch to main I/O group, 1 = switch to auxiliary I/O group.</td>
</tr>
<tr>
<td align="center" bgcolor="#CFCFCF">I/O Pin IDs</td>
<td>0 - 15 (after IOTERM command, all references affect physical pins
5 - 20 or 21 - 36 depending on state of <i>Port).</i></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 align="center" colspan="1">
<p colspan="1" align="center"><a href="AUXIO.htm" target="" title="" alt="" class="MCXref_0" xrefformat="{paratext}">AUXIO</a>, <a href="MAINIO.htm" target="" title="" alt="" class="MCXref_0" xrefformat="{paratext}">MAINIO</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 availabe is a 40-pin module called the BS2p40
with an additional 16 I/O pins (for a total of 32). The BS2p40's I/O pins are
organized into two groups, called main and auxiliary. The I/O pins in each group
can be accessed in the same manner (by referencing I/O pins 0 - 15) but access is
only possible within one group at a time. The <span class="keyword_in_text">IOTERM</span> command causes the
BASIC Stamp to affect either the main or auxiliary I/O pins in all further code
until the <span class="keyword_in_text">MAINIO</span>, <span class="keyword_in_text">AUXIO</span> or another <span class="keyword_in_text">IOTERM</span> command is reached,
or the BASIC Stamp is reset or power-cycled. The value of <i>Port</i> determines
which group of I/O pins will be referenced. Using 0 for <i>Port</i> will switch
to the main I/O group and using 1 for Port will switch to the auxiliary group.</p>
<p class="PlainText">The following example illustrates this:</p><pre class="BScode" xml:space="preserve">
HIGH 0
IOTERM 1
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">IOTERM</span> command tells the BASIC
Stamp that all commands following it should affect the auxiliary I/O pins
(Port = 1). 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>
<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>