已阅读5页,还剩13页未读, 继续免费阅读
版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领
文档简介
RS-422andRS-485applicationnoteChapter1:OverviewIntroductionThepurposeofthisapplicationnoteistodescribethemainelementsofanRS-422andRS-485system.Thisapplicationnoteattemptstocoverenoughtechnicaldetailssothatthesystemdesignerwillhaveconsideredalltheimportantaspectsinhisdatasystemdesign.SincebothRS-422andRS-485aredatatransmissionsystemsthatusebalanceddifferentialsignals,itisappropriatetodiscussbothsystemsinthesameapplicationnote.ThroughoutthisapplicationnotethegenerictermsofRS-422andRS-485willbeusedtorepresenttheEIA/TIA-422andEIA/TIA-485Standards.DataTransmissionSignalsUnbalancedLineDriversEachsignalthattransmitsinanRS-232unbalanceddatatransmissionsystemappearsontheinterfaceconnectorasavoltagewithreferencetoasignalground.Forexample,thetransmitteddata(TD)fromaDTEdeviceappearsonpin2withrespecttopin7(signalground)onaDB-25connector.Thisvoltagewillbenegativeifthelineisidleandalternatebetweenthatnegativelevelandapositivelevelwhendataissentwithamagnitudeof5to15volts.TheRS-232receivertypicallyoperateswithinthevoltagerangeof+3to+12and-3to-12voltsasshowninFigure1.1.BalancedLineDriversInabalanceddifferentialsystemthevoltageproducedbythedriverappearsacrossapairofsignallinesthattransmitonlyonesignal.Figure1.2showsaschematicsymbolforabalancedlinedriverandthevoltagesthatexist.Abalancedlinedriverwillproduceavoltagefrom2to6voltsacrossitsAandBoutputterminalsandwillhaveasignalground(C)connection.Althoughproperconnectiontothesignalgroundisimportant,itisntusedbyabalancedlinereceiverindeterminingthelogicstateofthedataline.Abalancedlinedrivercanalsohaveaninputsignalcalledan“Enable”signal.Thepurposeofthissignalistoconnectthedrivertoitsoutputterminals,AandB.Ifthe“Enable”signalisOFF,onecanconsiderthedriverasdisconnectedfromthetransmissionline.AnRS-485drivermusthavethe“Enable”controlsignal.AnRS-422drivermayhavethissignal,butitisnotalwaysrequired.Thedisconnectedordisabledconditionofthelinedriverusuallyisreferredtoasthe“tristate1”conditionofthedriver.1Theterm“tristate”comesfromthefactthatthereisathirdoutputstateofanRS-485driver,inadditiontotheoutputstatesof“1”and“0.”BalancedLineReceiversAbalanceddifferentiallinereceiversensesthevoltagestateofthetransmissionlineacrosstwosignalinputlines,AandB.Itwillalsohaveasignalground(C)thatisnecessaryinmakingtheproperinterfaceconnection.Figure1.3isaschematicsymbolforabalanceddifferentiallinereceiver.Figure1.3alsoshowsthevoltagesthatareimportanttothebalancedlinereceiver.IfthedifferentialinputvoltageVabisgreaterthan+200mVthereceiverwillhaveaspecificlogicstateonitsoutputterminal.Iftheinputvoltageisreversedtolessthan-200mVthereceiverwillcreatetheoppositelogicstateonitsoutputterminal.TheinputvoltagesthatabalancedlinereceivermustsenseareshowninFigure1.3.The200mVto6Vrangeisrequiredtoallowforattenuationonthetransmissionline.EIAStandardRS-422DataTransmissionTheEIAStandardRS-422-Aentitled“ElectricalCharacteristicsofBalancedVoltageDigitalInterfaceCircuits”definesthecharacteristicsofRS-422interfacecircuits.Figure1.4isatypicalRS-422four-wireinterface.Noticethatfiveconductorsareused.Eachgeneratorordrivercandriveuptoten(10)receivers.Thetwosignalingstatesofthelinearedefinedasfollows:a.Whenthe“A”terminalofthedriverisnegativewithrespecttothe“B”terminal,thelineisinabinary1(MARKorOFF)state.b.Whenthe“A”terminalofthedriverispositivewithrespecttothe“B”terminal,thelineisinabinary0(SPACEorON)state.Figure1.5showstheconditionofthevoltageofthebalancedlineforanRS-232toRS-422converterwhenthelineisinthe“idle”conditionorOFFstate.Italsoshowstherelationshipofthe“A” and“B”terminalsofanRS-422systemandthe“-”and“+”terminalmarkingsusedonmanytypesofequipment.The“A”terminalisequivalenttothe“-”designation,andthe“B”terminalequivalenttothe“+”designation.ThesamerelationshipshowninFigure1.5alsoappliesforRS-485systems.RS-422canwithstandacommonmodevoltage(Vcm)of7volts.CommonmodevoltageisdefinedasthemeanvoltageoftheAandBterminalswithrespecttosignalground.EIAStandardRS-485DataTransmissionTheRS-485Standardpermitsabalancedtransmissionlinetobesharedinapartylineormultidropmode.Asmanyas32driver/receiverpairscanshareamultidropnetwork.ManycharacteristicsofthedriversandreceiversarethesameasRS-422.TherangeofthecommonmodevoltageVcmthatthedriverandreceivercantolerateisexpandedto+12to-7volts.Sincethedrivercanbedisconnectedortristatedfromtheline,itmustwithstandthiscommonmodevoltagerangewhileinthetristatecondition.SomeRS-422drivers,evenwithtristatecapability,willnotwithstandthefullVcmvoltagerangeof+12to-7volts.Figure1.6showsatypicaltwo-wiremultidropnetwork.Notethatthetransmissionlineisterminatedonbothendsofthelinebutnotatdroppointsinthemiddleoftheline.Terminationshouldonlybeusedwithhighdataratesandlongwiringruns.AdetaileddiscussionofterminationcanbefoundinChapter2ofthisapplicationnote.ThesignalgroundlineisalsorecommendedinanRS-485systemtokeepthecommonmodevoltagethatthereceivermustacceptwithinthe-7to+12voltrange.FurtherdiscussionofgroundingcanbefoundinChapter3ofthisapplicationnote.AnRS-485networkcanalsobeconnectedinafour-wiremodeasshowninFigure1.7.Notethatfourdatawiresandanadditionalsignalgroundwireareusedina“four-wire”connection.Inafour-wirenetworkitisnecessarythatonenodebeamasternodeandallothersbeslaves.Thenetworkisconnectedsothatthemasternodecommunicatestoallslavenodes.Allslavenodescommunicateonlywiththemasternode.Thisnetworkhassomeadvantageswithequipmentwithmixedprotocolcommunications.Sincetheslavenodesneverlistentoanotherslaveresponsetothemaster,aslavenodecannotreplyincorrectlytoanotherslavenode.TristateControlofanRS-485DeviceusingRTSAsdiscussedpreviously,anRS-485systemmusthaveadriverthatcanbedisconnectedfromthetransmissionlinewhenaparticularnodeisnottransmitting.InanRS-232toRS-485converteroranRS-485serialcard,thismaybeimplementedusingtheRTScontrolsignalfromanasynchronousserialporttoenabletheRS-485driver.TheRTSlineisconnectedtotheRS-485driverenablesuchthatsettingtheRTSlinetoahigh(logic1)stateenablestheRS-485driver.SettingtheRTSlinelow(logic0)putsthedriverintothetristatecondition.Thisineffectdisconnectsthedriverfromthebus,allowingothernodestotransmitoverthesamewirepair.Figure1.8showsatimingdiagramforatypicalRS-232toRS-485converter.ThewaveformsshowwhathappensiftheVRTSwaveformisnarrowerthanthedataVSD.Thisisnotthenormalsituation,butisshownheretoillustratethelossofaportionofthedatawaveform.WhenRTScontrolisused,itisimportanttobecertainthatRTSissethighbeforedataissent.Also,theRTSlinemustthenbesetlowafterthelastdatabitissent.Thistimingisdonebythesoftwareusedtocontroltheserialportandnotbytheconverter.WhenanRS-485networkisconnectedinatwo-wiremultidroppartylinemode,thereceiverateachnodewillbeconnectedtotheline(seeFigure1.6).Thereceivercanoftenbeconfiguredtoreceiveanechoofitsowndatatransmission.Thisisdesirableinsomesystems,andtroublesomeinothers.Besuretocheckthedatasheetforyourconvertertodeterminehowthereceiver“enable”functionisconnected.Send Data Control of an rs-485 DeviceMany of B&B Electronics RS-232 to RS-485 converters and RS-485 serial cards include special circuitry ,which is triggered from the data signal to enable the RS-485 driver.Figure 1.9 is a timing diagram of the important signals used to control a converter of this type.It is important to note that the transmit data line is “disabled”at a fixed interval after the last bit ,typically one character length.If this interval after the is too short,you can miss parts of each character being sent .If this time is too long,your system may try to turn the data lone around from transmit to receive before the node (with the Send Data converter) is ready to receive data.If the latter is the case,you will miss portions (or complete characters) at the beginning of a response.Chapter2:SystemConfigurationNetworkTopologiesNetworkconfigurationisntdefinedintheRS-422orRS-485specification.Inmostcasesthedesignercanuseaconfigurationthatbestfitsthephysicalrequirementsofthesystem.TwoWireorFourWireSystemsRS-422systemsrequireadedicatedpairofwiresforeachsignal,atransmitpair,areceivepairandanadditionalpairforeachhandshake/controlsignalused(ifrequired).ThetristatecapabilitiesofRS-485allowasinglepairofwirestosharetransmitandreceivesignalsforhalf-duplexcommunications.This“twowire”configuration(notethatanadditionalgroundconductorshouldbeused)reducescablingcost.RS-485devicesmaybeinternallyorexternallyconfiguredfortwowiresystems.InternallyconfiguredRS-485devicessimplyprovideAandBconnections(sometimeslabeled“-“and“+”).DevicesconfiguredforfourwirecommunicationsbringoutAandBconnectionsforboththetransmitandthereceivepairs.Theusercanconnectthetransmitlinestothereceivelinestocreateatwowireconfiguration.Thelattertypedeviceprovidesthesystemdesignerwiththemostconfigurationflexibility.Notethatthesignalgroundlineshouldalsobeconnectedinthesystem.ThisconnectionisnecessarytokeeptheVcmcommonmodevoltageatthereceiverwithinasaferange.Theinterfacecircuitmayoperatewithoutthesignalgroundconnection,butmaysacrificereliabilityandnoiseimmunity.Figures2.0and2.1illustrateconnectionsoftwoandfourwiresystems.TerminationTerminationisusedtomatchimpedanceofanodetotheimpedanceofthetransmissionlinebeingused.Whenimpedancearemismatched,thetransmittedsignalisnotcompletelyabsorbedbytheloadandaportionisreflectedbackintothetransmissionline.Ifthesource,transmissionlineandloadimpedanceareequalthesereflectionsareeliminated.Therearedisadvantagesofterminationaswell.Terminationincreasesloadonthedrivers,increasesinstallationcomplexity,changesbiasingrequirementsandmakessystemmodificationmoredifficult.Thedecisionwhetherornottouseterminationshouldbebasedonthecablelengthanddatarateusedbythesystem.Agoodruleofthumbisifthepropagationdelayofthedatalineismuchlessthanonebitwidth,terminationisnotneeded.Thisrulemakestheassumptionthatreflectionswilldampoutinseveraltripsupanddownthedataline.SincethereceivingUARTwillsamplethedatainthemiddleofthebit,itisimportantthatthesignallevelbesolidatthatpoint.Forexample,inasystemwith2000feetofdatalinethepropagationdelaycanbecalculatedbymultiplyingthecablelengthbythepropagationvelocityofthecable.Thisvalue,typically66to75%ofthespeedoflight(c),isspecifiedbythecablemanufacture.Forourexample,aroundtripcovers4000feetofcable.Usingpropagationvelocity of0.66c,oneroundtripiscompletedinapproximately6.2s.Ifweassumethereflectionswilldampoutinthree“roundtrips”upanddownthecablelength,thesignalwillstabilize18.6saftertheleadingedgeofabit.At9600baudonebitis104swide.Sincethereflectionsaredampedoutmuchbeforethecenterofthebit,terminationisnotrequired.Thereareseveralmethodsofterminatingdatalines.ThemethodrecommendedbyB&Bisparalleltermination.Aresistorisaddedinparallelwiththereceivers“A”and“B”linesinordertomatchthedatalinecharacteristicimpedancespecifiedbythecablemanufacture(120isacommonvalue).Thisvaluedescribestheintrinsicimpedanceofthetransmissionlineandisnotafunctionofthelinelength.Aterminatingresistoroflessthan90shouldnotbeused.Terminationresistorsshouldbeplacedonlyattheextremeendsofthedataline,andnomorethantwoterminationsshouldbeplacedinanysystemthatdoesnotuserepeaters.ThistypeofterminationclearlyaddsheavyDCloadingtoasystemandmayoverloadportpoweredRS-232toRS-485converters.Anothertypeoftermination,ACcoupledtermination,addsasmallcapacitorinserieswiththeterminationresistortoeliminatetheDCloadingeffect.AlthoughthismethodeliminatesDCloading,capacitorselectionishighlydependentonthesystemproperties.SystemdesignersinterestedinACterminationareencouragedtoreadNationalSemiconductorsApplicationNote9032forfurtherinformation.Figure2.2illustratesbothparallelandACterminationonanRS-485two-wirenode.Infour-wiresystems,theterminationisplacedacrossthereceiverof thenode.BiasinganRS-485NetworkWhenanRS-485networkisinanidlestate,allnodesareinlisten(receive)mode.Underthisconditiontherearenoactivedriversonthenetwork,alldriversaretristated.Withoutanythingdrivingthenetwork,thestateofthelineisunknown.Ifthevoltage level atthereceiversAandBinputsis less than200mVthelogiclevelattheoutputofthereceiverswillbethevalueofthelastbitreceived.Inordertomaintaintheproperidlevoltagestate,biasresistorsmustbeappliedtoforcethedatalinestotheidlecondition.BiasresistorsarenothingmorethanapullupresistoronthedataBline(typicallyto5volts)andapulldown(toground)onthedataAline.Figure2.3illustratestheplacementofbiasresistorsonatransceiverinatwo-wireconfiguration.NotethatinanRS-485four-wireconfiguration,thebiasresistorsshouldbeplacedonthereceiverlines.Thevalueofthebiasresistorsisdependentonterminationandnumberofnodesinthesystem.ThegoalistogenerateenoughDCbiascurrentinthenetworktomaintainaminimumof200mVbetweentheBandAdataline.Considerthefollowingtwoexamplesofbiasresistorcalculation.Example1.10node,RS-485networkwithtwo120terminationresistorsEachRS-485nodehasaloadimpedanceof12K.10nodesinparallelgivealoadof1200.Additionally,thetwo120terminationresistorsresultinanother60Wload,foratotalloadof57.Clearlytheterminationresistorsareresponsibleforamajorityoftheloading.Inordertomaintainatleast200mVbetweentheBandAline,weneedabiascurrentof3.5mAtoflowthroughtheload.Tocreatethisbiasfroma5Vsupplyatotalseriesresistanceof1428orlessisrequired.Subtractthe57thatisalreadypartoftheload,andweareleftwith1371.Placinghalfofthisvalueasapullupto5Vandhalfasapulldowntogroundgivesamaximumbiasresistorvalueof685foreachofthetwobiasingresistors.Example2.32node,RS-485networkwithoutterminationEachRS-485nodehasaloadimpedanceof12K.32nodesinparallelgivesatotalloadof375.Inordertomaintainatleast200mVacross375weneedacurrentof0.53mA.Togeneratethiscurrentfroma5Vsupplyrequiresatotalresistance of9375maximum.Since375ofthistotalisinthereceiverload,ourbiasresistorsmustaddto9Korless.Noticethatverylittlebiascurrentisrequiredinsystemswithouttermination.Biasresistorscanbeplacedanywhereinthenetworkorcanbesplitamongmultiplenodes.Theparallelcombinationofallbiasresistorsinasystemmustbeequaltoorlessthanthecalculatedbiasingrequirements.B&BElectronicsuses4.7KbiasresistorsinallRS-485products.Thisvalueisadequateformostsystemswithouttermination.Thesystemdesignershouldalwayscalculatethebiasingrequirementsofthenetwork.Symptomsofunderbiasingrangefromdecreasednoiseimmunitytocompletedatafailure.Overbiasinghaslesseffectonasystem,theprimaryresultisincreasedloadonthedrivers.SystemsusingportpoweredRS-232toRS-485converterscanbesensitivetooverbiasing.ExtendingtheSpecificationSomesystemsrequirelongerdistancesorhighernumbersofnodesthansupportedbyRS-422orRS-485.Repeatersarecommonlyusedtoovercomethesebarriers.AnRS-485repeatersuchasB&BElectronics485OPcanbeplacedinasystemtodividetheloadintomultiplesegments.Each“refreshed”signaliscapableofdrivinganother4000feetofcableandanadditional31RS-485loads.AnothermethodofincreasingthenumberofRS-485nodesistouselowloadtypeRS-485receivers.ThesereceiversuseahigherinputimpedancetoreducetheloadontheRS-485driverstoincreasethetotalnumberofnodes.Therearecurrentlyhalfandquarterloadintegratedcircuitreceiversavailable,extendingthetotalallowablenumberofnodesto64and128.RS-422和RS-485应用第一章概论引言本文的目的是描述RS-422和RS-485系统的主要构成。本文尽量包含足够的技术细节以便系统设计师在数据系统设计时能考虑到所有的重要方面。因为RS-422和RS-485都是使用平衡差分信号的数据传输系统,所以将二者放在一起讨论是合适的。在本文中,RS-422和RS-485通用术语被用于代表EIA/TIA-422和EIA/TIA-485标准。数据传输信号非平衡线驱动器在不平衡数据传输系统RS-232中传输的各个信号,其出现在接口连接器的电压是以信号地为参考的。例如,对于DB-25连接器,从DTE设备传送的数据(TD)是2脚上的电压,它以信号地7脚为参考电平,如果总线为空闲状态,其电压为负,如果正在发送数据,其电压则在515伏的正电平和负电平之间反复切换。如图1.1所示,RS-232接收器的典型工作电压为+3+
温馨提示
- 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
- 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
- 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
- 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
- 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
- 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
- 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。
最新文档
- 城市景观提升改造工程经济效益和社会效益分析报告
- 2025山东广饶经济开发区所属国有公司招聘13人笔试历年典型考点题库附带答案详解试卷3套
- 2025安徽安庆市潜山市潜润国有资本投资运营集团有限公司招聘(第二批)综合笔试历年常考点试题专练附带答案详解试卷3套
- 污水处理厂尾水深海排放工程环境影响报告书
- 输电线路迁改项目环境影响评估方案
- 老旧小区改造及城市更新工程节能评估报告
- 2025中国出口信用保险公司校园招聘100人笔试历年备考题库附带答案详解试卷3套
- 丰城市公务员考试熊熙试题及答案
- 法律硕士参加公务员考试试题及答案
- 2025年及未来5年市场数据中国小儿退热口服液行业市场深度调查及发展前景研究预测报告
- 钢结构安装专项施工方案
- 2019年内蒙古对口升学语文原试卷
- 土地整治项目验收手册
- 粤教版八年级上册地理总复习资料
- 2025年黑龙江省普通高中学业水平合格性考试英语试题(含答案无听力原文及音频)
- 冲压车间安全培训
- 食品加工机械与设备题库+参考答案
- 2023年护理人员分层培训、考核计划表
- 【7上英WY】合肥市蜀山区2024-2025学年七年级上学期期中考试英语试卷
- 长津湖课件教案
- 简约蓝色保安交接班记录表
评论
0/150
提交评论