<p>
想请教一下站内大神,想要产生如下图所示含有</p><p>死区时间</p><p>的互补的pwm,具体的编程语言怎么写。我自己写的这一段只能在上升沿出有死区。</p><p><br></p><pre style="max-width: 100%;"><code class="cpp hljs" codemark="1">
always@(posedge CLK50M or negedge Rst_n)
<span class="hljs-function">begin
<span class="hljs-title">IF</span>
<span class="hljs-params">(!Rst_n)</span>begin
cntd1<</span>=<span class="hljs-number">5</span><span class="hljs-string">'d0;
dpwm_od1<=1'</span>b0;
<span class="hljs-function">end
<span class="hljs-keyword">else</span> begin
<span class="hljs-title">if</span><span class="hljs-params">(pwm_od1i==<span class="hljs-number">1</span><span class="hljs-string">'b0)begin
cntd1<=5'</span>d0;
dpwm_od1<=<span class="hljs-number">1</span><span class="hljs-string">'b0;
end
else if(cntd1==d_set)begin
cntd1<=d_set;
dpwm_od1<=1'</span>b1;
end
<span class="hljs-keyword">else</span> begin
cntd1<=cntd1+<span class="hljs-number">1</span><span class="hljs-string">'d1;
dpwm_od1<=1'</span>b0;
end
end
end </span></span></code></pre><br><p>
有大神可以解答一下吗,非常感谢!</p><br>
<ignore_js_op>
<dl class="tattl attm">
<dd>
自己的程序仿真图</dd><dd>
<img src="data/attach/1911/9m1u1aifgod66n0wm09i94r9ee5iy1ju.png" alt="自己的程序仿真图" title="自己的程序仿真图"></dd>
</dl>
</ignore_js_op>
<ignore_js_op>
<dl class="tattl attm">
<dd>
期望得到的pwm
<img src="data/attach/1911/hmvukmxlulbs1tt46ynjkwb9o5wn8kk9.jpg" alt="期望得到的pwm" title="期望得到的pwm">
</dd>
</dl>
</ignore_js_op>
<p><br></p>
友情提示: 此问题已得到解决,问题已经关闭,关闭后问题禁止继续编辑,回答。
一周热门 更多>