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

          新聞中心

          EEPW首頁 > 嵌入式系統(tǒng) > 設計應用 > 8x8 LED 矩陣顯示

          8x8 LED 矩陣顯示

          作者: 時間:2016-11-17 來源:網絡 收藏
          C代碼:

          #include
          unsigned char code taba[]={0xfe,0xfd,0xfb,0xf7,0xef,0xdf,0xbf,0x7f};
          unsigned char code tabb[]={0x01,0x02,0x04,0x08,0x10,0x20,0x40,0x80};
          void delay(void)
          {
          unsigned char i,j;
          for(i=10;i>0;i--)
          for(j=248;j>0;j--);
          }
          void delay1(void)
          {
          unsigned char i,j,k;
          for(k=10;k>0;k--)
          for(i=20;i>0;i--)
          for(j=248;j>0;j--);
          }
          void main(void)
          {
          unsigned char i,j;
          while(1)
          {
          for(j=0;j<3;j++) //from left to right 3 time
          {
          for(i=0;i<8;i++)
          {
          P0=taba[i];
          P3=0xff;
          delay1();
          }

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

          }
          for(j=0;j<3;j++) //from right to left 3 time
          {
          for(i=0;i<8;i++)
          {
          P0=taba[7-i];
          P3=0xff;
          delay1();
          }
          }
          for(j=0;j<3;j++) //from top to bottom 3 time
          {
          for(i=0;i<8;i++)
          {
          P0=0x00;
          P3=tabb[7-i];
          delay1();
          }
          }
          for(j=0;j<3;j++) //from bottom to top 3 time
          {
          for(i=0;i<8;i++)
          { P0=0x00;
          P3=tabb[i];
          delay1();
          }
          }
          }
          }
          仿真原理圖:



          關鍵詞: 8x8LED矩陣顯

          評論


          技術專區(qū)

          關閉
          看屁屁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); })();