13楼
编程示例。。。不过图不错啊大体也看明白了,我来发一个之前用过的AD9850的程序
Send_Control_Word_9850(luint ConTrol_Word)
{luint ConTrol_Word_Temporary ;
uchar data_word ;
w_clk_9850 = 0x00;
fqud_9850 = 0x00;
data_word = 0x00;
dataport_9850 = data_word;
w_clk_9850=1;
w_clk_9850=0;
ConTrol_Word_Temporary = ConTrol_Word;
ConTrol_Word = ConTrol_Word >> 24;
data_word = ConTrol_Word % 256;
dataport_9850 = data_word;
w_clk_9850=1;
w_clk_9850=0;
ConTrol_Word = ConTrol_Word_Temporary;
ConTrol_Word = ConTrol_Word >> 16;
data_word = ConTrol_Word % 256;
dataport_9850 = data_word;
w_clk_9850=1;
w_clk_9850=0;
ConTrol_Word = ConTrol_Word_Temporary;
ConTrol_Word = ConTrol_Word >> 8;
data_word = ConTrol_Word % 256;
dataport_9850 = data_word;
w_clk_9850=1;
w_clk_9850=0;
ConTrol_Word = ConTrol_Word_Temporary;
data_word = ConTrol_Word % 256;
dataport_9850 = data_word;
w_clk_9850=1;
w_clk_9850=0;
fqud_9850=1;
}
Calculate_Control_Word_9850(luint Frequency_Out_9850)
{
Con_Word_1_9850 = Frequency_Out_9850 * 42;
Con_Word_2_9850 = Frequency_Out_9850 *0.94967296;
Con_Word_2_9850 = Con_Word_2_9850 + 0.5;
Con_Word_1_9850 = Con_Word_1_9850 + Con_Word_2_9850;
ConTrol_Word_9850 = Con_Word_1_9850 / 1;
}
init_9850()
{ reset_9850 = 1;
delay_9850(10000);
reset_9850 = 0;
}
Write_9850()
{
init_9850();
Calculate_Control_Word_9850(Frequency_Out_9850);
delay_9850(10000);
Send_Control_Word_9850(ConTrol_Word_9850);
}
回复
有奖活动 | |
---|---|
【有奖活动】分享技术经验,兑换京东卡 | |
话不多说,快进群! | |
请大声喊出:我要开发板! | |
【有奖活动】EEPW网站征稿正在进行时,欢迎踊跃投稿啦 | |
奖!发布技术笔记,技术评测贴换取您心仪的礼品 | |
打赏了!打赏了!打赏了! |
打赏帖 | |
---|---|
vscode+cmake搭建雅特力AT32L021开发环境被打赏30分 | |
【换取逻辑分析仪】自制底板并驱动ArduinoNanoRP2040ConnectLCD扩展板被打赏47分 | |
【分享评测,赢取加热台】RISC-V GCC 内嵌汇编使用被打赏38分 | |
【换取逻辑分析仪】-基于ADI单片机MAX78000的简易MP3音乐播放器被打赏48分 | |
我想要一部加热台+树莓派PICO驱动AHT10被打赏38分 | |
【换取逻辑分析仪】-硬件SPI驱动OLED屏幕被打赏36分 | |
换逻辑分析仪+上下拉与多路选择器被打赏29分 | |
Let'sdo第3期任务合集被打赏50分 | |
换逻辑分析仪+Verilog三态门被打赏27分 | |
换逻辑分析仪+Verilog多输出门被打赏24分 |