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

          新聞中心

          EEPW首頁 > 嵌入式系統(tǒng) > 設(shè)計(jì)應(yīng)用 > 單片機(jī)C語言程序設(shè)計(jì):并行數(shù)據(jù)轉(zhuǎn)換為串行數(shù)據(jù)

          單片機(jī)C語言程序設(shè)計(jì):并行數(shù)據(jù)轉(zhuǎn)換為串行數(shù)據(jù)

          作者: 時(shí)間:2013-09-05 來源:網(wǎng)絡(luò) 收藏

          //主程序

          void main()

          {

          SCON=0x10; 串口模式 0,允許串口接收

          while(1)

          {

          SPL=0; //置數(shù)(load),讀入并行輸入口的 8 位數(shù)據(jù)

          SPL=1; //移位(shift),并口輸入被封鎖,串行轉(zhuǎn)換開始

          while(RI==0); //未接收 1 字節(jié)時(shí)等待

          RI=0; //RI 軟件置位

          P0=SBUF; //接收到的數(shù)據(jù)顯示在 P0 口,顯示撥碼開關(guān)的值

          DelayMS(20);

          }

          }

          單片機(jī)C語言程序設(shè)計(jì):并行數(shù)據(jù)轉(zhuǎn)換為串行數(shù)據(jù)


          上一頁 1 2 下一頁

          評論


          相關(guān)推薦

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