第七届高等电子设计大赛题目:信号发生器小组成员:王彬宇应用物理专业201105080107寿耘信息工程专业201113010730徐婷婷信息工程专业201113010828二O一四年五月摘要本次设计是关于直接数字频率合成技术(DDS)的信号发生器的设计与实现。设计以DDS芯片AD9833为频率合成器,以单片机STC89C52为进程控制和任务调度中心,并采用数模转换器TLC5615和模拟乘法器AD633组成幅值调节电路,实现幅值连续可调的波形发生器的设计方案。且用LCD1602液晶显示及键盘构成人机交互模块,可通过按键切换输出的波形,使之输出不同频率和幅值的正弦波三角波和方波。该信号发生器输出的信号频率范围为100HZ~100KHZ,幅值可以在0V~5V内进行步进调节。测试表明该DDS信号发生器具有工作稳定,精度高,失真度小,控制灵活的优点,具有广泛的应用前景。ABSTRACTThisdesignisthedesignandimplementationonthedirectdigitalfrequencysynthesis(DDS)signalgenerator.AD9833DDSchipdesignfrequencysynthesizer,amicrocontrollerSTC89C52forprocesscontrolandmissioncontrolcenter,andtheuseofdigital-analogmultiplierAD633TLC5615andcompositionoftheamplitudeadjustmentcircuit,continuouslyadjustableamplitudewaveformgeneratordesign.AndaliquidcrystaldisplayandakeyboardconstitutingLCD1602HCImodule,throughthekeyswitchoutputwaveform,sothattheoutputsinewaveofvaryingfrequencyandamplitudeofthetriangularwaveandsquarewave.Signalfrequencyrangeofthesignalgeneratoroutputto100HZ~100KHZ,steppingamplitudecanbeadjustedwithinthe0V~5V.TestsshowthattheDDSsignalgeneratorwithjobstability,highaccuracy,lowdistortion,controlledflexiblebenefits,hasbroadapplicationprospects.目录1设计要求.....................................................................................................................11.1任务..........................................................................................................................11.2要求..........................................................................................................................11.2.1基本要求...............................................................................................................11.2.2发挥部分...............................................................................................................12系统方案设计与论证.................................................................................................12.1频率合成器的方案论证与选择..............................................................................12.2主控芯片的方案论证与选择..................................................................................22.3显示模块的方案论证与选择..................................................................................22.4系统总体构框图......................................................................................................23原理分析与系统硬件设计.........................................................................................33.1STC89C52单片机最小系统...................................................................................33.1.1键盘接口设计.......................................................................................................33.1.2LCD1602接口设计..............................................................................................43.2基于DDS的信号发生电路设计............................................................................53.2.1AD9833简介及与单片机接口.............................................................................53.2.2AD9833的外围电路设计.....................................................................................63.2.3基于AD633、TLC5615、OP37的幅度调节模块设计.....................................73.3电源设计................................................................................................................114软件设计...................................................................................................................124.1总体方案................................................................................................................124.2程序流图................................................................................................................134.3各模块说明............................................................................................................145系统测试...................................................................................................................295.1测试结果................................................................................................................295.2系统所达技术指标................................................................................................316结论...........................................................................................................................31致谢..............................................................................................................................32参考文献......................................................................................................................33附件..............................................................................................................................34第1页1.设计要求1.1任务设计并制作一台信号发生器,分别能够产生正弦波、方波和三角波。1.2要求1.2.1基本要求(1)信号发生器能够产生正弦波、方波和三角波三种周期性波;(2)输出频率要求在100hz~100khz内可调;(3)在1000Ώ负载条件下,输出正弦波信号的电压峰峰值VOPP在0~5V内可调;(4)输出信号波形无明显失真;(5)自制稳压电源;1.2.2发挥部分(1)在50Ώ负载条件下输出正弦波信号的电压峰峰值VOPP在0~5V范围内可调,调节的步进间隔为0.1V,输出信号的电压值可通过键盘进行设置;(2)可实时显示输出信号的类型、幅度、频率和电压步进值;2.系统方案设计与论证2.1频率合成器的方案论证与选择方案一:采用模拟分立元件可产生正弦波、方波和三角波,通过调整外部分立元件可改变输出频率,但采用模拟器件外接的电阻电容对参数影响很大,因而产生的频率稳定度较差,精度低,抗干扰能力差,而且灵活性较差,不能实现波形高精度分辨率以及波形运算输出等智