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

          新聞中心

          EEPW首頁 > 嵌入式系統(tǒng) > 設(shè)計應用 > AVR128的程序——獨立按鍵控制蜂鳴器鳴叫

          AVR128的程序——獨立按鍵控制蜂鳴器鳴叫

          作者: 時間:2016-11-22 來源:網(wǎng)絡(luò) 收藏
          #include
          #define uchar unsigned char
          #define uint unsigned int
          void Delayms(uint MS)
          {
          uint i,j;
          for(i=0;i
          for(j=0;j<1141;j++);
          }
          void main(void)
          {
          DDRA = 0XFF;
          PORTA = 0XFF;
          DDRC = 0XFF;
          PORTC = 0XFF;
          DDRF |= 0X0E;
          PORTF |= 0X0E;
          PORTF &= 0xF0;
          DDRD = 0x00;
          PORTD = 0XFF;
          DDRE |= 0X80;
          PORTE = 0X00;
          DDRB |= 0X10;
          PORTB |= 0X10;
          while(1)
          {
          if((PIND&0x01) != 0X01);
          Delayms(5);
          if((PIND&0x01) != 0X01)
          {
          PORTE |= 0X80;
          }
          while((PIND&0x01) != 0X01);
          PORTE = 0X00;
          }
          }



          關(guān)鍵詞: AVR128獨立按鍵蜂鳴器鳴

          評論


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