📄 q.htm
字号:
<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> <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> <IMG height=6
src="DDS AD9959应用电路和配置源程序-电子电路图,电子技术资料网站.files/array.gif" width=4>
<A href="http://www.elecfans.com/soft/special/LCDP">LCD供电电源芯片</A>
</P>
<P> <IMG height=6
src="DDS AD9959应用电路和配置源程序-电子电路图,电子技术资料网站.files/array.gif" width=4>
<A href="http://www.elecfans.com/soft/special/Down">降压型开关稳压器</A>
</P>
<P> <IMG height=6
src="DDS AD9959应用电路和配置源程序-电子电路图,电子技术资料网站.files/array.gif" width=4>
<A href="http://www.elecfans.com/soft/special/LDD">激光二极管驱动器</A> </P>
<P> <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> <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&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> 常用电路接法:</P>
<P><IMG
src="DDS AD9959应用电路和配置源程序-电子电路图,电子技术资料网站.files/20083121732826249.jpg"
border=0></P>
<P>主要程序:</P>
<P>#include "config.h"<BR>void
delay(void)<BR>{<BR> unsigned int
i;<BR> for(i=0;i<10;i++);<BR>}</P>
<P>/*****************************************************************************<BR><BR>功能描述: 加载寄存器,上升延有效<BR><BR><BR><BR>*****************************************************************************/
<BR>void
run(void)<BR>{<BR> CLR_IOUPDATE;<BR> CLR_IOUPDATE;<BR> CLR_IOUPDATE;<BR> CLR_IOUPDATE;<BR> CLR_IOUPDATE;<BR> CLR_IOUPDATE;<BR> CLR_IOUPDATE;<BR> <BR> <BR> SET_IOUPDATE;<BR> SET_IOUPDATE;
<BR>}</P>
<P>/*****************************************************************************<BR>函数名: write_a_byte<BR><BR>功能描述: 通过串口写一个字节,MSB
first,上升延有效<BR><BR><BR><BR>*****************************************************************************/
<BR>void write_a_byte(uint8 w_data)<BR>{<BR> uint8
i;
<BR> for(i=0;i<8;i++)<BR> {<BR>
if(w_data & 0x80)<BR>
{<BR> SET_SDIO0;<BR>
}<BR> else<BR>
{<BR> CLR_SDIO0;<BR>
}<BR> w_data <<= 1;<BR>
SET_DDSSCLK;<BR> CLR_DDSSCLK;<BR>
}<BR>}</P>
<P>/*****************************************************************************<BR>函数名: write_CSR<BR><BR>功能描述: 写CSR寄存器:<BR><BR>*****************************************************************************/
<BR>void write_CSR(uint8
w_data)<BR>{<BR> CLR_SDIO3;<BR> CLR_DDSCS;<BR> write_a_byte(0x00);
//write address 0. CSR's address is
0.<BR> write_a_byte(w_data);<BR> SET_DDSCS;<BR> SET_SDIO3;<BR>}</P>
<P><BR>void write_FR1(uint8 w_data1,uint8 w_data2,uint8
w_data3)<BR>{<BR> CLR_SDIO3;<BR> CLR_DDSCS;<BR> <BR> write_a_byte(0x01);
//write address 1. FR1's address is
0x01<BR> write_a_byte(w_data1);<BR> write_a_byte(w_data2);<BR> write_a_byte(w_data3);<BR> <BR> SET_DDSCS;<BR> SET_SDIO3;<BR>}</P>
<P><BR>void write_FR2(uint8 w_data1,uint8
w_data2)<BR>{<BR> CLR_SDIO3;<BR> CLR_DDSCS;<BR> <BR> write_a_byte(0x02);
//write address
2<BR> write_a_byte(w_data1);<BR> write_a_byte(w_data2);<BR> <BR> SET_DDSCS;<BR> SET_SDIO3;<BR>}</P>
<P>void write_CFR(uint8 w_data1,uint8 w_data2,uint8
w_data3)<BR>{<BR> CLR_SDIO3;<BR> CLR_DDSCS;<BR> <BR> write_a_byte(0x03);<BR> write_a_byte(w_data1);<BR> write_a_byte(w_data2);<BR> write_a_byte(w_data3);<BR> <BR> SET_DDSCS;<BR> SET_SDIO3;<BR>}</P>
<P>void write_CTW0(uint32 F_word) //Channel Frequency
Tuning Word
(CTW0)<BR>{<BR> CLR_SDIO3;<BR> CLR_DDSCS;<BR> <BR> write_a_byte(0x04);<BR> write_a_byte(((unsigned
char *)(&F_word))[3]);<BR> write_a_byte(((unsigned
char *)(&F_word))[2]);<BR> write_a_byte(((unsigned
char *)(&F_word))[1]);<BR> write_a_byte(((unsigned
char
*)(&F_word))[0]);<BR> <BR> SET_DDSCS;<BR> SET_SDIO3;<BR>}</P>
<P>void write_CPW0(uint16
P_word)
//Channel Phase1 Offset Word (CPW0)
(0x05)<BR>{<BR> CLR_SDIO3;<BR> CLR_DDSCS;<BR> <BR> write_a_byte(0x05);<BR> write_a_byte(((unsigned
char
*)(&P_word))[1]&0x3F);<BR> write_a_byte((((unsigned
char
*)(&P_word))[0]));<BR> <BR> SET_DDSCS;<BR> SET_SDIO3;<BR>}</P>
<P>void write_ACR(uint32
A_word)<BR>{<BR> CLR_SDIO3;<BR> CLR_DDSCS;<BR> write_a_byte(0x06);<BR> <BR> write_a_byte(((unsigned
char *)(&A_word))[3]);<BR> write_a_byte(((unsigned
char *)(&A_word))[2]);<BR> write_a_byte(((unsigned
char
*)(&A_word))[1]);<BR> <BR> SET_DDSCS;<BR> SET_SDIO3;<BR>}</P>
<P>void write_LSR(uint8 rising,uint8
falling)<BR>{<BR> CLR_SDIO3;<BR> CLR_DDSCS;<BR> <BR> write_a_byte(0x07);<BR> write_a_byte(rising);<BR> write_a_byte(falling);<BR> <BR> SET_DDSCS;<BR> SET_SDIO3;<BR>}</P>
<P>void write_RDW(uint32
rising)<BR>{<BR> CLR_SDIO3;<BR> CLR_DDSCS;<BR> <BR> write_a_byte(0x08);<BR> write_a_byte(((unsigned
char *)(&rising))[3]);<BR> write_a_byte(((unsigned
char *)(&rising))[2]);<BR> write_a_byte(((unsigned
char *)(&rising))[1]);<BR> write_a_byte(((unsigned
char
*)(&rising))[0]);<BR> <BR> SET_DDSCS;<BR> SET_SDIO3;<BR>}</P>
<P>void write_FDW(uint32
falling)<BR>{<BR> CLR_SDIO3;<BR> CLR_DDSCS;<BR> <BR> write_a_byte(0x09);<BR> write_a_byte(((unsigned
char *)(&falling))[3]);<BR> write_a_byte(((unsigned
char *)(&falling))[2]);<BR> write_a_byte(((unsigned
char *)(&falling))[1]);<BR> write_a_byte(((unsigned
char
*)(&falling))[0]);<BR> <BR> SET_DDSCS;<BR> SET_SDIO3;<BR>}</P>
<P>void write_CTWn(uint8 n,uint32
w_data)<BR>{<BR> CLR_SDIO3;<BR> CLR_DDSCS;<BR> <BR> write_a_byte(n+0x09);
//CTWn's address is n+0x09.n>=1 and
n<=15.<BR> write_a_byte(((unsigned char
*)(&w_data))[3]);<BR> write_a_byte(((unsigned char
*)(&w_data))[2]);<BR> write_a_byte(((unsigned char
*)(&w_data))[1]);<BR> write_a_byte(((unsigned char
*)(&w_data))[0]);<BR> <BR> SET_DDSCS;<BR> 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> unsigned long
int temp;<BR> temp=(unsigned long
int)f*(0xFFFFFFFF/(float)systemp_frequency+1.0/systemp_frequency);<BR> write_CTW0(temp);<BR>}</P>
<P><BR>uint32 change(uint32 f)<BR>{<BR> unsigned long
int temp;<BR> temp=(unsigned long
int)f*(0xFFFFFFFF/(float)systemp_frequency+1.0/systemp_frequency);<BR> return
temp;<BR>}</P>
<P>void AD9959_init(void)<BR>{<BR> uint16
i;<BR> DDS_DDR =
0xff;<BR> CLR_DDSRESET;<BR> for(i=0;i<10000;i++);<BR> <BR> SET_DDSCS;<BR> CLR_DDSSCLK;<BR> SET_SDIO3;<BR> SET_DDSRESET;<BR> <BR> for(i=0;i<10000;i++);<BR> <BR> CLR_DDSRESET;<BR> for(i=0;i<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 + -