servopwm.html

来自「simulink real-time workshop for dragon12」· HTML 代码 · 共 146 行

HTML
146
字号
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
  <title>PWM (Embedded Target for Freescale 9S12)</title>
<!-- $Revision: 1.1 $  $Date: 2003/02/04 20:59:06 $ --><!-- DOCNAME: Embedded Target for Freescale 9SC12 --><!-- CHUNKNAME: PWM --><!-- CHAPNAME: PWM --><!-- HEADSTUFF -->
  <link rel="stylesheet" href="docstyle1.css" type="text/css">
</head>
<body style="background-color: rgb(255, 255, 255);">
<a name="180531">
<!-- NAVBARTOP --></a>
<table border="0" cellpadding="0" cellspacing="0" width="100%">
  <tbody>
    <tr>
      <td bgcolor="#ffe4b0" valign="baseline"><b>Embedded Target for
Freescale 9S12 microcontrollers<br>
      </b></td>
      <td align="right" bgcolor="#ffe4b0" valign="baseline"><a
 href="pwm.html"><img src="b_prev.gif" alt="Previous page"
 style="border: 0px solid ; width: 17px; height: 17px;"></a>&nbsp;&nbsp;&nbsp;<a
 href="userTelTxD.html"><img src="b_next.gif" alt="Next Page"
 style="border: 0px solid ; width: 17px; height: 17px;"></a></td>
    </tr>
  </tbody>
</table>
<a name="180531"><font color="#990000" size="+3">Servo Motor
Pulse-Width Modulation
(PWM)</font>
<!-- FNAME:ADC Input --></a><a name="180531"></a><a
 name="hc12_ADC_In_blkref"></a><!-- H2 --><a name="180533"></a><br>
<p><a name="180534"></a>Driver block for servo motors<br>
</p>
<a name="library"></a><!-- H2 --><a name="180535"></a>
<p><font color="#990000" size="+1"><b>Library</b></font><br>
</p>
<p><a name="180536"></a>Real-Time mc9S12 Toolbox<br>
</p>
<a name="description"></a><!-- H2 --><a name="180539"></a>
<p><font color="#990000" size="+1"><b>Description</b></font></p>
<p><font color="#990000" size="+1"><b><img src="mc9S12_servoPWM_1.gif"
 alt="" style="width: 107px; height: 70px;"></b></font><br>
</p>
<p><a name="180540"></a>The Servo Motor PWM Output block can be
configured to
produce Pulse-Width Modulated signals with an 8-bit or 16-bit
resolution. Up to 8 PWM channels are available (8-bit mode, 4 channels
in 16-bit mode). The block accepts unipolar input signals. The
magnitude
of these signals defines the duty cycle of the PWM signal, ranging from
the specified Minimum Pulse Width (0) to the specified Maximum Pulse
Width (saturation input level). The
specified resolution (8 bit / 16 bit) applies to the entire period of
the PWM signal, i. e.
the smallest increment is PWMperiod /
2<sup>Resolution</sup>.<br>
</p>
<!-- H2 --><a name="180541"></a>
<p><font color="#990000" size="+1"><b>Dialog Box</b></font><br>
</p>
<p><a name="180545"></a><img src="mc9S12_servoPWM_2.gif" alt=""
 style="width: 375px; height: 295px;"></p>
<dl>
  <a name="182791"></a><dt><br>
  </dt>
  <dt><b>Sample time</b></dt>
  <dd>Sample time for the block. To choose a valid sample time, you
should use the <span style="font-family: monospace;">display timing
signals</span><code></code>
option described in <span style="text-decoration: underline;">Determining
the base sample rate</span>.</dd>
</dl>
<dl>
  <dt><a name="182791"></a></dt>
  <dt><b>PWM period<br>
    </b></dt>
  <dd>Period of the Pulse-Width Modulated signal. This is typically 20
ms or 40 ms.</dd>
</dl>
<dl>
  <dt><a name="182791"></a></dt>
</dl>
<dl>
  <dt><b>Minimum Pulse Width<br>
    </b></dt>
  <dd>This is the pulse width of the shortest pulses, corresponding to
the minimum position of the servo motor.</dd>
</dl>
<dl>
  <dt><a name="182791"></a></dt>
  <dt><b>Maximum Pulse Width<br>
    </b></dt>
  <dd>This is the pulse width of the longest pulses, corresponding to
the maximum position of the servo motor.</dd>
</dl>
<dl>
  <dt><a name="182791"></a></dt>
</dl>
<dl>
  <dt><b>Resolution</b></dt>
  <a name="182792"></a><dd>The resolution of the chosen PWM channel.
There are 8 channels at <span style="font-family: monospace;">8-bit</span>
or 4 channels at <span style="font-family: monospace;">16-bit</span>. <code></code>
  </dd>
  <a name="180546"></a><dt><b>Pulse pin</b></dt>
  <a name="183015"></a><dd>The PWM unit uses port P (<span
 style="font-family: monospace;">PTP</span>)&nbsp; to display the pulse
sequences. As each <span style="font-family: monospace;">16-bit</span>
channel ties up 2 PWM timers, only every second pin of <span
 style="font-family: monospace;">PTP</span> can be chosen in <span
 style="font-family: monospace;">16-bit</span> mode ('<span
 style="font-family: monospace;">1</span>', <span
 style="font-family: monospace;"></span>'<span
 style="font-family: monospace;">3</span>', '<span
 style="font-family: monospace;">5</span>' or '<span
 style="font-family: monospace;">7</span>'). This constraint does not
apply to the <span style="font-family: monospace;">8-bit</span> mode.<br>
  </dd>
  <a name="183016"></a><dt><b>Saturation input level (Simulated voltage)<br>
    </b></dt>
  <dd>Block input signals with a magnitude above this level are mapped
to a duty cycle of 100%.</dd>
</dl>
<b></b><br>
<p>
<table bgcolor="#ffe4b0" border="0" cellpadding="0" cellspacing="0"
 width="100%">
  <tbody>
    <tr valign="top">
      <td align="left" width="20"><a href="pwm.html"><img
 src="b_prev.gif" alt="Previous page"
 style="border: 0px solid ; width: 17px; height: 17px;"></a>&nbsp;</td>
      <td align="left">&nbsp;Pulse-Width Modulation (PWM)</td>
      <td>&nbsp;</td>
      <td align="right">User Telegram Transmission<br>
&nbsp; <br>
      </td>
      <td align="right" width="20"><a href="userTelTxD.html"><img
 src="b_next.gif" alt="Next page"
 style="border: 0px solid ; width: 17px; height: 17px;"></a></td>
    </tr>
  </tbody>
</table>
<br>
<!-- Last updated: fw-03-05 --></p>
</body>
</html>

⌨️ 快捷键说明

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