<meter id="pryje"><nav id="pryje"><delect id="pryje"></delect></nav></meter>
          <label id="pryje"></label>

          新聞中心

          EEPW首頁 > 嵌入式系統(tǒng) > 設(shè)計(jì)應(yīng)用 > 51控制直流電機(jī)正反轉(zhuǎn)

          51控制直流電機(jī)正反轉(zhuǎn)

          作者: 時間:2016-11-17 來源:網(wǎng)絡(luò) 收藏
          C代碼:

          /*************** writer:shopping.w ******************/
          #include
          #include
          #define uint unsigned int
          #define uchar unsigned char
          sbit K1 = P3^0;
          sbit K2 = P3^1;
          sbit K3 = P3^2;
          sbit LED1 = P0^0;
          sbit LED2 = P0^1;
          sbit LED3 = P0^2;
          sbit MA = P1^0;
          sbit MB = P1^1;

          本文引用地址:http://www.ex-cimer.com/article/201611/315539.htm

          void main(void)
          {
          LED1 = 1;
          LED2 = 1;
          LED3 = 0;
          while(1)
          {
          if(K1 == 0)
          {
          while(K1 == 0);
          LED1 = 0;
          LED2 = 1;
          LED3 = 1;
          MA = 0;
          MB = 1;
          }
          if(K2 == 0)
          {
          while(K1 == 0);
          LED1 = 1;
          LED2 = 0;
          LED3 = 1;
          MA = 1;
          MB = 0;
          }
          if(K3 == 0)
          {
          while(K1 == 0);
          LED1 = 1;
          LED2 = 1;
          LED3 = 0;
          MA = 0;
          MB = 0;
          }
          }
          }



          關(guān)鍵詞: 51控制直流電機(jī)正反

          評論


          技術(shù)專區(qū)

          關(guān)閉
          看屁屁www成人影院,亚洲人妻成人图片,亚洲精品成人午夜在线,日韩在线 欧美成人 (function(){ var bp = document.createElement('script'); var curProtocol = window.location.protocol.split(':')[0]; if (curProtocol === 'https') { bp.src = 'https://zz.bdstatic.com/linksubmit/push.js'; } else { bp.src = 'http://push.zhanzhang.baidu.com/push.js'; } var s = document.getElementsByTagName("script")[0]; s.parentNode.insertBefore(bp, s); })();