Tkool Electronics

I.DescriptionTheroleofanalog-to-digitalconversion(AD)istoconvertcontinuousanalogquantitiesintodiscretedigitalquantitiesthroughsampling.Itiswidelyusedincircuitdesign,suchasthedigitizationofanalogquantitiessuchasimage,voltage,andcurrent.ThefunctionoftheADchipistocompletetheanalog-to-digitalconversionfunction.TherearemanykindsofADchips.ThisarticletakesADC0804asanexampletoelaborateonthesoftwareandhardwaredesignmethodsoftheADconversioncircuit.CatalogI.DescriptionII.ADC0804IntroductionIII.CircuitConnectionDiagramIV.ADC08904TimingAnalysis4.1ADC08904StartConversionTimingAnalysis4.2ADC0804ReadDataTimingAnalysisV.ADC0804Analog-to-digitalConversionTestProgramVI.ConclusionFAQOrdering&QuantityII.ADC0804IntroductionADC0804isastep-by-stepcomparisonADconverter,usingCMOSmanufacturingprocess,20pins,8-bitresolution,theinputanalogvoltagerangeis0-5V,andthetypicalconversiontimeis100us.Thechipcontainsathree-statedataoutputlatch,whichcanbedirectlyhungonthedatabusofthemicrocontroller.III.CircuitConnectionDiagramFigure1CircuitconnectiondiagramThecircuitconnectiondiagramisshowninFigure1above,whichmainlyincludesAT89S52single-chipmicrocomputer,ADC0804and8light-emittingdiodes.The31-pinoftheone-chipcomputerisconnectedtohighlevel,thepurposeistomaketheone-chipcomputerstarttoexecutetheprogramfromtheinternalROMafterpower-on.ThefollowingfocusesontheperipheralcircuitdesignoftheADC0804chipandtheconnectionbetweenthecorrespondingpinsandthemicrocontroller.The20thpinofADC0804isconnectedto5Vforpoweringitself,andpin0isthepowerground.Pins11-18aretheconverteddigitalsignaloutputterminals,whicharerespectivelyconnectedtoP1.7-P1.0ofthesingle-chipmicrocomputerandconnectedtotheanodesof8light-emittingdiodes(LED1-LED8).Thefunctionofconnectingthelight-emittingdiodeistointuitivelytestthecorrectnessofthecircuitdesignandprogrammingbyobservingthechangeofitson-offstate.Thedetailswillbegivenlater.Pin1CSisthechipselectionterminal,connectedtopinP3.5ofthemicrocontroller,andthelowlevelisactive.OnceCSisactive,ADC0804isreadytostartworkingimmediately.Pin2RDisthereadsignalinputterminal,connectedtopinP3.7ofthesingle-chipmicrocomputer,lowleveliseffective.3pinWRisthewritesignalinputterminal,connectedtothesingle-chipP3.6pin,thelowlevelisvalid,andtheWRisvalid,theADconversionisstartedimmediately.The19-pinCLKRistheexternalresistanceendoftheinternalclockgenerator.TheRCoscillatorcircuitisformedbya10Kresistoranda150pfcapacitor.Theoscillationsignaloutputbytheoscillatorcircuitisconnectedtothe4-pinCLKINastheclockpulseofADC0804.Thepulsefrequencyis1/(1.1R*C),ifthecapacitorisselectedtoomuch,theconversionratewillbeaffected.Pin5INTRistheinterruptsignaloutputterminal.Whenitoutputsalowlevel,itindicatestheendofanADconversionandpromptsthecontrollertodothecorrespondingprocessing.Thisarticledoesnotusetheinterruptmode,sothepinisleftfloating.6-pinVIN+and7-pinVIN-formapairofanalogdifferentialsignalinputterminals.Amongthem,pin6VIN+isconnectedtoanadjustableresistorthrougha10Kcurrentlimitingresistor.Byadjustingthesizeoftheadjustableresistor,avoltagebetween0-5Vcanbeobtained.Sincepin7VIN-isgrounded,thevoltageisItistheanaloginputvoltageofADC0804.ThetaskofADC0804istoconverttheanalogvoltageintoan8-bitdigitalquantity,therangeis0x00-0xFF.Pin9VREF/2isthereferencevoltageinputterminal.Thereferencevoltageis2.5V,whichisobtainedbydividingthe5Vvoltagethroughtwo1Kresistors.IV.ADC08904TimingAnalysis4.1ADC08904StartConversionTimingAnalysisFigure2ADC08904startconversiontimingdiagramAccordingtotheADC0804startconversiontimingdiagram(Figure2),itcanbeseenthattheADC0804startstheconversionthroughthefollowingseriesofprocesses:first,clearCS,thatis,changeCStolowlevel,afteraslightdelay,changeWRfromhighleveltolowlevel,andthenchangeWRtohighlevelafteraslightdelay,andtheADconversionisofficiallystarted.After1-8ADconversiontimeperiods,theanalog-to-digitalconversioniscompleted,andtheconversionresultisautomaticallystoredintheinternallatch.Atthesametime,theINTRinterruptoutputterminalbecomeslowleveltoinformtheMCUofthisADconversionjunction,andtheMCUthentakesoutthedatabyreadingforsubsequentprocessing.4.2ADC0804ReadDataTimingAnalysisFigure3ADC0804readdatatimingdiagramAccordingtotheADC0804readdatatimingdiagram(Figure3),itcanbeseenthattheADC0804readdataoperationneedstogothroughthefollowingseriesofprocesses:firstclearCS,thatis,CSbecomeslow,andafteraslightdelay,RDchangesfromhightohighLowlevel,afterTacctime,thedataonthedigitalsignaloutputterminal(digitalsignalafterA/Dconversion)canbestabilized.Atthistime,themicrocontrollercanreadthedataonthedigitalsignaloutputterminal,andthenpullRDtoahighlevel.V.ADC0804Analog-to-digitalConversionTestProgramThisarticlewritesacompleteADC0804analog-to-digitalconversiontestprogram,asshownbelow,andgivestheprogramfunctioncommentslinebyline.TheprogramiswrittenstrictlyinaccordancewiththeADC0804start-upconversiontimingandreaddatatiming.ItsfunctionistoobtaindifferentvoltagesbyadjustingtheadjustableresistorR2inFigure1.ThisvoltageisusedastheanaloginputofADC0804,whichisconvertedto8-bitdigitalquantitybyADC0804,anddrives8-bitlight-emittingdiodesrespectively.Differentvoltagesareconvertedintodifferentdigitalquantities,sothatthebrightnessofthe8-bitLEDisdifferent.Observingthisphenomenonindicatesthatthedesignoftheanalog-to-digitalconversioncircuitinthisarticleiscorrect.VI.ConclusionInthispaper,8051single-chipmicrocomputerisusedasthecontroller,theADC0804-basedanalog-to-digitalconversioncircuitisdesigned,theworkingprincipleofADC0804isdiscussed,andacompletetestprogramisgivenandannotated.Throughtesting,thecircuitcanworknormally,layingagoodfoundationforfurtherresearchinthefieldofcircuitdesigninthefuture.FAQWhatisadc0804?TheADC0804isacommonlyusedADCmodule,forprojectswereanexternalADCisrequired.Itisa20-pinSinglechannel8-bitADCmodule.MeaningitcanmeasureoneADCvaluefrom0Vto5Vandtheprecisionwhenvoltagereference(Vrefpin9)is+5Vis19.53mV(Stepsize).Whatisthedifferencebetweenadc0804andmax1112?ADC0804isusedforparallelADCandMAX1112isusedforserialADC.Whichpinoftheadc0804indicatesendofconversion?PIN-5Interrupt(INTR)ThispinautomaticallygoeslowwhenconversionisdonebyADC0804orwhendigitalequivalentofanaloginputisready.PIN-6Vin(+)connectinputanalogsensorpin/inputvoltagetothispin.WhatisADCandDAC?ADCstandsforAnalogtoDigitalConverter,whichconvertstheanalogsignalintothedigitalsignal.DACstandsforDigitaltoAnalogConverteranditconvertstheDigitalsignalintoananalogsignal.Whatistheresolutionof8bitADC?Forexample,anADCwitharesolutionof8bitscanencodeananaloginputtoonein256differentlevels(28=256).Thevaluescanrepresenttherangesfrom0to255(i.e.asunsignedintegers)orfrom128to127(i.e.assignedinteger),dependingontheapplication.

CDC3RL02

IDescriptionThisblogintroducestheworkingprincipleoftheL298-baseddirectPWMspeedcontrolsystem.Atthesam

74AVC1T45

I.IntroductiontoGalvanometerThegalvanometerisanimportanttestinginstrument.Itisahigh-sensitivitymecha

TISR51

IntroductionLM3886isahigh-performanceaudiopoweramplifier.ItexhibitsextremelylowTHD+Nvaluesof0.03%att

14HEX

IIntroductionWhentestingenvironmentalprotection,safety,andeconomicindicatorssuchasnoise,acceleration

TPS22966

I.IntroductionThe74HC595isan8-bitserial-inorparallel-outshiftregisterwithastorageregisterand3-stateo

ADS5474

IDescriptionThisbloghasdesignedastep-downDCswitchingpowersupply(itsvoltagecanbeadjustedfrom0V)forneu

AC240

IDescriptionFirst,thisblogwillintroducethe1wiredigitaltemperaturesensorDS18B20.Wemainlyintroduceitss

2BMII

IDescriptionTheinstrumentationamplifiercircuithasthefollowingfeatures:HighInputImpedance;HighCommon-

AA2196

I.IntroductionTheheartrateisakeyindicatorvaluereflectingthehealthofthebody.Simplyput,theheartrateref

IT2917

DescriptionLM317isaadjustable3-terminalpositive-voltageregulator,thisbolgcoversLM317regulatoralterna

Powered By Tkool Electronics

Copyright Your WebSite.sitemap