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

          新聞中心

          AVR數(shù)碼管掃描

          作者: 時間:2016-11-24 來源:網(wǎng)絡(luò) 收藏
          #include <avr/io.h>

          #define uchar unsigned char
          #define uint unsigned int
          uchar display[] = { 0x3f,0x06,0x5b,0x4f,0x66,0x6d,0x7d,0x07,0x7f,0x6f,0x77,0x7c,0x39,0x5e,0x79,0x71};
          uchar slice[] = { 0x70,0xb0,0xd0,0xe0};
          int main(void)

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

          {
          uchar temp=0,tempb;
          uint i;

          DDRD &= ~(1<<7);
          PORTD |= (1 << 7);//打開上啦電阻
          DDRB = 0xff;//設(shè)置為輸出
          DDRA = 0xf0;//設(shè)置為輸出
          tempb = PIND;

          while(1)
          {

          for(temp=0;temp<4;temp++)
          {
          PORTA = slice[temp];
          PORTB =display[temp];
          for(tempb=0;tempb<200;tempb++)
          for(i=0;i<2000;i++);
          }
          }
          }



          關(guān)鍵詞: AVR數(shù)碼管掃

          評論


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