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

          新聞中心

          EEPW首頁 > 嵌入式系統(tǒng) > 設(shè)計(jì)應(yīng)用 > ADC0809模數(shù)轉(zhuǎn)換測試程序

          ADC0809模數(shù)轉(zhuǎn)換測試程序

          作者: 時(shí)間:2016-11-13 來源:網(wǎng)絡(luò) 收藏
          采用ADC0809采集電橋上熱敏電阻的電壓,根據(jù)電壓變化來驅(qū)動(dòng)LED

          #include
          #define uint unsigned int
          sbit a=P1^0;
          sbit st=P1^1;
          sbit en=P1^2;

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

          void delay(uint z)//延時(shí)
          {
          uint x,y;
          for(x=110;x>0;x--)
          for(y=z;y>0;y--);
          }
          void start()//啟動(dòng)AD轉(zhuǎn)換
          {
          st=0;
          delay(10);
          st=1;
          delay(10);
          st=0;
          delay(10);
          }
          void init()//選擇輸入模擬通道
          {
          a=0;
          }


          void main()
          {
          init();
          while(1)
          {
          start();
          en=0;
          delay(10);
          en=1;
          P2=P0;//將數(shù)字量輸入到LED
          delay(10);

          }
          }



          評(píng)論


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