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

          新聞中心

          EEPW首頁 > 嵌入式系統(tǒng) > 設(shè)計應(yīng)用 > 用DAC0808實現(xiàn)數(shù)字調(diào)壓

          用DAC0808實現(xiàn)數(shù)字調(diào)壓

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

          #include
          #define uint unsigned int
          #define uchar unsigned char

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

          sbit K1 = P3^0;
          sbit K2 = P3^1;
          sbit K3 = P3^2;
          sbit K4 = P3^3;
          sbit K5 = P3^4;
          sbit K6 = P3^5;
          sbit K7 = P3^6;
          sbit K8 = P3^7;

          void DelayMS(uint ms)
          {
          uchar i;
          while(ms--)
          {
          for(i=0;i<120;i++);
          }
          }

          void main()
          {
          P2 = 0x00;
          while(1)
          {
          if(K1 == 0) P2 = 0;
          if(K2 == 0) P2 = 35;
          if(K3 == 0) P2 = 70;
          if(K4 == 0) P2 = 105;
          if(K5 == 0) P2 = 140;
          if(K6 == 0) P2 = 175;
          if(K7 == 0) P2 = 210;
          if(K8 == 0) P2 = 255;
          DelayMS(2);
          }
          }

          仿真電路



          關(guān)鍵詞: DAC0808數(shù)字調(diào)

          評論


          技術(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); })();