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

          新聞中心

          EEPW首頁 > 嵌入式系統(tǒng) > 設(shè)計(jì)應(yīng)用 > AD9850驅(qū)動程序(串行驅(qū)動)

          AD9850驅(qū)動程序(串行驅(qū)動)

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


          #include
          #include "intrins.h"
          #define uchar unsigned char
          #define uint unsigned int

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

          sbit W_CLK= P1^0;
          sbit PQ_UD= P1^1;
          //sbit RET= P1^2;

          uchar word[5]={0x00,0x00,0x00,0x00,0x00};
          unsigned long int k=42.94967296*400;//15000000就是所要輸出的頻率值,//若晶振不同為其他頻率更改數(shù)值就行了

          void chang(unsigned long int t)
          {
          word[1]=k>>24;
          word[2]=k>>16;
          word[3]=k>>8;
          word[4]=k;
          }

          delay_1ms(uint t)
          {
          uint i,j;
          for(i=0;ifor(j=0;j<120;j++);
          }

          main()
          {
          uint i;
          //RET=1;
          delay_1ms(100);
          W_CLK=0;
          PQ_UD=0;
          // RET=0;
          chang(k);
          while(1)
          {

          for(i=0;i<5;i++)
          {
          P0=word[i];
          W_CLK=1;_nop_();
          W_CLK=0;_nop_();
          }
          PQ_UD=1;_nop_();
          PQ_UD=0;_nop_();
          }
          }



          評論


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