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.

SIRA02DP-T1-GE3-VISHAY

Whentransistorisinusethetemperaturearounditshouldnotbeincreasedfrom+150andalwaysstoreintemperatureab

VS-8DKH02-M3/H-VISHAY

CR2032isacoincellbattery,alsoknownasalithiumenergizer,whichismainlyusedinhigh-powereddevicessuchashe

IPP057N08N3GXKSA1-Infeline

push({});WhereWeCanUseitHowtoUse:Thistransistorcanbeusedinawidevarietyofelectronicsapplicationsdueto

IRF3717TRPBF-Infeline

LM35isatypeofcommonlyusedtemperaturesensor,thatcanbeusedtomeasuretemperaturewithanelectricaloutputco

IRFH8324TRPBF-Infeline

Alwaysuseasuitablebaseresistoranddonotuseorstorethistransistorintemperaturebelow-55Celsiusandabove+1

SL44-E3/57T-VISHAY

andBD379BD135TransistorExplained/DescriptionBD135isoneofthetransistorsofthepopularBDseriesinwhichyou

IRF2807ZSTRLPBF-Infeline

SS9012Gis112~166andSS9012GHFEvalueis144~202.

VS-SD600R04PC-VISHAY

Itcanalsobeusedforswitchingpurposes.

VS-25RIA60-VISHAY

thecollector-emittervoltageofthetransistormustinunder40V

VS-P425-VISHAY

Otherthanthatitcanalsobeusedasaswitchanditcanhandlemaxloadof10mA.

Powered By Tkool Electronics

Copyright Your WebSite.sitemap