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

          新聞中心

          74LS148擴(kuò)展中斷

          作者: 時(shí)間:2016-11-17 來源:網(wǎng)絡(luò) 收藏
          #include
          sbit P1_1=P1^1;
          /*************延時(shí)子程序*******************************/
          void delay(unsigned int x)//最小1毫秒
          {
          unsigned char j;
          while(x--)
          {
          for(j=0;j<125;j++)
          {;}
          }
          }
          /*************中斷程序********************************/
          void inter_pro() interrupt 0 using0
          {
          if(P2==0xF8)
          {
          delay(10);
          P0=0x7F;
          }
          else if(P2==0xF9)
          {
          delay(10);
          P0=0xBF;
          }
          else if(P2==0xFA)
          {
          delay(10);
          P0=0xDF;
          }
          else if(P2==0xFB)
          {
          delay(10);
          P0=0xEF;
          }
          else if(P2==0xFC)
          {
          delay(10);
          P0=0xF7;
          }
          else if(P2==0xFD)
          {
          delay(10);
          P0=0xFB;
          }
          else if(P2==0xFE)
          {
          delay(10);
          P0=0xFD;
          }
          else if(P2==0xFF)
          {
          delay(10);
          P0=0xFE;
          }
          else
          P0=0xFF;
          }
          void main()
          {
          IP=0x01; //設(shè)置外部中斷0為最高級(jí)
          IE=0x81;
          while(1)
          {
          P1_1=0;
          delay(300);
          P1_1=1;
          }
          }


          關(guān)鍵詞: 74LS148擴(kuò)展中

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