单片机设计简易正弦波发生器(single chip microcomputer design simple sine wave generator)

单片机设计简易正弦波发生器(single chip microcomputer design simple sine wave generator)

ID:12858809

大小:45.50 KB

页数:14页

时间:2018-07-19

单片机设计简易正弦波发生器(single chip microcomputer design simple sine wave generator)_第1页
单片机设计简易正弦波发生器(single chip microcomputer design simple sine wave generator)_第2页
单片机设计简易正弦波发生器(single chip microcomputer design simple sine wave generator)_第3页
单片机设计简易正弦波发生器(single chip microcomputer design simple sine wave generator)_第4页
单片机设计简易正弦波发生器(single chip microcomputer design simple sine wave generator)_第5页
资源描述:

《单片机设计简易正弦波发生器(single chip microcomputer design simple sine wave generator)》由会员上传分享,免费在线阅读,更多相关内容在教育资源-天天文库

1、单片机设计简易正弦波发生器(Singlechipmicrocomputerdesignsimplesinewavegenerator)Youknowtherestof>'sfulltextdataregister,andyoucandirectlyinterfacewiththemicrocomputerwithouttheextracircuit.Anothertypeofchipinternalnodataregister,theoutputsignalchangesoverthestateofdatainputline,soyoucan'tdirectly

2、withamicrocomputerinterface,mustthroughtheparallelinterfacewithmicrocomputerinterface.DAC0832isAdual-lineCMOSdevicewith20leads.IthasAtwo-stagedataregisterinside,whichcompletesthe8-bitcurrentD/Aconversion,sonoadditionalcircuitisrequired.0832isthecurrentoutputtype,shownontheoscilloscop

3、ewaveform,usuallyneedtovoltagesignal,currentsignaltovoltagesignalconversioncanberealizedbyoperationalamplifierLM358,withtwopiecesofLM358bipolaroutputisavailable.Singlechipsendsnumericcodingto0832,producingdifferentoutput.Samplingtheoremisusedtoanalysethevariouswaveformsamplingfirst,a

4、ndthenputthecodesamplesvalues,tothedigitalquantityineachwaveformlist,executeAprogramthroughthelook-uptablemethod,inturnafterD/Aconversionoutputwaveformcanbecalculatedout.IfNpointsconstituteaperiodofwaveform,then0832outputsNsamplepoints,andthesamplepointsformamotiontrajectory,namelyap

5、eriod.RepeattheNpointtobecomethesecondcycle.Thespeedoftheoutputcycleiscontrolledbythesinglechipmicrocomputer,whichcontrolsthefrequencyoftheoutputwaveform.Thiscontrolstheoutputwaveformanditsamplitudeandfrequency.Iv.SoftwaredesignBoththemainprogramandthesubroutinearestoredintheAT89S51s

6、inglechip.Isthefunctionofthemainprogram:bootaftercheckbutton,keyboardscanninganddisplaythejob,andthenaccordingtotheusersaccordingtothekeytothecorrespondingsubroutineforprocessing,themainprogramblockdiagramisshowninfigure1.Thefunctionsofasubroutineinclude:amplitudeinputprocessing,freq

7、uencyinputprocessing,sinewaveoutput,sawtoothwaveoutput,squarewaveoutput,display,etc.Here'stheprogramInclude#defineucharunsignedchar#defineuintunsignedintSbitLCP=P2^2;SbitSCP=P2^1;SbitSI=P2^0;SbitS1=P2^3;SbitS2=P2^4;SbitS3=P2^5;SbitS4=P2^6;SbitS5=P2^7;SbitDA0832=P3^3;SbitDA08

8、32_ON=P3^2;U

当前文档最多预览五页,下载文档查看全文

此文档下载收益归作者所有

当前文档最多预览五页,下载文档查看全文
温馨提示:
1. 部分包含数学公式或PPT动画的文件,查看预览时可能会显示错乱或异常,文件下载后无此问题,请放心下载。
2. 本文档由用户上传,版权归属用户,天天文库负责整理代发布。如果您对本文档版权有争议请及时联系客服。
3. 下载前请仔细阅读文档内容,确认文档内容符合您的需求后进行下载,若出现内容与标题不符可向本站投诉处理。
4. 下载文档时可能由于网络波动等原因无法下载或下载错误,付费完成后未能成功下载的用户请联系客服处理。