⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 sm__driver_8h.html

📁 使用AVR单片机控制步进电机的软件代码
💻 HTML
📖 第 1 页 / 共 2 页
字号:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"><html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1"><title>AVR446 - Linear speed control of stepper motor: sm_driver.h File Reference</title><link href="doxygen.css" rel="stylesheet" type="text/css"></head><body><!-- Generated by Doxygen 1.3.7 --><div class="qindex"><a class="qindex" href="main.html">Main&nbsp;Page</a> | <a class="qindex" href="annotated.html">Data&nbsp;Structures</a> | <a class="qindex" href="files.html">File&nbsp;List</a> | <a class="qindex" href="functions.html">Data&nbsp;Fields</a> | <a class="qindex" href="globals.html">Globals</a> | <a class="qindex" href="pages.html">Related&nbsp;Pages</a></div><h1>sm_driver.h File Reference</h1><hr><a name="_details"></a><h2>Detailed Description</h2>Header file for <a class="el" href="sm__driver_8c.html">sm_driver.c</a>. <p><ul><li>File: <a class="el" href="sm__driver_8h.html">sm_driver.h</a></li><li>Compiler: IAR EWAAVR 4.11A</li><li>Supported devices: All devices with a 16 bit timer can be used. The example is written for ATmega48</li><li>AppNote: AVR446 - Linear speed control of stepper motor</li></ul><p><dl compact><dt><b>Author:</b></dt><dd>Atmel Corporation: <a href="http://www.atmel.com">http://www.atmel.com</a> <br> Support email: <a href="mailto:avr@atmel.com">avr@atmel.com</a></dd></dl><dl compact><dt><b>Name</b></dt><dd>RELEASE_1_0 </dd></dl><dl compact><dt><b>Revision</b></dt><dd>1.2 </dd></dl><dl compact><dt><b>RCSfile</b></dt><dd><a class="el" href="sm__driver_8h.html">sm_driver.h</a>,v </dd></dl><dl compact><dt><b>Date</b></dt><dd>2006/05/08 12:25:58 </dd></dl><p>Definition in file <a class="el" href="sm__driver_8h-source.html">sm_driver.h</a>.<p><p>This graph shows which files directly or indirectly include this file:<p><center><img src="sm__driver_8h__dep__incl.png" border="0" usemap="#sm_driver.hdep_map" alt="Included by dependency graph"></center><map name="sm_driver.hdep_map"><area href="main_8c.html" shape="rect" coords="7,7,68,34" alt=""><area href="sm__driver_8c.html" shape="rect" coords="92,7,183,34" alt=""><area href="speed__cntr_8c.html" shape="rect" coords="207,7,303,34" alt=""><area href="uart_8c.html" shape="rect" coords="327,7,383,34" alt=""></map><p><a href="sm__driver_8h-source.html">Go to the source code of this file.</a><table border=0 cellpadding=0 cellspacing=0><tr><td></td></tr><tr><td colspan=2><br><h2>Defines</h2></td></tr><tr><td class="memItemLeft" nowrap align=right valign=top>#define&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="sm__driver_8h.html#a5">A1</a>&nbsp;&nbsp;&nbsp;PD7</td></tr><tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Stepper motor winding A positive pole.  <a href="#a5"></a><br><br></td></tr><tr><td class="memItemLeft" nowrap align=right valign=top>#define&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="sm__driver_8h.html#a6">A2</a>&nbsp;&nbsp;&nbsp;PD6</td></tr><tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Stepper motor winding A negative pole.  <a href="#a6"></a><br><br></td></tr><tr><td class="memItemLeft" nowrap align=right valign=top>#define&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="sm__driver_8h.html#a7">B1</a>&nbsp;&nbsp;&nbsp;PD5</td></tr><tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Stepper motor winding B positive pole.  <a href="#a7"></a><br><br></td></tr><tr><td class="memItemLeft" nowrap align=right valign=top>#define&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="sm__driver_8h.html#a8">B2</a>&nbsp;&nbsp;&nbsp;PD4</td></tr><tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Stepper motor winding B negative pole.  <a href="#a8"></a><br><br></td></tr><tr><td class="memItemLeft" nowrap align=right valign=top>#define&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="sm__driver_8h.html#a1">CCW</a>&nbsp;&nbsp;&nbsp;1</td></tr><tr><td class="memItemLeft" nowrap align=right valign=top>#define&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="sm__driver_8h.html#a0">CW</a>&nbsp;&nbsp;&nbsp;0</td></tr><tr><td class="memItemLeft" nowrap align=right valign=top>#define&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="sm__driver_8h.html#a2">HALFSTEPS</a></td></tr><tr><td class="memItemLeft" nowrap align=right valign=top>#define&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="sm__driver_8h.html#a4">SM_DRIVE</a>&nbsp;&nbsp;&nbsp;DDRD</td></tr><tr><td class="memItemLeft" nowrap align=right valign=top>#define&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="sm__driver_8h.html#a3">SM_PORT</a>&nbsp;&nbsp;&nbsp;PORTD</td></tr><tr><td colspan=2><br><h2>Functions</h2></td></tr><tr><td class="memItemLeft" nowrap align=right valign=top>void&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="sm__driver_8h.html#a10">sm_driver_Init_IO</a> (void)</td></tr><tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Init of io-pins for stepper motor.  <a href="#a10"></a><br><br></td></tr><tr><td class="memItemLeft" nowrap align=right valign=top>unsigned char&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="sm__driver_8h.html#a11">sm_driver_StepCounter</a> (signed char inc)</td></tr><tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Move the stepper motor one step.  <a href="#a11"></a><br><br></td></tr><tr><td class="memItemLeft" nowrap align=right valign=top>void&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="sm__driver_8h.html#a12">sm_driver_StepOutput</a> (unsigned char pos)</td></tr><tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Convert the stepcounter value to signals for the stepper motor.  <a href="#a12"></a><br><br></td></tr><tr><td colspan=2><br><h2>Variables</h2></td></tr><tr><td class="memItemLeft" nowrap align=right valign=top>int&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="sm__driver_8h.html#a9">stepPosition</a></td></tr><tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Position of stepper motor.  <a href="#a9"></a><br><br></td></tr></table><hr><h2>Define Documentation</h2><a class="anchor" name="a5" doxytag="sm_driver.h::A1" ></a><p><table class="mdTable" width="100%" cellpadding="2" cellspacing="0">  <tr>    <td class="mdRow">      <table cellpadding="0" cellspacing="0" border="0">        <tr>          <td class="md" nowrap valign="top"> #define A1&nbsp;&nbsp;&nbsp;PD7          </td>        </tr>      </table>    </td>  </tr></table><table cellspacing=5 cellpadding=0 border=0>  <tr>    <td>      &nbsp;    </td>    <td><p>Stepper motor winding A positive pole. <p><p>Definition at line <a class="el" href="sm__driver_8h-source.html#l00043">43</a> of file <a class="el" href="sm__driver_8h-source.html">sm_driver.h</a>.<p>Referenced by <a class="el" href="sm__driver_8c-source.html#l00049">sm_driver_Init_IO()</a>.    </td>  </tr></table><a class="anchor" name="a6" doxytag="sm_driver.h::A2" ></a><p><table class="mdTable" width="100%" cellpadding="2" cellspacing="0">  <tr>    <td class="mdRow">      <table cellpadding="0" cellspacing="0" border="0">        <tr>          <td class="md" nowrap valign="top"> #define A2&nbsp;&nbsp;&nbsp;PD6          </td>        </tr>      </table>    </td>  </tr></table><table cellspacing=5 cellpadding=0 border=0>  <tr>    <td>      &nbsp;    </td>    <td><p>Stepper motor winding A negative pole. <p><p>Definition at line <a class="el" href="sm__driver_8h-source.html#l00044">44</a> of file <a class="el" href="sm__driver_8h-source.html">sm_driver.h</a>.<p>Referenced by <a class="el" href="sm__driver_8c-source.html#l00049">sm_driver_Init_IO()</a>.    </td>  </tr></table><a class="anchor" name="a7" doxytag="sm_driver.h::B1" ></a><p><table class="mdTable" width="100%" cellpadding="2" cellspacing="0">  <tr>    <td class="mdRow">      <table cellpadding="0" cellspacing="0" border="0">        <tr>          <td class="md" nowrap valign="top"> #define B1&nbsp;&nbsp;&nbsp;PD5          </td>        </tr>      </table>    </td>  </tr></table><table cellspacing=5 cellpadding=0 border=0>  <tr>    <td>      &nbsp;    </td>    <td><p>Stepper motor winding B positive pole. <p><p>Definition at line <a class="el" href="sm__driver_8h-source.html#l00045">45</a> of file <a class="el" href="sm__driver_8h-source.html">sm_driver.h</a>.<p>Referenced by <a class="el" href="sm__driver_8c-source.html#l00049">sm_driver_Init_IO()</a>.    </td>  </tr></table><a class="anchor" name="a8" doxytag="sm_driver.h::B2" ></a><p><table class="mdTable" width="100%" cellpadding="2" cellspacing="0">  <tr>    <td class="mdRow">      <table cellpadding="0" cellspacing="0" border="0">        <tr>          <td class="md" nowrap valign="top"> #define B2&nbsp;&nbsp;&nbsp;PD4          </td>        </tr>      </table>    </td>  </tr></table><table cellspacing=5 cellpadding=0 border=0>  <tr>    <td>      &nbsp;    </td>    <td><p>Stepper motor winding B negative pole. <p><p>Definition at line <a class="el" href="sm__driver_8h-source.html#l00046">46</a> of file <a class="el" href="sm__driver_8h-source.html">sm_driver.h</a>.<p>Referenced by <a class="el" href="sm__driver_8c-source.html#l00049">sm_driver_Init_IO()</a>.    </td>  </tr></table><a class="anchor" name="a1" doxytag="sm_driver.h::CCW" ></a><p><table class="mdTable" width="100%" cellpadding="2" cellspacing="0">  <tr>    <td class="mdRow">      <table cellpadding="0" cellspacing="0" border="0">        <tr>          <td class="md" nowrap valign="top"> #define CCW&nbsp;&nbsp;&nbsp;1          </td>        </tr>      </table>    </td>  </tr></table><table cellspacing=5 cellpadding=0 border=0>  <tr>    <td>      &nbsp;    </td>    <td><p><p>Definition at line <a class="el" href="sm__driver_8h-source.html#l00026">26</a> of file <a class="el" href="sm__driver_8h-source.html">sm_driver.h</a>.<p>Referenced by <a class="el" href="sm__driver_8c-source.html#l00066">sm_driver_StepCounter()</a>, and <a class="el" href="speed__cntr_8c-source.html#l00046">speed_cntr_Move()</a>.    </td>  </tr></table><a class="anchor" name="a0" doxytag="sm_driver.h::CW" ></a><p><table class="mdTable" width="100%" cellpadding="2" cellspacing="0">  <tr>    <td class="mdRow">      <table cellpadding="0" cellspacing="0" border="0">        <tr>          <td class="md" nowrap valign="top"> #define CW&nbsp;&nbsp;&nbsp;0          </td>        </tr>      </table>    </td>  </tr></table><table cellspacing=5 cellpadding=0 border=0>  <tr>    <td>      &nbsp;    </td>    <td><p><p>Definition at line <a class="el" href="sm__driver_8h-source.html#l00025">25</a> of file <a class="el" href="sm__driver_8h-source.html">sm_driver.h</a>.<p>Referenced by <a class="el" href="speed__cntr_8c-source.html#l00046">speed_cntr_Move()</a>.    </td>  </tr></table><a class="anchor" name="a2" doxytag="sm_driver.h::HALFSTEPS" ></a><p><table class="mdTable" width="100%" cellpadding="2" cellspacing="0">  <tr>    <td class="mdRow">      <table cellpadding="0" cellspacing="0" border="0">        <tr>          <td class="md" nowrap valign="top"> #define HALFSTEPS          </td>        </tr>      </table>    </td>  </tr></table><table cellspacing=5 cellpadding=0 border=0>  <tr>    <td>      &nbsp;    </td>    <td><p>Define stepping mode to use in stepper motor.<p>Either halfsteps (HALFSTEPS) or fullsteps (FULLSTEPS) are allowed. <p>Definition at line <a class="el" href="sm__driver_8h-source.html#l00033">33</a> of file <a class="el" href="sm__driver_8h-source.html">sm_driver.h</a>.    </td>  </tr></table><a class="anchor" name="a4" doxytag="sm_driver.h::SM_DRIVE" ></a><p><table class="mdTable" width="100%" cellpadding="2" cellspacing="0">  <tr>    <td class="mdRow">      <table cellpadding="0" cellspacing="0" border="0">        <tr>          <td class="md" nowrap valign="top"> #define SM_DRIVE&nbsp;&nbsp;&nbsp;DDRD          </td>        </tr>      </table>    </td>  </tr>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -