信息自动化专业外文翻译.docx

上传人:b****1 文档编号:23195863 上传时间:2023-05-15 格式:DOCX 页数:16 大小:29.24KB
下载 相关 举报
信息自动化专业外文翻译.docx_第1页
第1页 / 共16页
信息自动化专业外文翻译.docx_第2页
第2页 / 共16页
信息自动化专业外文翻译.docx_第3页
第3页 / 共16页
信息自动化专业外文翻译.docx_第4页
第4页 / 共16页
信息自动化专业外文翻译.docx_第5页
第5页 / 共16页
点击查看更多>>
下载资源
资源描述

信息自动化专业外文翻译.docx

《信息自动化专业外文翻译.docx》由会员分享,可在线阅读,更多相关《信息自动化专业外文翻译.docx(16页珍藏版)》请在冰豆网上搜索。

信息自动化专业外文翻译.docx

信息自动化专业外文翻译

外文资料原文

Transmittingandreceivingserialdata

TheUniversalAsynchronousReceiver/Transmitter(UART)controlleristhekeycomponentoftheserialcommunicationssubsystemofacomputer.TheUARTtakesbytesofdataandtransmitstheindividualbitsinasequentialfashion.Atthedestination,asecondUARTre-assemblesthebitsintocompletebytes.Serialtransmissionofdigitalinformation(bits)throughasinglewireorothermediumismuchmorecosteffectivethanparalleltransmissionthroughmultiplewires.AUARTisusedtoconvertthetransmittedinformationbetweenitssequentialandparallelformateachendofthelink.EachUARTcontainsashiftregisterwhichisthefundamentalmethodofconversionbetweenserialandparallelforms.

TheUARTusuallydoesnotdirectlygenerateorreceivetheexternalsignalsusedbetweendifferentitemsofequipment.Typically,separateinterfacedevicesareusedtoconvertthelogiclevelsignalsoftheUARTtoandfromtheexternalsignalinglevels.

Externalsignalsmaybeofmanydifferentforms.ExamplesofstandardsforvoltagesignalingareRS-232,RS-422andRS-485fromtheEIA.Historically,thepresenceorabsenceofcurrent(incurrentloops)wasusedintelegraphcircuits.Somesignalingschemesdonotuseelectricalwires.Examplesofsuchareopticalfiber,IrDA(infrared),and(wireless)BluetoothinitsSerialPortProfile(SPP).Somesignalingschemesusemodulationofacarriersignal(withorwithoutwires).Examplesaremodulationofaudiosignalswithphonelinemodems,RFmodulationwithdataradios,andtheDC-LINforpowerlinecommunication.

Communicationmaybe"fullduplex"(bothsendandreceiveatthesametime)or"halfduplex"(devicestaketurnstransmittingandreceiving).

Asof2008,UARTsarecommonlyusedwithRS-232forembeddedsystemscommunications.ItisusefultocommunicatebetweenmicrocontrollersandalsowithPCs.ManychipsprovideUARTfunctionalityinsilicon,andlow-costchipsexisttoconvertlogiclevelsignals(suchasTTLvoltages)toRS-232levelsignals(forexample,Maxim'sMAX232).

Asynchronousreceiveandtransmit

Inasynchronoustransmitting,teletype-styleUARTssenda"start"bit,fiveto

eightdatabits,least-significant-bitfirst,anoptional"parity"bit,andthenone,oneandahalf,ortwo"stop"bits.Thestartbitistheoppositepolarityofthedata-line'sidlestate.Thestopbitisthedata-line'sidlestate,andprovidesadelaybeforethenextcharactercanstart.(Thisiscalledasynchronousstart-stoptransmission).Inmechanicalteletypes,the"stop"bitwasoftenstretchedtotwobittimestogivethemechanismmoretimetofinishprintingacharacter.Astretched"stop"bitalsohelpsresynchronization.

Theparitybitcaneithermakethenumberof"one"bitsbetweenanystart/stoppairodd,oreven,oritcanbeomitted.Oddparityismorereliablebecauseitassuresthattherewillalwaysbeatleastonedatatransition,andthispermitsmanyUARTstoresynchronize.

Insynchronoustransmission,theclockdataisrecoveredseparatelyfromthedatastreamandnostart/stopbitsareused.Thisimprovestheefficiencyoftransmissiononsuitablechannelssincemoreofthebitssentareusabledataandnotcharacterframing.Anasynchronoustransmissionsendsnocharactersovertheinterconnectionwhenthetransmittingdevicehasnothingtosend--onlyidlestopbits;butasynchronousinterfacemustsend"pad"characterstomaintainsynchronismbetweenthereceiverandtransmitter.TheusualfilleristheASCII"SYN"character.Thismaybedoneautomaticallybythetransmittingdevice.

USARTchipshavebothsynchronousandasynchronousmodes.

SerialtoParallelAlgorithm

Asynchronoustransmissionallowsdatatobetransmittedwithoutthesenderhavingtosendaclocksignaltothereceiver.Instead,thesenderandreceivermustagreeontimingparametersinadvanceandspecialbitsareaddedtoeachwordwhichareusedtosynchronizethesendingandreceivingunits.

WhenawordisgiventotheUARTforAsynchronoustransmissions,abitcalledthe"StartBit"isaddedtothebeginningofeachwordthatistobetransmitted.TheStartBitisusedtoalertthereceiverthatawordofdataisabouttobesent,andtoforcetheclockinthereceiverintosynchronizationwiththeclockinthetransmitter.Thesetwoclocksmustbeaccurateenoughtonothavethefrequencydriftbymorethan10%duringthetransmissionoftheremainingbitsintheword.(Thisrequirementwassetinthedaysofmechanicalteleprintersandiseasilymetbymodernelectronicequipment.)

AftertheStartBit,theindividualbitsofthewordofdataaresent,withtheLeastSignificantBit(LSB)beingsentfirst.Eachbitinthetransmissionistransmitted

forexactlythesameamountoftimeasalloftheotherbits,andthereceiver“looks”atthewireatapproximatelyhalfwaythroughtheperiodassignedtoeachbittodetermineifthebitisa1ora0.Forexample,ifittakestwosecondstosendeachbit,thereceiverwillexaminethesignaltodetermineifitisa1ora0afteronesecondhaspassed,thenitwillwaittwosecondsandthenexaminethevalueofthenextbit,andsoon.

Thesenderdoesnotknowwhenthereceiverhas“looked”atthevalueofthebit.Thesenderonlyknowswhentheclocksaystobegintransmittingthenextbitoftheword.

Whentheentiredatawordhasbeensent,thetransmittermayaddaParityBitthatthetransmittergenerates.TheParityBitmaybeusedbythereceivertoperformsimpleerrorchecking.ThenatleastoneStopBitissentbythetransmitter.

Whenthereceiverhasreceivedallofthebitsinthedataword,itmaycheckfortheParityBits(bothsenderandreceivermustagreeonwhetheraParityBitistobeused),andthenthereceiverlooksforaStopBit.IftheStopBitdoesnotappearwhenitissupposedto,theUARTconsiderstheentirewordtobegarbledandwillreportaFramingErrortothehostprocessorwhenthedatawordisread.TheusualcauseofaFramingErroristhatthesenderandreceiverclockswerenotrunningatthesamespeed,orthatthesignalwasinterrupted.

Regardlessofwhetherthedatawasreceivedcorrectlyornot,theUARTautomaticallydiscardstheStart,ParityandStopbits.Ifthesenderandreceiverareconfiguredidentically,thesebitsarenotpassedtothehost.Ifanotherwordisreadyfortransmission,theStartBitforthenewwordcanbesentassoonastheStopBitforthepreviouswordhasbeensent.Becauseasynchronousdatais“selfsynchronizing”,ifthereisnodatatotransmit,thetransmissionlinecanbeidle.Adatacommunicationpulsecanonlybeinoneoftwostatesbuttherearemanynamesforthetwostates.Whenon,circuitclosed,lowvoltage,currentflowing,oralogicalzero,thepulseissaidtobeinthe"space"condition.Whenoff,circuitopen,highvoltage,currentstopped,oralogicalone,thepulseissaidtobeinthe"mark"condition.Acharactercodebeginswiththedatacommunicationcircuitinthespacecondition.Ifthemarkconditionappears,alogicaloneisrecordedotherwisealogicalzero.

Figure1showsthisformat.

Thestartbitisalwaysa0(logiclow),whichisalsocalledaspace.ThestartbitsignalsthereceivingDTEthatacharactercodeiscoming.Thenextfivetoeightbits,dependingonthecodesetemployed,representthecharacter.IntheASCIIcodesettheeighthdatabitmaybeaparitybit.Thenextoneortwobitsarealwaysinthe

mark(logichigh,i.e.,'1')conditionandcalledthestopbit(s).Theyprovidea"rest"intervalforthereceivingDTEsothatitmayprepareforthenextcharacterwhichmaybeafterthestopbit(s).TherestintervalwasrequiredbymechanicalTeletypeswhichusedamotordrivencamshafttodecodeeachcharacter.Attheendofeachcharacterthemotorneededtimetostrikethecharacterbail(printthecharacter)andresetthecamshaft.

AlloperationsoftheUARThardwarearecontrolledbyaclocksignalwhichrunsatamultiple(say,16)ofthedatarate-eachdatabitisaslongas16clockpulses.Thereceiverteststhestateoftheincomingsignaloneachclockpulse,lookingforthebeginningofthestartbit.Iftheapparentstartbitlastsatleastone-halfofthebittime,itisvalidandsignalsthestartofanewcharacter.Ifnot,thespuriouspulseisignored.Afterwaitingafurtherbittime,thestateofthelineisagainsampledandtheresultinglevelclockedintoashiftregister.Aftertherequirednumberofbitperiodsforthecharacterlength(5to8bits,typically)haveelapsed,thecontentsoftheshiftregisterismadeavailable(inparallelfashion)tothereceivingsystem.TheUARTwillsetaflagindicatingnewdataisavailable,andmayalsogenerateaprocessorinterrupttorequestthatthehostprocessortransfersthereceiveddata.InsomecommontypesofUART,asmallfirst-in,first-out(FIFO)buffermemoryisinsertedbetweenthereceivershiftregisterandthehostsysteminterface.ThisallowsthehostprocessormoretimetohandleaninterruptfromtheUARTandpreventslossofreceiveddataathighrates.

Transmissionoperationissimplersinceitisunderthecontrolofthetransmittingsystem.Assoonasdataisdepositedintheshiftregister,theUARThardwaregeneratesastartbit,shiftstherequirednumberofdatabitsouttotheline,generatesandappendstheparitybit(ifused),andappendsthestopbits.SincetransmissionofasinglecharactermaytakealongtimerelativetoCPUspeeds,theUARTwillmaintainaflagshowingbusystatussothatthehostsystemdoesnotdepositanewcharacterfortransmissionuntilthepreviousonehasbeencompleted;thismayalsobedonewithaninterrupt.Sincefull-duplexoperationrequi

展开阅读全文
相关资源
猜你喜欢
相关搜索

当前位置:首页 > 医药卫生 > 基础医学

copyright@ 2008-2022 冰豆网网站版权所有

经营许可证编号:鄂ICP备2022015515号-1