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

📄 pid_8h.html

📁 一个用AVR单片机做的PID炉温控制器
💻 HTML
📖 第 1 页 / 共 2 页
字号:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"><html><head><meta http-equiv="Content-Type" content="text/html;charset=UTF-8"><title>AVR221 - PID controller: pid.h File Reference</title><link href="doxygen.css" rel="stylesheet" type="text/css"><link href="tabs.css" rel="stylesheet" type="text/css"></head><body><!-- Generated by Doxygen 1.5.2 --><div class="tabs">  <ul>    <li><a href="main.html"><span>Main&nbsp;Page</span></a></li>    <li><a href="annotated.html"><span>Data&nbsp;Structures</span></a></li>    <li class="current"><a href="files.html"><span>Files</span></a></li>    <li><a href="pages.html"><span>Related&nbsp;Pages</span></a></li>  </ul></div><div class="tabs">  <ul>    <li><a href="files.html"><span>File&nbsp;List</span></a></li>    <li><a href="globals.html"><span>Globals</span></a></li>  </ul></div><h1>pid.h File Reference</h1><hr><a name="_details"></a><h2>Detailed Description</h2>Header file for <a class="el" href="pid_8c.html" title="General PID implementation for AVR.">pid.c</a>. <p><ul><li>File: <a class="el" href="pid_8h.html" title="Header file for pid.c.">pid.h</a></li><li>Compiler: IAR EWAAVR 4.11A</li><li>Supported devices: All AVR devices can be used.</li><li>AppNote: AVR221 - Discrete PID controller</li></ul><p><dl class="author" 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>$Name$ <dl class="rcs" compact><dt><b>Revision</b></dt><dd>456 </dd></dl>$RCSfile$ <dl class="rcs" compact><dt><b>Date</b></dt><dd>2006-02-16 12:46:13 +0100 (to, 16 feb 2006) </dd></dl><p>Definition in file <a class="el" href="pid_8h-source.html">pid.h</a>.<p><code>#include &quot;<a class="el" href="stdint_8h-source.html">stdint.h</a>&quot;</code><br><p>Include dependency graph for pid.h:<p><center><img src="pid_8h__incl.png" border="0" usemap="#pid.h_map" alt=""></center><map name="pid.h_map"><area shape="rect" href="stdint_8h.html" title="Header file for pid.c." alt="" coords="105,5,169,32"></map><p>This graph shows which files directly or indirectly include this file:<p><center><img src="pid_8h__dep__incl.png" border="0" usemap="#pid.hdep_map" alt=""></center><map name="pid.hdep_map"><area shape="rect" href="main_8c.html" title="Header file for pid.c." alt="" coords="104,5,165,32"><area shape="rect" href="pid_8c.html" title="Header file for pid.c." alt="" coords="109,56,160,83"></map><p><a href="pid_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>Data Structures</h2></td></tr><tr><td class="memItemLeft" nowrap align="right" valign="top">struct &nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="structPID__DATA.html">PID_DATA</a></td></tr><tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">PID Status.  <a href="structPID__DATA.html#_details">More...</a><br></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="pid_8h.html#a93f0eb578d23995850d61f7d61c55c1">FALSE</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="pid_8h.html#c375d861606f40c7616251bb33f7c9ab">MAX_I_TERM</a>&nbsp;&nbsp;&nbsp;(MAX_LONG / 2)</td></tr><tr><td class="memItemLeft" nowrap align="right" valign="top">#define&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="pid_8h.html#aa1ac5caef84256eaeb39594e58e096f">MAX_INT</a>&nbsp;&nbsp;&nbsp;INT16_MAX</td></tr><tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Maximum values.  <a href="#aa1ac5caef84256eaeb39594e58e096f"></a><br></td></tr><tr><td class="memItemLeft" nowrap align="right" valign="top">#define&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="pid_8h.html#5535b838abf57fcd6aa71dd632c51bc8">MAX_LONG</a>&nbsp;&nbsp;&nbsp;INT32_MAX</td></tr><tr><td class="memItemLeft" nowrap align="right" valign="top">#define&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="pid_8h.html#1dfc2df4edf95f828461ec28a276d36c">SCALING_FACTOR</a>&nbsp;&nbsp;&nbsp;128</td></tr><tr><td class="memItemLeft" nowrap align="right" valign="top">#define&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="pid_8h.html#a8cecfc5c5c054d2875c03e77b7be15d">TRUE</a>&nbsp;&nbsp;&nbsp;1</td></tr><tr><td colspan="2"><br><h2>Typedefs</h2></td></tr><tr><td class="memItemLeft" nowrap align="right" valign="top">typedef <a class="el" href="structPID__DATA.html">PID_DATA</a>&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="pid_8h.html#9d6249c93388816b9a13c444e18574c6">pidData_t</a></td></tr><tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">PID Status.  <a href="#9d6249c93388816b9a13c444e18574c6"></a><br></td></tr><tr><td colspan="2"><br><h2>Functions</h2></td></tr><tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="el" href="stdint_8h.html#269259c924dce846340ddbb810db2e3c">int16_t</a>&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="pid_8h.html#c0129c983e062dd6ee925ea932bae93f">pid_Controller</a> (<a class="el" href="stdint_8h.html#269259c924dce846340ddbb810db2e3c">int16_t</a> setPoint, <a class="el" href="stdint_8h.html#269259c924dce846340ddbb810db2e3c">int16_t</a> processValue, struct <a class="el" href="structPID__DATA.html">PID_DATA</a> *pid_st)</td></tr><tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">PID control algorithm.  <a href="#c0129c983e062dd6ee925ea932bae93f"></a><br></td></tr><tr><td class="memItemLeft" nowrap align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="pid_8h.html#29fe06205528f56bcfdd242e3d1f9c19">pid_Init</a> (<a class="el" href="stdint_8h.html#269259c924dce846340ddbb810db2e3c">int16_t</a> p_factor, <a class="el" href="stdint_8h.html#269259c924dce846340ddbb810db2e3c">int16_t</a> i_factor, <a class="el" href="stdint_8h.html#269259c924dce846340ddbb810db2e3c">int16_t</a> d_factor, struct <a class="el" href="structPID__DATA.html">PID_DATA</a> *pid)</td></tr><tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Initialisation of PID controller parameters.  <a href="#29fe06205528f56bcfdd242e3d1f9c19"></a><br></td></tr><tr><td class="memItemLeft" nowrap align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="pid_8h.html#7b7ef4e688a58b21b6d36f620d8a645e">pid_Reset_Integrator</a> (<a class="el" href="structPID__DATA.html">pidData_t</a> *pid_st)</td></tr><tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Resets the integrator.  <a href="#7b7ef4e688a58b21b6d36f620d8a645e"></a><br></td></tr></table><hr><h2>Define Documentation</h2><a class="anchor" name="a93f0eb578d23995850d61f7d61c55c1"></a><!-- doxytag: member="pid.h::FALSE" ref="a93f0eb578d23995850d61f7d61c55c1" args="" --><div class="memitem"><div class="memproto">      <table class="memname">        <tr>          <td class="memname">#define FALSE&nbsp;&nbsp;&nbsp;0          </td>        </tr>      </table></div><div class="memdoc"><p><p>Definition at line <a class="el" href="pid_8h-source.html#l00058">58</a> of file <a class="el" href="pid_8h-source.html">pid.h</a>.<p>Referenced by <a class="el" href="main_8c-source.html#l00117">main()</a>.</div></div><p><a class="anchor" name="c375d861606f40c7616251bb33f7c9ab"></a><!-- doxytag: member="pid.h::MAX_I_TERM" ref="c375d861606f40c7616251bb33f7c9ab" args="" --><div class="memitem"><div class="memproto">      <table class="memname">        <tr>          <td class="memname">#define MAX_I_TERM&nbsp;&nbsp;&nbsp;(MAX_LONG / 2)          </td>        </tr>      </table></div><div class="memdoc"><p><p>Definition at line <a class="el" href="pid_8h-source.html#l00055">55</a> of file <a class="el" href="pid_8h-source.html">pid.h</a>.<p>Referenced by <a class="el" href="pid_8c-source.html#l00059">pid_Controller()</a>, and <a class="el" href="pid_8c-source.html#l00035">pid_Init()</a>.</div></div><p><a class="anchor" name="aa1ac5caef84256eaeb39594e58e096f"></a><!-- doxytag: member="pid.h::MAX_INT" ref="aa1ac5caef84256eaeb39594e58e096f" args="" --><div class="memitem"><div class="memproto">      <table class="memname">        <tr>          <td class="memname">#define MAX_INT&nbsp;&nbsp;&nbsp;INT16_MAX          </td>        </tr>      </table></div><div class="memdoc"><p>Maximum values. <p>Needed to avoid sign/overflow problems <p>Definition at line <a class="el" href="pid_8h-source.html#l00053">53</a> of file <a class="el" href="pid_8h-source.html">pid.h</a>.<p>Referenced by <a class="el" href="pid_8c-source.html#l00059">pid_Controller()</a>, and <a class="el" href="pid_8c-source.html#l00035">pid_Init()</a>.</div></div><p><a class="anchor" name="5535b838abf57fcd6aa71dd632c51bc8"></a><!-- doxytag: member="pid.h::MAX_LONG" ref="5535b838abf57fcd6aa71dd632c51bc8" args="" --><div class="memitem"><div class="memproto">      <table class="memname">        <tr>          <td class="memname">#define MAX_LONG&nbsp;&nbsp;&nbsp;INT32_MAX          </td>        </tr>      </table></div><div class="memdoc"><p><p>Definition at line <a class="el" href="pid_8h-source.html#l00054">54</a> of file <a class="el" href="pid_8h-source.html">pid.h</a>.</div></div><p><a class="anchor" name="1dfc2df4edf95f828461ec28a276d36c"></a><!-- doxytag: member="pid.h::SCALING_FACTOR" ref="1dfc2df4edf95f828461ec28a276d36c" args="" --><div class="memitem"><div class="memproto">      <table class="memname">        <tr>          <td class="memname">#define SCALING_FACTOR&nbsp;&nbsp;&nbsp;128          </td>        </tr>      </table></div><div class="memdoc"><p><p>Definition at line <a class="el" href="pid_8h-source.html#l00025">25</a> of file <a class="el" href="pid_8h-source.html">pid.h</a>.<p>Referenced by <a class="el" href="main_8c-source.html#l00075">Init()</a>, and <a class="el" href="pid_8c-source.html#l00059">pid_Controller()</a>.</div></div><p><a class="anchor" name="a8cecfc5c5c054d2875c03e77b7be15d"></a><!-- doxytag: member="pid.h::TRUE" ref="a8cecfc5c5c054d2875c03e77b7be15d" args="" --><div class="memitem"><div class="memproto">      <table class="memname">        <tr>          <td class="memname">#define TRUE&nbsp;&nbsp;&nbsp;1          </td>        </tr>      </table></div><div class="memdoc"><p><p>Definition at line <a class="el" href="pid_8h-source.html#l00059">59</a> of file <a class="el" href="pid_8h-source.html">pid.h</a>.<p>Referenced by <a class="el" href="main_8c-source.html#l00062">TIMER0_OVF_ISR()</a>.</div></div><p><hr><h2>Typedef Documentation</h2><a class="anchor" name="9d6249c93388816b9a13c444e18574c6"></a><!-- doxytag: member="pid.h::pidData_t" ref="9d6249c93388816b9a13c444e18574c6" args="" --><div class="memitem"><div class="memproto">      <table class="memname">        <tr>          <td class="memname">typedef struct <a class="el" href="structPID__DATA.html">PID_DATA</a>  <a class="el" href="structPID__DATA.html">pidData_t</a>          </td>        </tr>      </table></div><div class="memdoc"><p>PID Status. <p>

⌨️ 快捷键说明

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