⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 q.htm

📁 Ad9959源代码
💻 HTM
📖 第 1 页 / 共 5 页
字号:
            <A href="http://www.elecfans.com/soft/special/Voltage-R">基准电压源芯片</A> 
            <IMG height=6 
            src="DDS AD9959应用电路和配置源程序-电子电路图,电子技术资料网站.files/array.gif" width=4> 
            <A 
            href="http://www.elecfans.com/soft/special/electromotor">电动机</A></P>
            <P>&nbsp; <IMG height=6 
            src="DDS AD9959应用电路和配置源程序-电子电路图,电子技术资料网站.files/array_2.gif" width=4> 
            <A href="http://www.elecfans.com/soft/special/Infrared">红外遥控器芯片</A> 
            <IMG height=6 
            src="DDS AD9959应用电路和配置源程序-电子电路图,电子技术资料网站.files/array.gif" width=4> 
            <A href="http://www.elecfans.com/soft/special/java">JAVA语言</A> </P>
            <P>&nbsp; <IMG height=6 
            src="DDS AD9959应用电路和配置源程序-电子电路图,电子技术资料网站.files/array.gif" width=4> 
            <A href="http://www.elecfans.com/soft/special/LCDP">LCD供电电源芯片</A> 
            </P>
            <P>&nbsp; <IMG height=6 
            src="DDS AD9959应用电路和配置源程序-电子电路图,电子技术资料网站.files/array.gif" width=4> 
            <A href="http://www.elecfans.com/soft/special/Down">降压型开关稳压器</A> 
</P>
            <P>&nbsp; <IMG height=6 
            src="DDS AD9959应用电路和配置源程序-电子电路图,电子技术资料网站.files/array.gif" width=4> 
            <A href="http://www.elecfans.com/soft/special/LDD">激光二极管驱动器</A> </P>
            <P>&nbsp; <IMG height=6 
            src="DDS AD9959应用电路和配置源程序-电子电路图,电子技术资料网站.files/array.gif" width=4> 
            <A href="http://www.elecfans.com/soft/special/Step-Up">升压型dc 
            dc转换器</A> </P>
            <P>&nbsp; <IMG height=6 
            src="DDS AD9959应用电路和配置源程序-电子电路图,电子技术资料网站.files/array.gif" width=4> 
            <A 
            href="http://www.elecfans.com/soft/special/switches">模拟开关和多用复用器</A> 
            </P></DIV></TD></TR></TBODY></TABLE></TD>
    <TD class=tableright align=right width=570><!--软件信息开始-->
      <TABLE style="BACKGROUND-COLOR: #c8e9b4" cellSpacing=1 cellPadding=3 
      width="98%" align=center border=0>
        <TBODY>
        <TR class=showtitle1>
          <TD noWrap width="10%">软件名称</TD>
          <TD background="" colSpan=2><B>DDS AD9959应用电路和配置源程序</B></TD></TR>
        <TR>
          <TD noWrap width="10%" bgColor=#ffffff>运行环境</TD>
          <TD width="44%" bgColor=#ffffff>Win9X/Win2000/WinXP/Win2003/</TD>
          <TD align=middle width="44%" bgColor=#ffffff rowSpan=6>
            <DIV id=soft_300><IMG 
            src="DDS AD9959应用电路和配置源程序-电子电路图,电子技术资料网站.files/load.gif"></DIV></TD></TR>
        <TR>
          <TD width="10%" bgColor=#f8f8f8>整理时间</TD>
          <TD bgColor=#f8f8f8>2008-3-12 17:33:23</TD></TR>
        <TR>
          <TD width="10%" bgColor=#ffffff>软件星级</TD>
          <TD bgColor=#ffffff><IMG 
            src="DDS AD9959应用电路和配置源程序-电子电路图,电子技术资料网站.files/3star.gif"></TD></TR>
        <TR>
          <TD bgColor=#ffffff>软件大小</TD>
          <TD bgColor=#ffffff>333 KB</TD></TR>
        <TR>
          <TD bgColor=#ffffff>下载统计</TD>
          <TD bgColor=#ffffff>
            <SCRIPT language=JavaScript 
            src="DDS AD9959应用电路和配置源程序-电子电路图,电子技术资料网站.files/Hits.htm"></SCRIPT>
          </TD></TR>
        <TR>
          <TD width="10%" bgColor=#ffffff>相关连接 </TD>
          <TD bgColor=#ffffff>csb23@126.com <A href="http://www.elecfans.com/" 
            target=_blank>官方主页</A>  [<A 
            href="http://www.elecfans.com/user/favorite.asp?action=add&amp;topic=DDS AD9959应用电路和配置源程序">点击收藏</A>]</TD></TR></TBODY></TABLE>
      <TABLE cellSpacing=0 cellPadding=0 width="98%" align=center border=0>
        <TBODY>
        <TR>
          <TD height=6></TD></TR>
        <TR>
          <TD background="DDS AD9959应用电路和配置源程序-电子电路图,电子技术资料网站.files/div_4.gif" 
          height=25><IMG height=16 
            src="DDS AD9959应用电路和配置源程序-电子电路图,电子技术资料网站.files/z_load.gif" width=16> 
            软件简介</TD></TR>
        <TR>
          <TD height=4></TD></TR>
        <TR>
          <TD>
            <TABLE cellSpacing=1 cellPadding=0 width="100%" bgColor=#c8e9b4 
            border=0>
              <TBODY>
              <TR>
                <TD bgColor=#ffffff>
                  <UL class=ullist_img>
                    <DIV id=soft_01 align=left><IMG 
                    src="DDS AD9959应用电路和配置源程序-电子电路图,电子技术资料网站.files/load.gif"></DIV>
                    <P><FONT face=Verdana>DDS AD9959应用电路和配置源程序</FONT></P>
                    <P>AD9959是一款有四个DDS通道,最高达500M SPS的数字频率合成芯片。</P>
                    <P>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;常用电路接法:</P>
                    <P><IMG 
                    src="DDS AD9959应用电路和配置源程序-电子电路图,电子技术资料网站.files/20083121732826249.jpg" 
                    border=0></P>
                    <P>主要程序:</P>
                    <P>#include "config.h"<BR>void 
                    delay(void)<BR>{<BR>&nbsp;unsigned int 
                    i;<BR>&nbsp;for(i=0;i&lt;10;i++);<BR>}</P>
                    <P>/*****************************************************************************<BR><BR>功能描述:&nbsp;加载寄存器,上升延有效<BR><BR><BR><BR>*****************************************************************************/ 
                    <BR>void 
                    run(void)<BR>{<BR>&nbsp;CLR_IOUPDATE;<BR>&nbsp;CLR_IOUPDATE;<BR>&nbsp;CLR_IOUPDATE;<BR>&nbsp;CLR_IOUPDATE;<BR>&nbsp;CLR_IOUPDATE;<BR>&nbsp;CLR_IOUPDATE;<BR>&nbsp;CLR_IOUPDATE;<BR>&nbsp;<BR>&nbsp;<BR>&nbsp;SET_IOUPDATE;<BR>&nbsp;SET_IOUPDATE;&nbsp;&nbsp;&nbsp; 
                    <BR>}</P>
                    <P>/*****************************************************************************<BR>函数名:&nbsp;write_a_byte<BR><BR>功能描述:&nbsp;通过串口写一个字节,MSB 
                    first,上升延有效<BR><BR><BR><BR>*****************************************************************************/ 
                    <BR>void write_a_byte(uint8 w_data)<BR>{<BR>&nbsp;uint8 
                    i;&nbsp;&nbsp;&nbsp;&nbsp; 
                    <BR>&nbsp;for(i=0;i&lt;8;i++)<BR>&nbsp; {<BR>&nbsp;&nbsp; 
                    if(w_data &amp; 0x80)<BR>&nbsp;&nbsp; 
                    {<BR>&nbsp;&nbsp;&nbsp; SET_SDIO0;<BR>&nbsp;&nbsp; 
                    }<BR>&nbsp;&nbsp; else<BR>&nbsp;&nbsp; 
                    {<BR>&nbsp;&nbsp;&nbsp; CLR_SDIO0;<BR>&nbsp;&nbsp; 
                    }<BR>&nbsp;&nbsp; w_data &lt;&lt;= 1;<BR>&nbsp;&nbsp; 
                    SET_DDSSCLK;<BR>&nbsp;&nbsp; CLR_DDSSCLK;<BR>&nbsp; 
                    }<BR>}</P>
                    <P>/*****************************************************************************<BR>函数名:&nbsp;write_CSR<BR><BR>功能描述:&nbsp;写CSR寄存器:<BR><BR>*****************************************************************************/ 
                    <BR>void write_CSR(uint8 
                    w_data)<BR>{<BR>&nbsp;CLR_SDIO3;<BR>&nbsp;CLR_DDSCS;<BR>&nbsp;write_a_byte(0x00);&nbsp;&nbsp;&nbsp; 
                    //write address 0.&nbsp; CSR's address is 
                    0.<BR>&nbsp;write_a_byte(w_data);<BR>&nbsp;SET_DDSCS;<BR>&nbsp;SET_SDIO3;<BR>}</P>
                    <P><BR>void write_FR1(uint8 w_data1,uint8 w_data2,uint8 
                    w_data3)<BR>{<BR>&nbsp;CLR_SDIO3;<BR>&nbsp;CLR_DDSCS;<BR>&nbsp;<BR>&nbsp;write_a_byte(0x01);&nbsp;&nbsp;&nbsp; 
                    //write address 1.&nbsp; FR1's address is 
                    0x01<BR>&nbsp;write_a_byte(w_data1);<BR>&nbsp;write_a_byte(w_data2);<BR>&nbsp;write_a_byte(w_data3);<BR>&nbsp;<BR>&nbsp;SET_DDSCS;<BR>&nbsp;SET_SDIO3;<BR>}</P>
                    <P><BR>void write_FR2(uint8 w_data1,uint8 
                    w_data2)<BR>{<BR>&nbsp;CLR_SDIO3;<BR>&nbsp;CLR_DDSCS;<BR>&nbsp;<BR>&nbsp;write_a_byte(0x02);&nbsp;&nbsp;&nbsp; 
                    //write address 
                    2<BR>&nbsp;write_a_byte(w_data1);<BR>&nbsp;write_a_byte(w_data2);<BR>&nbsp;<BR>&nbsp;SET_DDSCS;<BR>&nbsp;SET_SDIO3;<BR>}</P>
                    <P>void write_CFR(uint8 w_data1,uint8 w_data2,uint8 
                    w_data3)<BR>{<BR>&nbsp;CLR_SDIO3;<BR>&nbsp;CLR_DDSCS;<BR>&nbsp;<BR>&nbsp;write_a_byte(0x03);<BR>&nbsp;write_a_byte(w_data1);<BR>&nbsp;write_a_byte(w_data2);<BR>&nbsp;write_a_byte(w_data3);<BR>&nbsp;<BR>&nbsp;SET_DDSCS;<BR>&nbsp;SET_SDIO3;<BR>}</P>
                    <P>void write_CTW0(uint32 F_word)&nbsp; //Channel Frequency 
                    Tuning Word&nbsp; 
                    (CTW0)<BR>{<BR>&nbsp;CLR_SDIO3;<BR>&nbsp;CLR_DDSCS;<BR>&nbsp;<BR>&nbsp;write_a_byte(0x04);<BR>&nbsp;write_a_byte(((unsigned 
                    char *)(&amp;F_word))[3]);<BR>&nbsp;write_a_byte(((unsigned 
                    char *)(&amp;F_word))[2]);<BR>&nbsp;write_a_byte(((unsigned 
                    char *)(&amp;F_word))[1]);<BR>&nbsp;write_a_byte(((unsigned 
                    char 
                    *)(&amp;F_word))[0]);<BR>&nbsp;<BR>&nbsp;SET_DDSCS;<BR>&nbsp;SET_SDIO3;<BR>}</P>
                    <P>void write_CPW0(uint16 
                    P_word)&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
                    //Channel Phase1 Offset Word (CPW0) 
                    (0x05)<BR>{<BR>&nbsp;CLR_SDIO3;<BR>&nbsp;CLR_DDSCS;<BR>&nbsp;<BR>&nbsp;write_a_byte(0x05);<BR>&nbsp;write_a_byte(((unsigned 
                    char 
                    *)(&amp;P_word))[1]&amp;0x3F);<BR>&nbsp;write_a_byte((((unsigned 
                    char 
                    *)(&amp;P_word))[0]));<BR>&nbsp;<BR>&nbsp;SET_DDSCS;<BR>&nbsp;SET_SDIO3;<BR>}</P>
                    <P>void write_ACR(uint32 
                    A_word)<BR>{<BR>&nbsp;CLR_SDIO3;<BR>&nbsp;CLR_DDSCS;<BR>&nbsp;write_a_byte(0x06);<BR>&nbsp;<BR>&nbsp;write_a_byte(((unsigned 
                    char *)(&amp;A_word))[3]);<BR>&nbsp;write_a_byte(((unsigned 
                    char *)(&amp;A_word))[2]);<BR>&nbsp;write_a_byte(((unsigned 
                    char 
                    *)(&amp;A_word))[1]);<BR>&nbsp;<BR>&nbsp;SET_DDSCS;<BR>&nbsp;SET_SDIO3;<BR>}</P>
                    <P>void write_LSR(uint8 rising,uint8 
                    falling)<BR>{<BR>&nbsp;CLR_SDIO3;<BR>&nbsp;CLR_DDSCS;<BR>&nbsp;<BR>&nbsp;write_a_byte(0x07);<BR>&nbsp;write_a_byte(rising);<BR>&nbsp;write_a_byte(falling);<BR>&nbsp;<BR>&nbsp;SET_DDSCS;<BR>&nbsp;SET_SDIO3;<BR>}</P>
                    <P>void write_RDW(uint32 
                    rising)<BR>{<BR>&nbsp;CLR_SDIO3;<BR>&nbsp;CLR_DDSCS;<BR>&nbsp;<BR>&nbsp;write_a_byte(0x08);<BR>&nbsp;write_a_byte(((unsigned 
                    char *)(&amp;rising))[3]);<BR>&nbsp;write_a_byte(((unsigned 
                    char *)(&amp;rising))[2]);<BR>&nbsp;write_a_byte(((unsigned 
                    char *)(&amp;rising))[1]);<BR>&nbsp;write_a_byte(((unsigned 
                    char 
                    *)(&amp;rising))[0]);<BR>&nbsp;<BR>&nbsp;SET_DDSCS;<BR>&nbsp;SET_SDIO3;<BR>}</P>
                    <P>void write_FDW(uint32 
                    falling)<BR>{<BR>&nbsp;CLR_SDIO3;<BR>&nbsp;CLR_DDSCS;<BR>&nbsp;<BR>&nbsp;write_a_byte(0x09);<BR>&nbsp;write_a_byte(((unsigned 
                    char *)(&amp;falling))[3]);<BR>&nbsp;write_a_byte(((unsigned 
                    char *)(&amp;falling))[2]);<BR>&nbsp;write_a_byte(((unsigned 
                    char *)(&amp;falling))[1]);<BR>&nbsp;write_a_byte(((unsigned 
                    char 
                    *)(&amp;falling))[0]);<BR>&nbsp;<BR>&nbsp;SET_DDSCS;<BR>&nbsp;SET_SDIO3;<BR>}</P>
                    <P>void write_CTWn(uint8 n,uint32 
                    w_data)<BR>{<BR>&nbsp;CLR_SDIO3;<BR>&nbsp;CLR_DDSCS;<BR>&nbsp;<BR>&nbsp;write_a_byte(n+0x09);&nbsp;&nbsp; 
                    //CTWn's address is n+0x09.n&gt;=1 and 
                    n&lt;=15.<BR>&nbsp;write_a_byte(((unsigned char 
                    *)(&amp;w_data))[3]);<BR>&nbsp;write_a_byte(((unsigned char 
                    *)(&amp;w_data))[2]);<BR>&nbsp;write_a_byte(((unsigned char 
                    *)(&amp;w_data))[1]);<BR>&nbsp;write_a_byte(((unsigned char 
                    *)(&amp;w_data))[0]);<BR>&nbsp;<BR>&nbsp;SET_DDSCS;<BR>&nbsp;SET_SDIO3;<BR>}</P>
                    <P>#define PLL_DIV 5<BR>#define systemp_frequency 
                    (22.1184*1000000*PLL_DIV)</P>
                    <P>void set_frequency(uint32 f)<BR>{<BR>&nbsp;unsigned long 
                    int temp;<BR>&nbsp;temp=(unsigned long 
                    int)f*(0xFFFFFFFF/(float)systemp_frequency+1.0/systemp_frequency);<BR>&nbsp;write_CTW0(temp);<BR>}</P>
                    <P><BR>uint32 change(uint32 f)<BR>{<BR>&nbsp;unsigned long 
                    int temp;<BR>&nbsp;temp=(unsigned long 
                    int)f*(0xFFFFFFFF/(float)systemp_frequency+1.0/systemp_frequency);<BR>&nbsp;return 
                    temp;<BR>}</P>
                    <P>void AD9959_init(void)<BR>{<BR>&nbsp;uint16 
                    i;<BR>&nbsp;DDS_DDR = 
                    0xff;<BR>&nbsp;CLR_DDSRESET;<BR>&nbsp;for(i=0;i&lt;10000;i++);<BR>&nbsp;<BR>&nbsp;SET_DDSCS;<BR>&nbsp;CLR_DDSSCLK;<BR>&nbsp;SET_SDIO3;<BR>&nbsp;SET_DDSRESET;<BR>&nbsp;<BR>&nbsp;for(i=0;i&lt;10000;i++);<BR>&nbsp;<BR>&nbsp;CLR_DDSRESET;<BR>&nbsp;for(i=0;i&lt;100;i++);<BR>}</P>
                    <DIV id=soft_02></DIV></UL></TD></TR></TBODY></TABLE></TD></TR>
        <TR>
          <TD height=4></TD></TR></TBODY></TABLE>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -