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

          新聞中心

          EEPW首頁 > 嵌入式系統(tǒng) > 設計應用 > ISD4004應用電路及程序

          ISD4004應用電路及程序

          作者: 時間:2011-08-09 來源:網(wǎng)絡 收藏

          temp= temp 0x01;
          if(temp) {MOSI_1;}
          else {MOSI_0;}
          SCLK_0;
          SCLK_1;
          MOSI_0;
          }
          }
          void PowerUp(void)
          {
          SS_0;
          Send_Data(0x20);
          SS_1;
          }
          void Stop(void)
          {
          SS_0; //先把SS拉低
          Send_Data( 0x10);
          SS_1; //把SS拉高,
          }

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


          void Record(uint RecAddr)
          {
          PowerUp();
          delay_ms(50);
          PowerUp();
          delay_ms(100);
          SS_0;
          Send_Data((uchar)RecAddr);
          Send_Data((uchar)(RecAddr>>8));
          Send_Data(0xA0);
          SS_1;
          SS_0;
          Send_Data(0xB0);
          SS_1;
          }
          void Play(uint Address)
          {
          PowerUp();
          delay_ms(50);
          SS_0;
          Send_Data((uchar)Address);
          Send_Data((uchar)(Address>>8));
          Send_Data( 0xE0);
          SS_1;
          SS_0;
          Send_Data(0xF0);
          SS_1;
          }
          //*************************單片機端口初始化***************************
          void port_init()
          {
          DDRA = 0xFF;
          PORTA = 0x00;
          DDRB = 0xFF;
          PORTB = 0xFF;
          DDRC = 0x00;
          PORTC = 0xFF;
          PINC = 0xff;
          DDRD = 0x00;
          PORTD = 0xff;
          }

          ////////////////////////
          void main()
          {
          port_init();
          while(1)
          {
          if(!(PIND0x10)(flag==0))
          {
          delay_ms(5);
          if(!(PIND0x10)(flag==0))
          {

          flag = 1;
          //Record(0x600);
          while(!(PIND0x10));
          }
          }

          if(!(PIND0x10)(flag == 1))
          {
          delay_ms(5);
          if(!(PIND0x10)(flag == 1))
          {
          flag=2;
          Stop();
          while(!(PIND0x10));
          }
          }
          if(!(PIND0x10)(flag == 2))
          {
          delay_ms(5);
          if(!(PIND0x10)(flag == 2))
          {
          flag=0;
          Play(0x600);
          while(!(PIND0x10));
          }
          }
          }
          }

          DIY機械鍵盤相關社區(qū):機械鍵盤DIY



          上一頁 1 2 下一頁

          關鍵詞: 程序 電路 應用 ISD4004

          評論


          相關推薦

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