文件名称:AD9850产生信号程序
文件大小:4KB
文件格式:TXT
更新时间:2013-06-16 05:26:20
DDS
#include #include float l,m,n,q,z; double k; //-----------------------定义管脚-------------------------------------------------------- #define data_OUT P1 sbit FQ_UD=P3^0; //AD9850信号更新申请 sbit W_CLK=P3^1; sbit FESET="P3"^2; //写控制字时钟 unsigned char CON_word[5]; //Word data[7] data[6] data[5] data[4] data[3] data[2] data[1] data[0] //W0 Phase b Phase b3 Phase b2 Phase b1 Phase b0 Power Down Control Control //W1 Freq-b31 Freq-b30 Freq-b29 Freq-b28 Freq-b27 Freq-b26 Freq-b25 Freq-b24 //W2 Freq-b23 Freq-b22 Freq-b21 Freq-b20 Freq-b19 Freq-b18 Freq-b17 Freq-b16 //W3 Freq-b15 Freq-b14 Freq-b13 Freq-b12 Freq-b11 Freq-b10 Freq-b9 Freq-b8 //W4 Freq-b7 Freq-b6 Freq-b5 Freq-b4 Freq-b3 Freq-b2 //-------------------------------------------------------------------------------------------------- // 函数名称: delay // 入口参数: N // 函数功能:延时子程序,实现(16*N+24)us的延时 // 系统采用11.0592MHz的时钟时,延时满足要求,其它情况需要改动 //--------------------------------------------------------------------------------------------------