单片机信号发生器中英文对照外文翻译文献.docx
《单片机信号发生器中英文对照外文翻译文献.docx》由会员分享,可在线阅读,更多相关《单片机信号发生器中英文对照外文翻译文献.docx(15页珍藏版)》请在冰豆网上搜索。
![单片机信号发生器中英文对照外文翻译文献.docx](https://file1.bdocx.com/fileroot1/2022-12/7/ee00c880-cb34-4177-b21c-9d799977de0c/ee00c880-cb34-4177-b21c-9d799977de0c1.gif)
单片机信号发生器中英文对照外文翻译文献
中英文资料翻译
DesignofDigitalControlledSignalGeneratorBasedonDDSandMCU
Keywords:
DDS;MCU;Signalgenerator;PhaseAccumulator;DAC
Abstract.ItsadvantagetouseDDSchipisoutputsignalfrequencybigger,andprecisionhigher,Butuserscan'tchangetheoutputsignalwaveforms.TheMCUcanproducetherequiredarbitrary
waveforms,butitsprogramexecutionoftheorderlimitthespeed.SoweusetheirSynergytodesignthedigitalcontrolledsignalgenerator.TheSystemhastheadvantageofoutputgoodqualitywaveform,frequencyofprecisionandstability,andhighfrequency,empty,amplitudeandphaseistostepintotheneed.
Introduction
Thedigitallysynthesizedsinewaveform(DirectDigitalSynthesis,DDS)isawell-knownmethodandhasbeenappliedtomanyembeddedapplications[1].Thistechniquecanbeusedtocreateapositivedigitalsinewaveform.Comparedtootherfrequencycomposingmethod,DirectDigitalFrequencySynthesis(DDS)hasbeenthemostpopulartrendinmodernfrequencysynthetictechniqueforitsexcellentcharacteristics.ThesignalsourcethattheDDStechnologyrealizescancarryoutaccuratecontrollingonDDSfrequency,extent,phaseexportingwaveform'setc.bynumericalcontrolcircuit,thesystemmakinguseofthismethodhasmanymeritssuchasstability,reliablyandaccuracy.
ThecommercialDDSchipcanonlyexportasinewaveforthedataintheROMformalreadyhasbeensolidified.Ifneedingtocomeintobeinganywaveform,itmaycometruebythewaythatFPGAadoptsDDSIPcoreorhardwaredescribelanguageetc,however,thecostofThiswaycostishigh;ontheotherhand,anywaveformcanbeachievedbymakinguseofmicrocontrollerunit(MCU)tocarryoutfigurefrequencycombiningandDAconverting.TheexperimentandapplyingtestinghaveshownthatthenumericalcontrolsignalsourcecomposedofSTM32microcontrollerandDDSchipcanworkwell.
DDSandwaveformprogrammingpattern
ThecoreofDDSsystemisphaseaccumulatorcarriage,anditiscomposedofaADRandoneunitphaseregister.Whenanyclockcomes,thephaseregisterincreasesbywiththesteplength,phaseregisteroutputandphasecontrolwordaddtogether,andthentheoutputisimportedtosineinquiryformaddress.
Thesineinquiringformincludesthenumeralextentinformationofone-periodsinewave,each
addresscorrespondstothephasedotof0~360degreesofthesinewave.ThemappingdigitalsignaldrivesDACandoutputsanalogvalue.Theoutputsinecircleandfrequencyare
Thephaseregisterwillreturntotheoriginalstatewhenthe2N/Mfcclockisfinished.Accordingly,theDDSsystemoutputasinewavewhenthesineinquiringformfinishacircle.TheoutputsinecircleandfrequencyisTO--outputsinewavecircle,unit:
s;TC--externalreferencedclockcircle,unit:
s;M--accumulatedsteplengthofphaseregister,constant;fout--outputsinewavefrequency,unit:
Hz;fc--externalreferencedclockfrequency,unit:
Hz;N--phaseaccumulatordigit,constant.
Therelationshipamongthefrequencycontrolword,andtheoutputsignalfrequencyandthe
referencedclockfrequencyare:
Frequencycontrolwordisdirectlyproportionaltotheoutputsignalfrequency.Inordertodescribeclearly,thesinewaveformisasonevectorturnsaroundphasecircle,thephasecirclematchesalongwithacyclesinewave.Everysamplingpotsinwaveformcorrespondstoaphasedotofthephasecircle.
Tosynthesistherequiredfrequencysignal,itneedstoaccomplishthefollowingsteps
1.Controllingeverysamplingincrementofphaseandaccumulatingthem(frequencycontrolwordK),output2picumulatedphase(usingphaseaccumulator).
2.Converting2piaccumulatingphaseintothecorrespondingsineamplitude,useROMtostorethecorrespondingphase-extentformofsinefunctioningeneral.
3.UseDACtochangeextentcodeintothesignalsimulatingvoltage.
4.ThevoltagesignalthatDACexportsisladderwaveform,therequiredsimulationvoltageoutisachievedafterLPFsmoothing.
NumericalcontrolDDSsignalsourcesystemdesignsanalysis
SystemusestheSTM32ascontrolcoreandtheAD9850asgenerator.STM32is32-bitARM-basedmicrocontrollerwith128Kbyteflashmemory.
ThetwosignaloutputofSTM32canbeachievedbycontrollingAD9850andDAC0832outputsimultaneously.ThesystemdesignsblockdiagramisshowninFig.1.Onesignaloutputcangenerate30MHzsinewaveandrectangularwavebycontrollingAD9850,theotheroutputgenerateanywaveformwithitsfrequencylessthan10KHzbynumericalfrequencymixtureofDAC0832.
Fig.1Systemdesignsblockdiagram
Hardwaredesign
AD9850module
AD9850containstheDDSsystemandhigh-speedcomparator.TheAD9850canrealizetheentirenumericalfrequencycombining.ThecoreoftheprogrammableDDSisthephaseaccumulator,itiscomposedofaADRandaNbitphaseregister,Nisfor24~32.
Afterconnectingtotheaccurateclocksourceandwritingthefrequencyphasecontrolword,
AD9850cangeneratethefrequency-programmableandphase-programmableoutputofanalogsinewave,whichcanbeusedasthedirectfrequencysignalsourceorbetransferredintorectangularwavethroughhigh-speedcomparator.
Withthe125MHzclock,32-bitfrequencycontrolwordcancarryouttheoutputfrequency
resolutionratioofAD9850with0.0291Hz[4].
DAC0832module
ThecircuitexportsthephasedatasheettoDAC0832fromSTM32andgetscorrespondingwaveformbyDAconverting.Thestep-by-stepadjustingphaseamountscancreatearbitraryfrequency,thePWMsignalfromtheSTM32transfersintothecorrespondingvoltagebylow-passfilter,therefore,thereferencedvoltageofDAC0832iscontrolled,furthermore,theoutputwaveformextentistunedappropriately.ThedigitaltoanalogconversioncircuitisshowninFig.2
Fig.2DACcircuit
PWMconvertingDAcircuit
Thelow-passfilteredPWMsignalfromSTM32isthenstableusingthevoltagefollower,whichwillyieldastableoutputvoltage;thevoltagecanbeadjustedbytuningthePWMdutyfactor.ThesystemoutputthreePWMsignals,whichcontrolsAD9850outputextent,dutyfactorandtheoutputextentofDAC0832,respectively,.Fig.3showsthePWMcontrolsDAtransferringcircuit.
Fig.3PWMcontrolledDAconvertingcircuit
Fig.4Exportamplificationandthewavefilteringcircuit.(a)amplificationcircuit;(b)filtering
circuit
Amplificationandwavefilteringcircuit
Theamplificationcircuitwillexportamplifiedwaveformandmodifythefactorofamplification.Anexcellentsmoothoutputwaveformcanbeachievedbyusingthelow-passactivepowerfiltering.TheamplificationcircuitandthefilteringcircuitisshowedinFig.4.
Softwaredesign
AndthesystemsoftwaremainlyincludeAD9850drivingmodule,DAC0832drivingmodule,thestep-by-stepautomationmodule,PWM-converting-DAmoduleanduC/GUIfiguresupporting
systemimplantedinprocedure.Theoperationinterfaceisfullofhumanizationforthemulti-windowpatternisadopted.ThedesignprocessofthesystemsoftwareisshowninFig.5.
ImplanteduC/GUI
ThenumericalcontrolsignalsourcehasusedtheuC/GUIsoftwaresufficientlytoestablishmanywindowsandcontrolbuttons.Bymeansofinvokingthecorrespondingwindowsandcontrolwiththefeedbackinformation,theperipheralequipmentoperatedunderthecontrolofthesystem.
Theexternalequipmentismainlyseparatedintotwodrivers,thedrivebeinganAD9850moduleandDAC0832moduledrive,respectively.Thetwomodulescanbecontrolledbymeansoftheoutsideinterruptionandtiminginterruption.
AD9850Drive
AD9850has40controlwords,amongthem,32-bitisusedforfrequencycontrol,5-bitisusedforthephasecontrol,1-bitisusedforthepowersourcedormancycontrol,2-bitisusedtochooseoperationpattern.
Fig.5Systematicprocedureflowchart
This40controlwordsmayarriveatAD9850byconcurrencewayorserialway,intheconcurrenceway,8datahighwaygeneralscantransferthedatatoaregister.
Afterrepeating5times,the40-bitdataisloadedintothefrequency/phasedataregister(forrefreshingDDSoutputfrequencyandphase)attheFQ-UDrisingedge,meanwhile,theaddresspointerisresettothefirstinputregister
Thenthe8-bitdataisloadedattheW-CLKrisingedge,andthepointerissettothenextinputregister.Afterrepeating5timesofW-CLKrisingedge,theW-CLKrisingedgewillworknolongeruntiltheresetsignalcomesortheaddresspointerisresettothefirstinputregisterbytheFQ-UDrisingedge.
TheprocedureoperateAD9850modulethroughthebottomfunction,as
voidad9850(
doublefrequency,//frequency
unsignedcharphase,//phase
unsignedcharmode,//pattern
unsignedcharpower//source
)
TheDAC0832drivenmodule
Inthedesignofthenumericalcontrolsignalsource,DAC0832isdefinedassinglebuffered
pattern,whenthe8bitParalleldataD0~D7isinput,theDAwilltransferdataintheCS.
ThebottomfunctionofvoidDA0832(u8value)caninvokeOut_To_DDS0832(double
Frequency,u8type)functionandcontrolthedefinedwaveformandfrequency.
Thisfunctionisbasedonfigurefrequencycomposesprinciple,ittransferstheinputfrequencyintocorrespondingcontrolword,andthencombingphasestep-by-stepexpect,outputwaveformdatasheetinmemory.
TheextentanddutyfactorcanbetunedthroughinvokingAdjust_Vpp()andAdjustDuty()
Step-by-stepautomationprocedure
Astep-by-stepautomationprocedurebrickisaddedtothedesigntodefinethefrequencyrange,step-by-steprate,step-by-stepamounts,ascendingorlapse,cyclingpattern.
Thestep-by-stepautomationfunctioncanberealizedthroughinvokingAutoStep(AutoStepStr*AS)andpassingmemorystructuretypetoafunction.
Testtheexperimentanddataan