基于51单片机的波形发生器设计.doc
上传人:天马****23 上传时间:2024-09-12 格式:DOC 页数:182 大小:8.9MB 金币:10 举报 版权申诉
预览加载中,请您耐心等待几秒...

基于51单片机的波形发生器设计.doc

基于51单片机的波形发生器设计.doc

预览

免费试读已结束,剩余 172 页请下载文档后查看

10 金币

下载此文档

如果您无法下载资料,请参考说明:

1、部分资料下载需要金币,请确保您的账户上有足够的金币

2、已购买过的文档,再次下载不重复扣费

3、资料包下载后请先用软件解压,在使用对应软件打开

摘要河南科技大学本科毕业设计(论文)PAGEIV本科毕业设计论文基于51单片机的波形发生器设计摘要波形发生器作为信号源广泛应用于电子工业、自动控制和科学试验等领域。目前国内市场上波形发生器种类匮乏,价格昂贵。为了实验、研究以及工业需要,研制一种功能齐全、使用方便的波形发生器十分重要。本文介绍了两种基于89C51单片机和数模转换器DAC0832产生所需波形的波形发生器设计方案,两种方案各有特色,可以满足不同领域对波形发生器的需求。其中,程控波形发生器设计方案运用单片机执行程序产生波形数据,再由单片机通过定时器定时控制将波形数据送给DAC转换输出波形,本方案扩展有LED显示模块和键盘模块,具有良好的人机交互性。硬件波形发生器设计中,单片机执行程序产生波形数据或从上位机接受波形数据写入外部RAM中,然后由外部电路控制从RAM中取出波形数据送于DAC转换输出波形,本方案可以产生高频波,且具有良好的可升级性。本次设计的两种方案均能产生频率、幅值可调的正弦波、三角波、锯齿波和方波四种波形。本次设计运用Keilc软件采用C语言进行软件设计,使用仿真软件Proteus进行系统功能校验,并使用Protel软件制作印刷电路板(PCB)。本次设计的两种波形发生器具有精度高、误差小、功耗低、数据传输速度快、可靠性高等特点,且具有良好的经济性,具有一定的开发价值。关键词:波形发生器,单片机,DAC0832,程控波形发生器设计,硬件波形发生器设计THEDESIGNOFWAVEFORMGENERATORBASEDON51MCUABSTRACTWaveformgeneratorsarewidelyusedintheelectronicsindustry,automaticcontrolandscientificexperimentsandotherfields.Currently,waveformgenerators,indomesticmarket,areverylimit.Sothedevelopmentofawaveformgeneratorwhichisfullyfunctionalandeasytouseisveryimportantforexperimental,research,andindustrialneeds.Thisarticledescribestwoschemesofthedesignofwaveformgenerator(WG)basedon51MCUandDAC0832chip.Andthetwoschemeshavetheirownadvantagestomeetdifferentareas’need.Amongthem,intheschemeofprogrammableWGdesign,weusetheMCUtogeneratewaveformdata,andthenusethetimertimingtocontrolDACconverterwhichtranslatethewaveformdataintotheoutputwaveform.ThisschemeexpandedwithLEDdisplaymoduleandkeyboardmodule,whichhasagoodhuman-machineinteraction.InhardwareWGdesignscheme,weusetheMCUtogeneratewaveformdataoracceptthedatafromPC,andthentransferthisdatatoexternalRAM.Specially,weuseanexternalcircuittocontroltheDACconversion.Thisdesigncangeneratehigh-frequencywaves,anditalsohasgoodscalability.What’smore,thesetwoschemescanproducefourkindsofwaveforms(sine,triangle,sawtoothandsquarewave);theirfrequencyandamplitudecanadjustbyuser’sneed.Inthisdesign,weusetheKeilcsoftwareforsoftwaredesigninClanguage.AndthenweusethesimulationsoftwareProteustochecksystemfunctions,Finally,weuseProtelsoftwaretoproduceprintedcircuitboards(PCB).Thisde