<pre style="max-width: 100%;"><code class="cpp hljs" codemark="1">**********************以下为代码***************************
sbit LED = P1^<span class="hljs-number">0</span>;<span class="hljs-comment">//定时器初始化函数</span>
{
TH0 = (<span class="hljs-number">65536</span> - <span class="hljs-number">50000</span>)/<span class="hljs-number">256</span>; <span class="hljs-comment">// </span>
TR0 = <span class="hljs-number">1</span>;
EA = <span class="hljs-number">1</span>;
<span class="hljs-function"><span class="hljs-keyword">void</span> <span class="hljs-title">main</span><span class="hljs-params">(<span class="hljs-keyword">void</span>)</span>
<span class="hljs-title">init</span><span class="hljs-params">()</span></span>;
}<span class="hljs-comment">//中断服务函数</span>
{
TH0 = (<span class="hljs-number">65536</span> - <span class="hljs-number">50000</span>)%<span class="hljs-number">256</span>;
}</code></pre>
<p><br></p>
友情提示: 此问题已得到解决,问题已经关闭,关闭后问题禁止继续编辑,回答。
一周热门 更多>