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

          新聞中心

          EEPW首頁 > 嵌入式系統(tǒng) > 設(shè)計(jì)應(yīng)用 > 8位串行數(shù)碼管模塊__設(shè)計(jì)原理圖及測試程序

          8位串行數(shù)碼管模塊__設(shè)計(jì)原理圖及測試程序

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

          完整的源碼下載地址:http://www.51hei.com/f/chcxde.rar
          /***采用2片595驅(qū)動,動態(tài)掃描原理顯示,需要單片機(jī)3路IO口(DIO接 P33 SCK接P32 RCK接P34),上電顯示時鐘****/
          #include
          unsigned int tcount;
          unsigned char m;
          static unsigned char second,minute,hour;

          unsigned char code fseg[]={0xc0,0xf9,0xa4,0xb0,0x99,0x92,0x82,0xf8,0x80,0x90};
          unsigned char code segbit[]={0x80,0x40,0x20,0x10,0x08,0x04,0x02,0x01};
          unsigned char disbuf[8]={0,0,0,0,0,0,0,0};

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


          //數(shù)據(jù)傳輸//
          void sdata(void)
          {unsigned char b,c,num;

          if(b==0)
          {
          b++;
          num=segbit[m];
          for(c=0;c<8;c++)
          {P3_2=0;
          P3_3=num&0x80;
          num<<=1;
          P3_2=1;
          }

          }

          if(b==1)

          {
          b--;
          if(m==2||m==5)
          {num=0xbf;}
          else
          {num=fseg[disbuf[m]];}

          for(c=0;c<8;c++)
          { P3_2=0;
          P3_3=num&0x80;
          num<<=1;
          P3_2=1;
          }

          }
          m++;
          if(m==8)
          {m=0;
          }
          }
          //數(shù)據(jù)傳輸//


          //延時0.1ms個單位//

          void delay (unsigned char h)
          { while(h--);
          }
          //延時0.1ms個單位//


          //數(shù)據(jù)輸出//
          void out(void)
          {P3_4=0;
          delay(50);
          P3_4=1;
          }
          //數(shù)據(jù)輸出//


          上一頁 1 2 下一頁

          評論


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