<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
   "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" id="sixapart-standard">
<head>
   <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
   <meta name="generator" content="Movable Type 3.2" />

   <link rel="stylesheet" href="styles-site.css" type="text/css" />
   <link rel="alternate" type="application/atom+xml" title="Atom" href="atom.xml" />
   <link rel="alternate" type="application/rss+xml" title="RSS 2.0" href="index.xml" />

   <title>Double Down: State Machine</title>

   <link rel="start" href="" title="Home" />
   <link rel="prev" href="http://doublecounter.com/doubledown/2006_03_state_machine.html" title="State Machine" />
   <link rel="next" href="http://doublecounter.com/doubledown/2006_03_results_and_reflections.html" title="Results and Reflections" />

   <!--
<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
         xmlns:trackback="http://madskills.com/public/xml/rss/module/trackback/"
         xmlns:dc="http://purl.org/dc/elements/1.1/">
<rdf:Description
    rdf:about="http://doublecounter.com/doubledown/2006_03_state_machine_1.html"
    trackback:ping="http://thespork.net/mt-tb.cgi/1084"
    dc:title="State Machine"
    dc:identifier="http://doublecounter.com/doubledown/2006_03_state_machine_1.html"
    dc:subject="5 - Computation"
    dc:description=" The state machine was implimented using what simulink calls a &quot;multiport switch&quot; as a ROM table. By inputing the present value of the state variable, the program indexed and addressed the current variables it needed to deal the card..."
    dc:creator="John"
    dc:date="2006-03-15T08:35:35-06:00" />
</rdf:RDF>
-->


   

   <script type="text/javascript" src="http://doublecounter.com/doubledown/mt-site.js"></script>
</head>
<body class="layout-one-column" onload="individualArchivesOnLoad(commenter_name)">
   <div id="container">
      <div id="container-inner" class="pkg">

         <div id="banner">
            <div id="banner-inner" class="pkg">
               <h1 id="banner-header"><a href="index.html" accesskey="1">Double Down</a></h1>
               <h2 id="banner-description">An automated card-dealer</h2>
            </div>
         </div>

         <div id="pagebody">
            <div id="pagebody-inner" class="pkg">
               <div id="alpha">
                  <div id="alpha-inner" class="pkg">

                     <p class="content-nav">
                        <a href="http://doublecounter.com/doubledown/2006_03_state_machine.html">&laquo; State Machine</a> |
                        <a href="index.html">Main</a>
                        | <a href="http://doublecounter.com/doubledown/2006_03_results_and_reflections.html">Results and Reflections &raquo;</a>
                     </p>

                     <a id="a001084"></a>
                     <div class="entry" id="entry-1084">
                        <h3 class="entry-header">State Machine</h3>
                        <div class="entry-content">
                           <div class="entry-body">
                              <p><a href="simu_state_machine.html" onclick="window.open('simu_state_machine.html','popup','width=613,height=638,scrollbars=no,resizable=no,toolbar=no,directories=no,location=no,menubar=no,status=no,left=0,top=0'); return false"><img alt="simu_state_machine.gif" src="simu_state_machine.gif" width="153" height="160" /></a></p>

<p>The state machine was implimented using what simulink calls a "multiport switch" as a ROM table.  By inputing the present value of the state variable, the program indexed and addressed the current variables it needed to deal the card ot the right position.  The variables it used included Left(0) or Right(1), Card Position (positive or negative integer based on starrtup position being 0), Whether to wait for the PushButton or the Motors to settle, and what the next state would be.</p>
                           </div>
                           <div id="more" class="entry-more">
                              
                           </div>
                        </div>
                        <p class="entry-footer">
                           <span class="post-footers">Posted by John Hanauer on March 15, 2006 08:35 AM</span> <span class="separator">|</span> <a class="permalink" href="http://doublecounter.com/doubledown/2006_03_state_machine_1.html">Permalink</a>
                        </p>
                     </div>

                     

                     
                  </div>
               </div>
            </div>
         </div>
      </div>
   </div>
</body>
</html>

