通用异步接收发送器外文翻译文档格式.docx
- 文档编号:20594344
- 上传时间:2023-01-24
- 格式:DOCX
- 页数:12
- 大小:29.08KB
通用异步接收发送器外文翻译文档格式.docx
《通用异步接收发送器外文翻译文档格式.docx》由会员分享,可在线阅读,更多相关《通用异步接收发送器外文翻译文档格式.docx(12页珍藏版)》请在冰豆网上搜索。
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"
bitwasoftenstretchedtotwobittimestogivethemechanismmoretimetofinishprintingacharacter.Astretched"
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-duplexoperationre
- 配套讲稿:
如PPT文件的首页显示word图标,表示该PPT已包含配套word讲稿。双击word图标可打开word文档。
- 特殊限制:
部分文档作品中含有的国旗、国徽等图片,仅作为作品整体效果示例展示,禁止商用。设计者仅对作品中独创性部分享有著作权。
- 关 键 词:
- 通用 异步 接收 发送 外文 翻译