📄 pid_8h.html
字号:
<!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>AVR221 - PID controller: pid.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 Page</a> | <a class="qindex" href="annotated.html">Data Structures</a> | <a class="qindex" href="files.html">File List</a> | <a class="qindex" href="functions.html">Data Fields</a> | <a class="qindex" href="globals.html">Globals</a> | <a class="qindex" href="pages.html">Related Pages</a></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">pid.c</a>. <p><ul><li>File: <a class="el" href="pid_8h.html">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 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.1 </dd></dl><dl compact><dt><b>RCSfile</b></dt><dd><a class="el" href="pid_8h.html">pid.h</a>,v </dd></dl><dl compact><dt><b>Date</b></dt><dd>2006/02/16 11:46:13 </dd></dl><p>Definition in file <a class="el" href="pid_8h-source.html">pid.h</a>.<p><code>#include "<a class="el" href="stdint_8h-source.html">stdint.h</a>"</code><br><p>Include dependency graph for pid.h:<p><center><img src="pid_8h__incl.png" border="0" usemap="#pid.h_map" alt="Include dependency graph"></center><map name="pid.h_map"><area href="stdint_8h.html" shape="rect" coords="10,81,74,108" alt=""></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="Included by dependency graph"></center><map name="pid.hdep_map"><area href="main_8c.html" shape="rect" coords="7,7,68,34" alt=""><area href="pid_8c.html" shape="rect" coords="92,7,143,34" alt=""></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 </td><td class="memItemRight" valign=bottom><a class="el" href="structPID__DATA.html">PID_DATA</a></td></tr><tr><td class="mdescLeft"> </td><td class="mdescRight">PID Status. <a href="structPID__DATA.html#_details">More...</a><br><br></td></tr><tr><td colspan=2><br><h2>Defines</h2></td></tr><tr><td class="memItemLeft" nowrap align=right valign=top>#define </td><td class="memItemRight" valign=bottom><a class="el" href="pid_8h.html#a4">FALSE</a> 0</td></tr><tr><td class="memItemLeft" nowrap align=right valign=top>#define </td><td class="memItemRight" valign=bottom><a class="el" href="pid_8h.html#a3">MAX_I_TERM</a> (MAX_LONG / 2)</td></tr><tr><td class="memItemLeft" nowrap align=right valign=top>#define </td><td class="memItemRight" valign=bottom><a class="el" href="pid_8h.html#a1">MAX_INT</a> INT16_MAX</td></tr><tr><td class="mdescLeft"> </td><td class="mdescRight">Maximum values. <a href="#a1"></a><br><br></td></tr><tr><td class="memItemLeft" nowrap align=right valign=top>#define </td><td class="memItemRight" valign=bottom><a class="el" href="pid_8h.html#a2">MAX_LONG</a> INT32_MAX</td></tr><tr><td class="memItemLeft" nowrap align=right valign=top>#define </td><td class="memItemRight" valign=bottom><a class="el" href="pid_8h.html#a0">SCALING_FACTOR</a> 128</td></tr><tr><td class="memItemLeft" nowrap align=right valign=top>#define </td><td class="memItemRight" valign=bottom><a class="el" href="pid_8h.html#a5">TRUE</a> 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> </td><td class="memItemRight" valign=bottom><a class="el" href="pid_8h.html#a6">pidData_t</a></td></tr><tr><td class="mdescLeft"> </td><td class="mdescRight">PID Status. <a href="#a6"></a><br><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#a57">int16_t</a> </td><td class="memItemRight" valign=bottom><a class="el" href="pid_8h.html#a8">pid_Controller</a> (<a class="el" href="stdint_8h.html#a57">int16_t</a> setPoint, <a class="el" href="stdint_8h.html#a57">int16_t</a> processValue, struct <a class="el" href="structPID__DATA.html">PID_DATA</a> *pid_st)</td></tr><tr><td class="mdescLeft"> </td><td class="mdescRight">PID control algorithm. <a href="#a8"></a><br><br></td></tr><tr><td class="memItemLeft" nowrap align=right valign=top>void </td><td class="memItemRight" valign=bottom><a class="el" href="pid_8h.html#a7">pid_Init</a> (<a class="el" href="stdint_8h.html#a57">int16_t</a> p_factor, <a class="el" href="stdint_8h.html#a57">int16_t</a> i_factor, <a class="el" href="stdint_8h.html#a57">int16_t</a> d_factor, struct <a class="el" href="structPID__DATA.html">PID_DATA</a> *pid)</td></tr><tr><td class="mdescLeft"> </td><td class="mdescRight">Initialisation of PID controller parameters. <a href="#a7"></a><br><br></td></tr><tr><td class="memItemLeft" nowrap align=right valign=top>void </td><td class="memItemRight" valign=bottom><a class="el" href="pid_8h.html#a9">pid_Reset_Integrator</a> (<a class="el" href="structPID__DATA.html">pidData_t</a> *pid_st)</td></tr><tr><td class="mdescLeft"> </td><td class="mdescRight">Resets the integrator. <a href="#a9"></a><br><br></td></tr></table><hr><h2>Define Documentation</h2><a class="anchor" name="a4" doxytag="pid.h::FALSE" ></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 FALSE 0 </td> </tr> </table> </td> </tr></table><table cellspacing=5 cellpadding=0 border=0> <tr> <td> </td> <td><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>. </td> </tr></table><a class="anchor" name="a3" doxytag="pid.h::MAX_I_TERM" ></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 MAX_I_TERM (MAX_LONG / 2) </td> </tr> </table> </td> </tr></table><table cellspacing=5 cellpadding=0 border=0> <tr> <td> </td> <td><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>. </td> </tr></table><a class="anchor" name="a1" doxytag="pid.h::MAX_INT" ></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 MAX_INT INT16_MAX </td> </tr> </table> </td> </tr></table><table cellspacing=5 cellpadding=0 border=0> <tr> <td> </td> <td><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>. </td> </tr></table><a class="anchor" name="a2" doxytag="pid.h::MAX_LONG" ></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 MAX_LONG INT32_MAX </td> </tr> </table> </td> </tr></table><table cellspacing=5 cellpadding=0 border=0> <tr> <td> </td> <td><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>. </td> </tr></table><a class="anchor" name="a0" doxytag="pid.h::SCALING_FACTOR" ></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 SCALING_FACTOR 128 </td> </tr> </table> </td> </tr></table><table cellspacing=5 cellpadding=0 border=0> <tr> <td> </td> <td><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>. </td> </tr></table><a class="anchor" name="a5" doxytag="pid.h::TRUE" ></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 TRUE 1 </td> </tr> </table> </td> </tr></table><table cellspacing=5 cellpadding=0 border=0> <tr> <td> </td> <td><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>. </td> </tr></table><hr><h2>Typedef Documentation</h2><a class="anchor" name="a6" doxytag="pid.h::pidData_t" ></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"> 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> </td> </tr></table>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -