📄 pwm.html
字号:
<!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="dacoutput.html"><img src="b_prev.gif" alt="Previous page"
style="border: 0px solid ; width: 17px; height: 17px;"></a> <a
href="servoPWM.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">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 Pulse-Width Modulated (PWM)
signals</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_PWM_1.gif" alt=""
style="width: 107px; height: 70px;"></b></font><br>
</p>
<p><a name="180540"></a>The 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 signed input signals. The magnitude
of these signals defines the duty cycle of the PWM signal. The sign
information is displayed on one of the digital output pins.<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_PWM_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 set a correct,
hardware-achieveable 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>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>PWM period<br>
</b></dt>
<a name="180547"></a><dd>Specifies the period of the PWM pulse train.
Period values above 0.699 seconds require the use of a 16-bit PWM;
below this threshold, both <span style="font-family: monospace;">8-bit</span>
as well as <span style="font-family: monospace;">16-bit</span>
operation are possible. The maximum admissible period is 179 seconds.<br>
</dd>
<a name="183014"></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>) 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><br>
</dt>
<dt><b>Sign port</b></dt>
<dd>The PWM block allows for signed block input signals. The
magnitude of the input signal defines the duty cycle of the PWM output.
The sign information is displayed on a chosen pin of the <span
style="font-weight: bold;">Sign port</span>.<br>
</dd>
<a name="183055"></a><dt><b>Sign pin</b><br>
</dt>
<dd>The pin within the associated <span style="font-weight: bold;">Sign
port</span>. Sign information is displayed on this pin: Negative block
input signals drive this pin <span style="font-family: monospace;">high</span>,
positive block input signals set this pin to <span
style="font-family: monospace;">low</span>. </dd>
<a name="180700"></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>Signal monitoring<br>
</b>
<dl>
<dd>Ticking this checkbox causes the block to display an optional
output signal which can be used to monitor the PWM signal on a Simulink
Scope block. This feature is only useful when the block <span
style="font-weight: bold;">Sample time</span> is reasonably short with
respect to the <span style="font-weight: bold;">PWM period</span>.<br>
</dd>
<dt><br>
</dt>
</dl>
<p>
<table bgcolor="#ffe4b0" border="0" cellpadding="0" cellspacing="0"
width="100%">
<tbody>
<tr valign="top">
<td align="left" width="20"><a href="dacoutput.html"><img
src="b_prev.gif" alt="Previous page"
style="border: 0px solid ; width: 17px; height: 17px;"></a> </td>
<td align="left"> Digital-to-Analog Converter (DAC)<br>
</td>
<td> </td>
<td align="right">Servo Motor Pulse-Width Modulation (PWM) </td>
<td align="right" width="20"><a href="servopwm.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 + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -