Upload
isa-mahfudi
View
9
Download
0
Embed Size (px)
DESCRIPTION
RS232
Citation preview
25/3/2015 RS232Wikipedia,thefreeencyclopedia
http://en.wikipedia.org/wiki/RS232 1/12
ADB25connectorasdescribedintheRS232standard
RS232FromWikipedia,thefreeencyclopedia
Intelecommunications,RS232isastandardforserialcommunicationtransmissionofdata.ItformallydefinesthesignalsconnectingbetweenaDTE(dataterminalequipment)suchasacomputerterminal,andaDCE(datacircuitterminatingequipment,originallydefinedasdatacommunicationequipment[1]),suchasamodem.TheRS232standardiscommonlyusedincomputerserialports.Thestandarddefinestheelectricalcharacteristicsandtimingofsignals,themeaningofsignals,andthephysicalsizeandpinoutofconnectors.ThecurrentversionofthestandardisTIA232FInterfaceBetweenDataTerminalEquipmentandDataCircuitTerminatingEquipmentEmployingSerialBinaryDataInterchange,issuedin1997.
AnRS232serialportwasonceastandardfeatureofapersonalcomputer,usedforconnectionstomodems,printers,mice,datastorage,uninterruptiblepowersupplies,andotherperipheraldevices.However,RS232ishamperedbylowtransmissionspeed,largevoltageswing,andlargestandardconnectors.Inmodernpersonalcomputers,USBhasdisplacedRS232frommostofitsperipheralinterfaceroles.ManycomputersdonotcomeequippedwithRS232portsandmustuseeitheranexternalUSBtoRS232converteroraninternalexpansioncardwithoneormoreserialportstoconnecttoRS232peripherals.RS232devicesarewidelyused,especiallyinindustrialmachines,networkingequipmentandscientificinstruments.
Contents
1Scopeofthestandard2History3Limitationsofthestandard4Roleinmodernpersonalcomputers5Standarddetails
5.1Voltagelevels5.2Connectors5.3Signals5.4Cables
6Conventions6.1RTS/CTShandshaking6.23wireand5wireRS232
7Seldomusedfeatures7.1Signalrateselection7.2Loopbacktesting7.3Timingsignals7.4Secondarychannel
8Relatedstandards
25/3/2015 RS232Wikipedia,thefreeencyclopedia
http://en.wikipedia.org/wiki/RS232 2/12
9Developmenttools10References11Furtherreading12Externallinks
Scopeofthestandard
TheElectronicIndustriesAssociation(EIA)standardRS232C[1]asof1969defines:
Electricalsignalcharacteristicssuchasvoltagelevels,signalingrate,timingandslewrateofsignals,voltagewithstandlevel,shortcircuitbehavior,andmaximumloadcapacitance.Interfacemechanicalcharacteristics,pluggableconnectorsandpinidentification.Functionsofeachcircuitintheinterfaceconnector.Standardsubsetsofinterfacecircuitsforselectedtelecomapplications.
Thestandarddoesnotdefinesuchelementsasthecharacterencodingortheframingofcharacters,orerrordetectionprotocols.ThecharacterformatandtransmissionbitratearesetbytheserialporthardwarewhichmayalsocontaincircuitstoconverttheinternallogiclevelstoRS232compatiblesignallevels.Thestandarddoesnotdefinebitratesfortransmission,exceptthatitsaysitisintendedforbitrateslowerthan20,000bitspersecond.
History
RS232wasfirstintroducedin1962bytheRadioSectoroftheEIA.[2][3]TheoriginalDTEswereelectromechanicalteletypewriters,andtheoriginalDCEswere(usually)modems.Whenelectronicterminals(smartanddumb)begantobeused,theywereoftendesignedtobeinterchangeablewithteletypewriters,andsosupportedRS232.TheCrevisionofthestandardwasissuedin1969inparttoaccommodatetheelectricalcharacteristicsofthesedevices.
Sincetherequirementsofdevicessuchascomputers,printers,testinstruments,POSterminalsandsoonwerenotforeseenbythestandard,designersimplementinganRS232compatibleinterfaceontheirequipmentofteninterpretedthestandardidiosyncratically.Theresultingcommonproblemswerenonstandardpinassignmentofcircuitsonconnectors,andincorrectormissingcontrolsignals.Thelackofadherencetothestandardsproducedathrivingindustryofbreakoutboxes,patchboxes,testequipment,books,andotheraidsfortheconnectionofdisparateequipment.Acommondeviationfromthestandardwastodrivethesignalsatareducedvoltage.Somemanufacturersthereforebuilttransmittersthatsupplied+5Vand5Vandlabeledthemas"RS232compatible".
Laterpersonalcomputers(andotherdevices)startedtomakeuseofthestandardsothattheycouldconnecttoexistingequipment.Formanyyears,anRS232compatibleportwasastandardfeatureforserialcommunications,suchasmodemconnections,onmanycomputers.Itremainedinwidespreaduseintothelate1990s.Inpersonalcomputerperipherals,ithaslargelybeensupplantedbyotherinterfacestandards,suchasUSB.RS232isstillusedtoconnectolderdesignsofperipherals,industrialequipment(suchasPLCs),consoleportsandspecialpurposeequipment.
25/3/2015 RS232Wikipedia,thefreeencyclopedia
http://en.wikipedia.org/wiki/RS232 3/12
Thestandardhasbeenrenamedseveraltimesduringitshistoryasthesponsoringorganizationchangeditsname,andhasbeenvariouslyknownasEIARS232,EIA232,andmostrecentlyasTIA232.ThestandardcontinuedtoberevisedandupdatedbytheElectronicIndustriesAllianceandsince1988bytheTelecommunicationsIndustryAssociation(TIA).[4]RevisionCwasissuedinadocumentdatedAugust1969.RevisionDwasissuedin1986.ThecurrentrevisionisTIA232FInterfaceBetweenDataTerminalEquipmentandDataCircuitTerminatingEquipmentEmployingSerialBinaryDataInterchange,issuedin1997.ChangessinceRevisionChavebeenintiminganddetailsintendedtoimproveharmonizationwiththeCCITTstandardV.24,butequipmentbuilttothecurrentstandardwillinteroperatewitholderversions.
RelatedITUTstandardsincludeV.24(circuitidentification)andV.28(signalvoltageandtimingcharacteristics).
InrevisionDofEIA232,theDsubminiatureconnectorwasformallyincludedaspartofthestandard(itwasonlyreferencedintheappendixofRS232C).Thevoltagerangewasextendedto+/25volts,andthecircuitcapacitancelimitwasexpresslystatedas2500pF.RevisionEofEIA232introducedanew,smaller,standardDshell26pin"AltA"connector,andmadeotherchangestoimprovecompatibilitywithCCITTstandardsV.24,V.28andISO2110.[5]
Limitationsofthestandard
BecauseRS232isusedbeyondtheoriginalpurposeofinterconnectingaterminalwithamodem,successorstandardshavebeendevelopedtoaddressthelimitations.IssueswiththeRS232standardinclude:[6]
Thelargevoltageswingsandrequirementforpositiveandnegativesuppliesincreasespowerconsumptionoftheinterfaceandcomplicatespowersupplydesign.Thevoltageswingrequirementalsolimitstheupperspeedofacompatibleinterface.Singleendedsignalingreferredtoacommonsignalgroundlimitsthenoiseimmunityandtransmissiondistance.Multidropconnectionamongmorethantwodevicesisnotdefined.Whilemultidrop"workarounds"havebeendevised,theyhavelimitationsinspeedandcompatibility.AsymmetricaldefinitionsofthetwoendsofthelinkmaketheassignmentoftheroleofanewlydevelopeddeviceproblematicthedesignermustdecideoneitheraDTElikeorDCElikeinterfaceandwhichconnectorpinassignmentstouse.Thehandshakingandcontrollinesoftheinterfaceareintendedforthesetupandtakedownofadialupcommunicationcircuitinparticular,theuseofhandshakelinesforflowcontrolisnotreliablyimplementedinmanydevices.Nomethodisspecifiedforsendingpowertoadevice.WhileasmallamountofcurrentcanbeextractedfromtheDTRandRTSlines,thisisonlysuitableforlowpowerdevicessuchasmice.The25wayconnectorrecommendedinthestandardislargecomparedtocurrentpractice.ThestandarddoesnotaddressthepossibilityofconnectingaDTEdirectlytoaDTE,oraDCEtoaDCE.
Roleinmodernpersonalcomputers
25/3/2015 RS232Wikipedia,thefreeencyclopedia
http://en.wikipedia.org/wiki/RS232 4/12
PCIExpressx1cardwithoneRS232port
InthebookPC97HardwareDesignGuide,[7]MicrosoftdeprecatedsupportfortheRS232compatibleserialportoftheoriginalIBMPCdesign.Today,RS232hasmostlybeenreplacedinpersonalcomputersbyUSBforlocalcommunications.ComparedwithRS232,USBisfaster,useslowervoltages,andhasconnectorsthataresimplertoconnectanduse.However,USBislimitedbystandardtonomorethan5metersofcable,thusfavoringRS232whenlongerdistancesareneeded.Bothstandardshavesoftwaresupportinpopularoperatingsystems.
USBisdesignedtomakeiteasyfordevicedriverstocommunicatewithhardware.USBismorecomplexthantheRS232standardbecauseitincludesaprotocolfortransferringdatatodevices.Thisrequiresmoresoftwaretosupporttheprotocolused.Thereisnodirectanalogtotheterminalprogramsusedtoletuserscommunicatedirectlywithserialports.
Serialportsofpersonalcomputersarealsosometimesusedtodirectlycontrolvarioushardwaredevices,suchasrelaysorlamps.Personalcomputersmayuseaserialporttointerfacetodevicessuchasuninterruptiblepowersupplies.Insomecases,serialdataisnotexchanged,butthecontrollinesareusedtosignalconditionssuchaslossofpowerorlowbatteryalarms.AnapplicationprogramcandetectorchangethestateofRS232controllinesintheregistersoftheserialhardwareusingonlyafewinput/outputinstructionsbycontrast,aUSBinterfacerequiressoftwaretodecodetheserialdata.
DevicesthatconvertbetweenUSBandRS232donotworkwithallsoftwareoronallpersonalcomputers.
Infieldssuchaslaboratoryautomationorsurveying,RS232devicesmaycontinuetobeused.PLCs,VFDs,servodrives,andCNCequipmentareprogrammableviaRS232.Somemanufacturershaverespondedtothisdemand:ToshibareintroducedtheDE9MconnectorontheTecralaptop.
SerialportswithRS232arealsocommonlyusedtocommunicatetoheadlesssystemssuchasservers,wherenomonitororkeyboardisinstalled,duringbootwhenoperatingsystemisnotrunningyetandthereforenonetworkconnectionispossible.AnRS232serialportcancommunicatetosomeembeddedsystemssuchasroutersasanalternativetonetworkmodeofmonitoring.
Standarddetails
InRS232,userdataissentasatimeseriesofbits.Bothsynchronousandasynchronoustransmissionsaresupportedbythestandard.Inadditiontothedatacircuits,thestandarddefinesanumberofcontrolcircuitsusedtomanagetheconnectionbetweentheDTEandDCE.Eachdataorcontrolcircuitonlyoperatesinonedirection,thatis,signalingfromaDTEtotheattachedDCEorthereverse.Sincetransmitdataandreceivedataareseparatecircuits,theinterfacecanoperateinafullduplexmanner,supportingconcurrentdataflowinbothdirections.Thestandarddoesnotdefinecharacterframingwithinthedatastream,orcharacterencoding.
Voltagelevels
TheRS232standarddefinesthevoltagelevelsthatcorrespondtologicaloneandlogicalzerolevelsforthedatatransmissionandthecontrolsignallines.Validsignalsareeitherintherangeof+3to+15voltsortherange3to15voltswithrespecttotheground/commonpinconsequently,therangebetween3to+3voltsisnotavalidRS232level.Fordatatransmissionlines(TxD,RxDandtheirsecondarychannelequivalents)logiconeisdefinedasanegativevoltage,thesignalconditioniscalled"mark".Logiczeroispositiveandthesignalconditionistermed"space".Controlsignalshavetheoppositepolarity:theassertedoractivestateispositive
25/3/2015 RS232Wikipedia,thefreeencyclopedia
http://en.wikipedia.org/wiki/RS232 5/12
DiagrammaticoscilloscopetraceofvoltagelevelsforanASCII"K"character(0x4B)with1startbit,8databits,1stopbit.Thisistypicalforstartstopcommunications,butthestandarddoesnotdictateacharacterformatorbitorder.
RS232datalineontheterminalsofthereceiverside(RxD)probedbyanoscilloscope(foranASCII"K"character(0x4B)with1startbit,8databits,1stopbitandnoparitybits).
voltageandthedeassertedorinactivestateisnegativevoltage.Examplesofcontrollinesincluderequesttosend(RTS),cleartosend(CTS),dataterminalready(DTR),anddatasetready(DSR).
Thestandardspecifiesamaximumopencircuitvoltageof25volts:signallevelsof5V,10V,12V,and15Vareallcommonlyseendependingonthevoltagesavailabletothelinedrivercircuit.SomeRS232driverchipshaveinbuiltcircuitrytoproducetherequiredvoltagesfroma3or5voltsupply.RS232driversandreceiversmustbeabletowithstandindefiniteshortcircuittogroundortoanyvoltagelevelupto25volts.Theslewrate,orhowfastthesignalchangesbetweenlevels,isalsocontrolled.
Becausethevoltagelevelsarehigherthanlogiclevelstypicallyusedbyintegratedcircuits,specialinterveningdrivercircuitsarerequiredtotranslatelogiclevels.Thesealsoprotectthedevice'sinternalcircuitryfromshortcircuitsortransientsthatmayappearontheRS232interface,andprovidesufficientcurrenttocomplywiththeslewraterequirementsfordatatransmission.
BecausebothendsoftheRS232circuitdependonthegroundpinbeingzerovolts,problemswilloccurwhenconnectingmachineryandcomputerswherethevoltagebetweenthegroundpinononeend,andthegroundpinontheotherisnotzero.Thismayalsocauseahazardousgroundloop.UseofacommongroundlimitsRS232toapplicationswithrelativelyshortcables.Ifthetwodevicesarefarenoughapartoronseparatepowersystems,thelocalgroundconnectionsateitherendofthecablewillhavedifferingvoltagesthisdifferencewillreducethenoisemarginofthesignals.Balanced,differential,serialconnectionssuchasUSB,RS422andRS485cantoleratelargergroundvoltagedifferencesbecauseofthedifferentialsignaling.[8]
Unusedinterfacesignalsterminatedtogroundwillhaveanundefinedlogicstate.Whereitisnecessarytopermanentlysetacontrolsignaltoadefinedstate,itmustbeconnectedtoavoltagesourcethatassertsthelogic1orlogic0level,forexamplewithapullupresistor.Somedevicesprovidetestvoltagesontheirinterfaceconnectorsforthispurpose.
Connectors
RS232devicesmaybeclassifiedasDataTerminalEquipment(DTE)orDataCommunicationEquipment(DCE)thisdefinesateachdevicewhichwireswillbesendingandreceivingeachsignal.ThestandardrecommendedbutdidnotmakemandatorytheDsubminiature25pinconnector.Accordingtothestandard,maleconnectorshaveDTEpinfunctions,andfemaleconnectorshaveDCEpinfunctions.Otherdevicesmayhaveanycombinationofconnectorgenderandpindefinitions.Manyterminalsweremanufacturedwithfemaleconnectorsbutweresoldwithacablewithmaleconnectorsateachendtheterminalwithitscablesatisfiedtherecommendationsinthestandard.Thestandardspecifies20differentsignalconnections.Sincemostdevicesuseonlyafewsignals,smallerconnectorscanoftenbeused.
PersonalcomputermanufacturersreplacedtheDB25MconnectorbythesmallerDE9Mconnector.Differentpinnumberswereusedforthesignals(forthisseeserialport).Thisconnector,withvaryingpinouts,becamecommonforpersonalcomputersandrelateddevices.
25/3/2015 RS232Wikipedia,thefreeencyclopedia
http://en.wikipedia.org/wiki/RS232 6/12
Presenceofa25pinDsubconnectordoesnotnecessarilyindicateanRS232Ccompliantinterface.Forexample,ontheoriginalIBMPC,amaleDsubwasanRS232CDTEport(withanonstandardcurrentloopinterfaceonreservedpins),butthefemaleDsubconnectoronthesamePCmodelwasusedfortheparallelCentronicsprinterport.Somepersonalcomputersputnonstandardvoltagesorsignalsonsomepinsoftheirserialports.
Signals
ThefollowingtablelistscommonlyusedRS232signalsandpinassignments.[9]Seeserialport(pinouts)fornonstandardvariationsincludingthepopularDE9connector.
Signal Origin DB25pinName Typicalpurpose Abbreviation DTE DCE
DataTerminalReady
IndicatespresenceofDTEtoDCE. DTR 20
DataCarrierDetect
DCEisconnectedtothetelephoneline. DCD 8
DataSetReady DCEisreadytoreceivecommandsordata. DSR 6
RingIndicator
DCEhasdetectedanincomingringsignalonthetelephoneline. RI 22
RequestToSend DTErequeststheDCEpreparetoreceivedata. RTS 4
ClearToSend IndicatesDCEisreadytoacceptdata. CTS 5
TransmittedData CarriesdatafromDTEtoDCE. TxD 2
ReceivedData CarriesdatafromDCEtoDTE. RxD 3
CommonGround GND common 7
ProtectiveGround PG common 1
ThesignalsarenamedfromthestandpointoftheDTE.Thegroundsignalisacommonreturnfortheotherconnections.TheDB25connectorincludesasecond"protectiveground"onpin1.
Datacanbesentoverasecondarychannel(whenimplementedbytheDTEandDCEdevices),whichisequivalenttotheprimarychannel.Pinassignmentsaredescribedinfollowingtable:
25/3/2015 RS232Wikipedia,thefreeencyclopedia
http://en.wikipedia.org/wiki/RS232 7/12
Signal Pin
CommonGround 7(sameasprimary)
SecondaryTransmittedData(STD) 14
SecondaryReceivedData(SRD) 16
SecondaryRequestToSend(SRTS) 19
SecondaryClearToSend(SCTS) 13
SecondaryCarrierDetect(SDCD) 12
RingIndicator'(RI),isasignalsentfromthemodemtotheterminaldevice.Itindicatestotheterminaldevicethatthephonelineisringing.Inmanycomputerserialports,ahardwareinterruptisgeneratedwhentheRIsignalchangesstate.HavingsupportforthishardwareinterruptmeansthataprogramoroperatingsystemcanbeinformedofachangeinstateoftheRIpin,withoutrequiringthesoftwaretoconstantly"poll"thestateofthepin.RIisaonewaysignalfromthemodemtotheterminal(ormoregenerally,theDCEtotheDTE)thatdoesnotcorrespondtoanothersignalthatcarriessimilarinformationtheoppositeway.
OnanexternalmodemthestatusoftheRingIndicatorpinisoftencoupledtothe"AA"(autoanswer)light,whichflashesiftheRIsignalhasdetectedaring.TheassertedRIsignalfollowstheringingpatternclosely,whichcanpermitsoftwaretodetectdistinctiveringpatterns.
TheRingIndicatorsignalisusedbysomeolderuninterruptiblepowersupplies(UPS's)tosignalapowerfailurestatetothecomputer.
Certainpersonalcomputerscanbeconfiguredforwakeonring,allowingacomputerthatissuspendedtoansweraphonecall.
Cables
Thestandarddoesnotdefineamaximumcablelengthbutinsteaddefinesthemaximumcapacitancethatacompliantdrivecircuitmusttolerate.Awidelyusedruleofthumbindicatesthatcablesmorethan50feet(15m)longwillhavetoomuchcapacitance,unlessspecialcablesareused.Byusinglowcapacitancecables,fullspeedcommunicationcanbemaintainedoverlargerdistancesuptoabout1,000feet(300m).[10]Forlongerdistances,othersignalstandardsarebettersuitedtomaintainhighspeed.
Sincethestandarddefinitionsarenotalwayscorrectlyapplied,itisoftennecessarytoconsultdocumentation,testconnectionswithabreakoutbox,orusetrialanderrortofindacablethatworkswheninterconnectingtwodevices.ConnectingafullystandardcompliantDCEdeviceandDTEdevicewoulduseacablethatconnectsidenticalpinnumbersineachconnector(asocalled"straightcable")."Genderchangers"areavailabletosolvegendermismatchesbetweencablesandconnectors.Connectingdeviceswithdifferenttypesofconnectorsrequiresacablethatconnectsthecorrespondingpinsaccordingtothetableabove.Cableswith9pinsononeendand25ontheotherarecommon.Manufacturersofequipmentwith8P8CconnectorsusuallyprovideacablewitheitheraDB25orDE9connector(orsometimesinterchangeableconnectorssotheycanworkwithmultipledevices).Poorqualitycablescancausefalsesignalsbycrosstalkbetweendataandcontrollines(suchasRingIndicator).
Ifagivencablewillnotallowadataconnection,especiallyifagenderchangerisinuse,anullmodemcablemaybenecessary.Genderchangersandnullmodemcablesarenotmentionedinthestandard,sothereisnoofficiallysanctioneddesignforthem.
25/3/2015 RS232Wikipedia,thefreeencyclopedia
http://en.wikipedia.org/wiki/RS232 8/12
Conventions
Forfunctionalcommunicationthroughaserialportinterface,conventionsofbitrate,characterframing,communicationsprotocol,characterencoding,datacompression,anderrordetection,notdefinedinRS232,mustbeagreedtobybothsendingandreceivingequipment.Forexample,considertheserialportsoftheoriginalIBMPC.Thisimplementationusedan8250UARTusingasynchronousstartstopcharacterformattingwith7or8databitsperframe,usuallyASCIIcharactercoding,anddataratesprogrammablebetween75bitspersecondand115,200bitspersecond.Dataratesabove20,000bitspersecondareoutofthescopeofthestandard,althoughhigherdataratesaresometimesusedbycommerciallymanufacturedequipment.SincemostRS232devicesdonothaveautomaticbaudratedetection,usersmustmanuallysetthebaudrate(andallotherparameters)atbothendsoftheRS232connection.
Intheparticularcaseofthe8250UARTusedbytheIBMPCandothers,baudrateswereprogrammablebywritingintegervaluestoadividerregisterandbyselectingoneofseveralclockprescalersforthedivider.ThisallowedaPCtobeconnectedtodevicesusingratesotherthanthosestandardizedformodems.Notallbaudratescanbeprogrammed,duetotheclockfrequencyofthe8250UARTinthePC,andthegranularityofthebaudratesetting.ThisincludesthebaudrateofMIDI,31,250bitspersecond,whichisnotachievablebyastandardIBMPCserialport.[11]MIDItoRS232interfacesdesignedfortheIBMPCincludebaudratetranslationhardwaretoadjustthebaudrateoftheMIDIdatatosomethingthattheIBMPCcansupport,forexample19,200or38,400bitspersecond.
RTS/CTShandshaking
Intypicalapplication,theDTEassertsRTStoindicatethatitisreadytoreceivedatafromtheDCE,andtheDCEassertsCTStoindicatethatitisreadytoreceivedatafromtheDTE.Thisiscalled"RTS/CTShandshaking"andisanexampleofhardwareflowcontrol.However,"hardwareflowcontrol"inthedescriptionoftheoptionsavailableonanRS232equippeddevicedoesnotalwaysmeanRTS/CTShandshaking.
Notethatequipmentusingthisprotocolmustbepreparedtobuffersomeextradata,sinceatransmissionmayhavebegunjustbeforethecontrollinestatechange.
ThisisnottheoriginalmeaningofRTS,whichisconsistentwithitsname("requesttosend").
Inolderversionsofthespecification,RS232'suseoftheRTSandCTSlinesisasymmetric:TheDTEassertsRTStoindicateadesiretotransmittotheDCE,andtheDCEassertsCTSinresponsetograntpermission.ThereisnowayfortheDTEtoindicatethatitisunabletoacceptdatafromtheDCE.ThisuseofRTS/CTSallowsforhalfduplex(onedirectionatatime)modemsthatdisabletheirtransmitterswhennotrequired,andmusttransmitasynchronizationpreambletothereceiverwhentheyarereenabled.Suchmodemsarenolongerincommonuse.
ThisschemeisalsoemployedonpresentdayRS232toRS485converters.RS485isamultipleaccessbusonwhichonlyonedevicecantransmitatatime,aconceptthatisnotprovidedforinRS232.TheRS232deviceassertsRTStotelltheconvertertotakecontroloftheRS485bussothattheconverter,andthustheRS232device,cansenddataontothebus.
ThesymmetricRTS/CTShandshakingalternativewasdevelopedandmarketedbyvariousequipmentmanufacturersbeforeitwasincorporatedinRS232.ItwaseventuallycodifiedinversionRS232E(actuallyTIA232Ebythattime)bydefininganewsignal,"RTR(ReadytoReceive),"whichisCCITTV.24circuit133.TIA232Eandthecorrespondinginternationalstandardswereupdatedtoshowthatcircuit133,whenimplemented,sharesthesamepinasRTS(RequesttoSend),andthatwhen133isinuse,RTSisassumedbytheDCEtobeONatalltimes.[12]
25/3/2015 RS232Wikipedia,thefreeencyclopedia
http://en.wikipedia.org/wiki/RS232 9/12
3wireand5wireRS232
Aminimal"3wire"RS232connectionconsistingonlyoftransmitdata,receivedata,andground,iscommonlyusedwhenthefullfacilitiesofRS232arenotrequired.Evenatwowireconnection(dataandground)canbeusedifthedataflowisoneway(forexample,adigitalpostalscalethatperiodicallysendsaweightreading,oraGPSreceiverthatperiodicallysendsposition,ifnoconfigurationviaRS232isnecessary).Whenonlyhardwareflowcontrolisrequiredinadditiontotwowaydata,theRTSandCTSlinesareaddedina5wireversion.
Seldomusedfeatures
TheEIA232standardspecifiesconnectionsforseveralfeaturesthatarenotusedinmostimplementations.Theiruserequires25pinconnectorsandcables.
Signalrateselection
TheDTEorDCEcanspecifyuseofa"high"or"low"signalingrate.TheratesaswellaswhichdevicewillselecttheratemustbeconfiguredinboththeDTEandDCE.Theprearrangeddeviceselectsthehighratebysettingpin23toON.
Loopbacktesting
ManyDCEdeviceshavealoopbackcapabilityusedfortesting.Whenenabled,signalsareechoedbacktothesenderratherthanbeingsentontothereceiver.Ifsupported,theDTEcansignalthelocalDCE(theoneitisconnectedto)toenterloopbackmodebysettingpin18toON,ortheremoteDCE(theonethelocalDCEisconnectedto)toenterloopbackmodebysettingpin21toON.ThelatterteststhecommunicationslinkaswellasbothDCE's.WhentheDCEisintestmodeitsignalstheDTEbysettingpin25toON.
Acommonlyusedversionofloopbacktestingdoesnotinvolveanyspecialcapabilityofeitherend.Ahardwareloopbackissimplyawireconnectingcomplementarypinstogetherinthesameconnector(seeloopback).
LoopbacktestingisoftenperformedwithaspecializedDTEcalledabiterrorratetester(orBERT).
Timingsignals
Somesynchronousdevicesprovideaclocksignaltosynchronizedatatransmission,especiallyathigherdatarates.TwotimingsignalsareprovidedbytheDCEonpins15and17.Pin15isthetransmitterclock,orsendtiming(ST)theDTEputsthenextbitonthedataline(pin2)whenthisclocktransitionsfromOFFtoON(soitisstableduringtheONtoOFFtransitionwhentheDCEregistersthebit).Pin17isthereceiverclock,orreceivetiming(RT)theDTEreadsthenextbitfromthedataline(pin3)whenthisclocktransitionsfromONtoOFF.
Alternatively,theDTEcanprovideaclocksignal,calledtransmittertiming(TT),onpin24fortransmitteddata.DataischangedwhentheclocktransitionsfromOFFtoONandreadduringtheONtoOFFtransition.TTcanbeusedtoovercometheissuewhereSTmusttraverseacableofunknownlengthanddelay,clockabitoutoftheDTEafteranotherunknowndelay,andreturnittotheDCEoverthesameunknowncabledelay.SincetherelationbetweenthetransmittedbitandTTcanbefixedintheDTEdesign,andsincebothsignalstraversethesamecablelength,usingTTeliminatestheissue.TTmaybegeneratedbyloopingSTbackwithanappropriatephasechangetoalignitwiththetransmitteddata.STloopbacktoTTletstheDTEusetheDCEasthefrequencyreference,andcorrecttheclocktodatatiming.
25/3/2015 RS232Wikipedia,thefreeencyclopedia
http://en.wikipedia.org/wiki/RS232 10/12
SynchronousclockingisrequiredforsuchprotocolsasSDLC,HDLC,andX.25.
Secondarychannel
Thereisasecondarydatachannel,identicalincapabilitytothefirst.Fivesignals(plusthecommongroundoftheprimarychannel)comprisethesecondarychannel:SecondaryTransmittedData(STD),SecondaryReceivedData(SRD),SecondaryRequestToSend(SRTS),SecondaryClearToSend(SCTS),andSecondaryCarrierDetect(SDCD).
Relatedstandards
OtherserialsignalingstandardsmaynotinteroperatewithstandardcompliantRS232ports.Forexample,usingtheTTLlevelsofnear+5and0Vputsthemarklevelintheundefinedareaofthestandard.SuchlevelsaresometimesusedwithNMEA0183compliantGPSreceiversanddepthfinders.
A20mAcurrentloopusestheabsenceof20mAcurrentforhigh,andthepresenceofcurrentintheloopforlowthissignalingmethodisoftenusedforlongdistanceandopticallyisolatedlinks.ConnectionofacurrentloopdevicetoacompliantRS232portrequiresaleveltranslator.Currentloopdevicescansupplyvoltagesinexcessofthewithstandvoltagelimitsofacompliantdevice.TheoriginalIBMPCserialportcardimplementeda20mAcurrentloopinterface,whichwasneveremulatedbyothersuppliersofplugcompatibleequipment.
OtherserialinterfacessimilartoRS232:
RS422(ahighspeedsystemsimilartoRS232butwithdifferentialsignaling)RS423(ahighspeedsystemsimilartoRS422butwithunbalancedsignaling)RS449(afunctionalandmechanicalinterfacethatusedRS422andRS423signalsitnevercaughtonlikeRS232andwaswithdrawnbytheEIA)RS485(adescendantofRS422thatcanbeusedasabusinmultidropconfigurations)MILSTD188(asystemlikeRS232butwithbetterimpedanceandrisetimecontrol)EIA530(ahighspeedsystemusingRS422orRS423electricalpropertiesinanEIA232pinoutconfiguration,thuscombiningthebestofbothsupersedesRS449)EIA/TIA5618PositionNonSynchronousInterfaceBetweenDataTerminalEquipmentandDataCircuitTerminatingEquipmentEmployingSerialBinaryDataInterchangeEIA/TIA562ElectricalCharacteristicsforanUnbalancedDigitalInterface(lowvoltageversionofEIA/TIA232)TIA574(standardizesthe9pinDsubminiatureconnectorpinoutforusewithEIA232electricalsignalling,asoriginatedontheIBMPC/AT)
Developmenttools
WhendevelopingortroubleshootingsystemsusingRS232,closeexaminationofhardwaresignalscanbeimportanttofindproblems.AseriallineanalyzerisadevicesimilartoalogicanalyzerbutspecializedforRS232'svoltagelevels,connectors,and,whereused,clocksignals.Theseriallineanalyzercancollect,store,anddisplaythedataandcontrolsignals,allowingdeveloperstoviewthemindetail.SomesimplydisplaythesignalsaswaveformsmoreelaborateversionsincludetheabilitytodecodecharactersinASCIIorothercommon
25/3/2015 RS232Wikipedia,thefreeencyclopedia
http://en.wikipedia.org/wiki/RS232 11/12
WikimediaCommonshasmediarelatedtoRS232.
Wikibookshasabookonthetopicof:Serial
codesandtointerpretcommonprotocolsusedoverRS232suchasSDLC,HDLC,DDCMP,andX.25.Seriallineanalyzersareavailableasstandaloneunits,assoftwareandinterfacecablesforgeneralpurposelogicanalyzersandoscilloscopes,andasprogramsthatrunoncommonpersonalcomputersanddevices.
References
Furtherreading
SerialPortComplete:COMPorts,USBVirtualCOMPorts,andPortsforEmbeddedSystems2ndEditionJanAxelsonLakeviewResearch380pages2007ISBN9781931448062.
Externallinks
Retrievedfrom"http://en.wikipedia.org/w/index.php?title=RS232&oldid=651814615"
Categories: Telecommunicationsequipment
1. ^abEIAstandardRS232C:InterfacebetweenDataTerminalEquipmentandDataCommunicationEquipmentEmployingSerialBinaryDataInterchange.Washington:ElectronicIndustriesAssociation.EngineeringDept.1969.OCLC38637094(https://www.worldcat.org/oclc/38637094).
2. ^"RS232TutorialonDataInterfaceandcables"(http://www.arcelect.com/rs232.htm).ARCElectronics.2010.Retrieved28July2011.
3. ^MeteringGlossary(http://www.landisgyr.eu/en/pub/services_support/metering_glossary.cfm?eventGlossary=glossary.Search&initial=E)Landis+GyrTutorial(seeEIA)
4. ^"TIAFactsataGlance"(http://www.tiaonline.org/about/).AboutTIA.TelecommunicationsIndustryAssociation.Retrieved28July2011.
5. ^S.Mackay,E.Wright,D.Reynders,J.Park,PracticalIndustrialDataNetworks:Design,InstallationandTroubleshooting,Newnes,2004ISBN075065807X,pages4142
6. ^Horowitz,PaulWinfieldHill(1989).TheArtofElectronics(2nded.).Cambridge,England:CambridgeUniversityPress.pp.723726.ISBN0521370957.
7. ^PC97HardwareDesignGuide.Redmond,Wash:MicrosoftPress.1997.ISBN1572313811.8. ^Wilson,MichaelR.(January2000)."TIA/EIA422BOverview"(http://www.national.com/an/AN/AN
1031.pdf).ApplicationNote1031.NationalSemiconductor.Retrieved28July2011.9. ^gren,Joakim(18September2008)."Serial(PC9)"(http://www.hardwarebook.info/Serial_(PC_9)).
HardwareBook.Retrieved28July2011.10. ^Lawrence,Tony(1992)."SerialWiring"(http://aplawrence.com/Unixart/serial.art.html).A.P.Lawrence.
Retrieved28July2011.11. ^InfoWorld30Mar1992page8012. ^CaseyLeedom(19900220)."Re:EIA232fullduplexRTS/CTSflowcontrolstandardproposal"
(http://groups.google.com/group/comp.dcom.modems/msg/39042605325cc765?dmode=source).Newsgroup:comp.dcom.modems(news:comp.dcom.modems).Usenet:[email protected](news:[email protected]).Retrieved20140203.
25/3/2015 RS232Wikipedia,thefreeencyclopedia
http://en.wikipedia.org/wiki/RS232 12/12
Programming:RS232Connections
Computerhardwarestandards Networkingstandards
Thispagewaslastmodifiedon17March2015,at18:39.TextisavailableundertheCreativeCommonsAttributionShareAlikeLicenseadditionaltermsmayapply.Byusingthissite,youagreetotheTermsofUseandPrivacyPolicy.WikipediaisaregisteredtrademarkoftheWikimediaFoundation,Inc.,anonprofitorganization.