Sie sind auf Seite 1von 12

25/3/2015

RS232Wikipedia,thefreeencyclopedia

RS232
FromWikipedia,thefreeencyclopedia

Intelecommunications,RS232isastandardforserial
communicationtransmissionofdata.Itformallydefinesthesignals
connectingbetweenaDTE(dataterminalequipment)suchasa
computerterminal,andaDCE(datacircuitterminating
equipment,originallydefinedasdatacommunication

ADB25connectorasdescribedin
theRS232standard

equipment [1]),suchasamodem.TheRS232standardiscommonly
usedincomputerserialports.Thestandarddefinestheelectrical
characteristicsandtimingofsignals,themeaningofsignals,andthephysicalsizeandpinoutofconnectors.The
currentversionofthestandardisTIA232FInterfaceBetweenDataTerminalEquipmentandData
CircuitTerminatingEquipmentEmployingSerialBinaryDataInterchange,issuedin1997.
AnRS232serialportwasonceastandardfeatureofapersonalcomputer,usedforconnectionstomodems,
printers,mice,datastorage,uninterruptiblepowersupplies,andotherperipheraldevices.However,RS232is
hamperedbylowtransmissionspeed,largevoltageswing,andlargestandardconnectors.Inmodernpersonal
computers,USBhasdisplacedRS232frommostofitsperipheralinterfaceroles.Manycomputersdonot
comeequippedwithRS232portsandmustuseeitheranexternalUSBtoRS232converteroraninternal
expansioncardwithoneormoreserialportstoconnecttoRS232peripherals.RS232devicesarewidely
used,especiallyinindustrialmachines,networkingequipmentandscientificinstruments.

Contents
1Scopeofthestandard
2History
3Limitationsofthestandard
4Roleinmodernpersonalcomputers
5Standarddetails
5.1Voltagelevels
5.2Connectors
5.3Signals
5.4Cables
6Conventions
6.1RTS/CTShandshaking
6.23wireand5wireRS232
7Seldomusedfeatures
7.1Signalrateselection
7.2Loopbacktesting
7.3Timingsignals
7.4Secondarychannel
8Relatedstandards
http://en.wikipedia.org/wiki/RS232

1/12

25/3/2015

RS232Wikipedia,thefreeencyclopedia

9Developmenttools
10References
11Furtherreading
12Externallinks

Scopeofthestandard
TheElectronicIndustriesAssociation(EIA)standardRS232C[1]asof1969defines:
Electricalsignalcharacteristicssuchasvoltagelevels,signalingrate,timingandslewrateofsignals,
voltagewithstandlevel,shortcircuitbehavior,andmaximumloadcapacitance.
Interfacemechanicalcharacteristics,pluggableconnectorsandpinidentification.
Functionsofeachcircuitintheinterfaceconnector.
Standardsubsetsofinterfacecircuitsforselectedtelecomapplications.
Thestandarddoesnotdefinesuchelementsasthecharacterencodingortheframingofcharacters,orerror
detectionprotocols.Thecharacterformatandtransmissionbitratearesetbytheserialporthardwarewhich
mayalsocontaincircuitstoconverttheinternallogiclevelstoRS232compatiblesignallevels.Thestandard
doesnotdefinebitratesfortransmission,exceptthatitsaysitisintendedforbitrateslowerthan20,000bitsper
second.

History
RS232wasfirstintroducedin1962bytheRadioSectoroftheEIA.[2][3]TheoriginalDTEswere
electromechanicalteletypewriters,andtheoriginalDCEswere(usually)modems.Whenelectronicterminals
(smartanddumb)begantobeused,theywereoftendesignedtobeinterchangeablewithteletypewriters,andso
supportedRS232.TheCrevisionofthestandardwasissuedin1969inparttoaccommodatetheelectrical
characteristicsofthesedevices.
Sincetherequirementsofdevicessuchascomputers,printers,testinstruments,POSterminalsandsoonwere
notforeseenbythestandard,designersimplementinganRS232compatibleinterfaceontheirequipmentoften
interpretedthestandardidiosyncratically.Theresultingcommonproblemswerenonstandardpinassignmentof
circuitsonconnectors,andincorrectormissingcontrolsignals.Thelackofadherencetothestandards
producedathrivingindustryofbreakoutboxes,patchboxes,testequipment,books,andotheraidsforthe
connectionofdisparateequipment.Acommondeviationfromthestandardwastodrivethesignalsatareduced
voltage.Somemanufacturersthereforebuilttransmittersthatsupplied+5Vand5Vandlabeledthemas"RS
232compatible".
Laterpersonalcomputers(andotherdevices)startedtomakeuseofthestandardsothattheycouldconnectto
existingequipment.Formanyyears,anRS232compatibleportwasastandardfeatureforserial
communications,suchasmodemconnections,onmanycomputers.Itremainedinwidespreaduseintothelate
1990s.Inpersonalcomputerperipherals,ithaslargelybeensupplantedbyotherinterfacestandards,suchas
USB.RS232isstillusedtoconnectolderdesignsofperipherals,industrialequipment(suchasPLCs),console
portsandspecialpurposeequipment.

http://en.wikipedia.org/wiki/RS232

2/12

25/3/2015

RS232Wikipedia,thefreeencyclopedia

Thestandardhasbeenrenamedseveraltimesduringitshistoryasthesponsoringorganizationchangeditsname,
andhasbeenvariouslyknownasEIARS232,EIA232,andmostrecentlyasTIA232.Thestandard
continuedtoberevisedandupdatedbytheElectronicIndustriesAllianceandsince1988bythe
TelecommunicationsIndustryAssociation(TIA).[4]RevisionCwasissuedinadocumentdatedAugust1969.
RevisionDwasissuedin1986.ThecurrentrevisionisTIA232FInterfaceBetweenDataTerminal
EquipmentandDataCircuitTerminatingEquipmentEmployingSerialBinaryDataInterchange,issued
in1997.ChangessinceRevisionChavebeenintiminganddetailsintendedtoimproveharmonizationwiththe
CCITTstandardV.24,butequipmentbuilttothecurrentstandardwillinteroperatewitholderversions.
RelatedITUTstandardsincludeV.24(circuitidentification)andV.28(signalvoltageandtiming
characteristics).
InrevisionDofEIA232,theDsubminiatureconnectorwasformallyincludedaspartofthestandard(itwas
onlyreferencedintheappendixofRS232C).Thevoltagerangewasextendedto+/25volts,andthecircuit
capacitancelimitwasexpresslystatedas2500pF.RevisionEofEIA232introducedanew,smaller,standard
Dshell26pin"AltA"connector,andmadeotherchangestoimprovecompatibilitywithCCITTstandards
V.24,V.28andISO2110.[5]

Limitationsofthestandard
BecauseRS232isusedbeyondtheoriginalpurposeofinterconnectingaterminalwithamodem,successor
standardshavebeendevelopedtoaddressthelimitations.IssueswiththeRS232standardinclude:[6]
Thelargevoltageswingsandrequirementforpositiveandnegativesuppliesincreasespowerconsumption
oftheinterfaceandcomplicatespowersupplydesign.Thevoltageswingrequirementalsolimitstheupper
speedofacompatibleinterface.
Singleendedsignalingreferredtoacommonsignalgroundlimitsthenoiseimmunityandtransmission
distance.
Multidropconnectionamongmorethantwodevicesisnotdefined.Whilemultidrop"workarounds"
havebeendevised,theyhavelimitationsinspeedandcompatibility.
Asymmetricaldefinitionsofthetwoendsofthelinkmaketheassignmentoftheroleofanewlydeveloped
deviceproblematicthedesignermustdecideoneitheraDTElikeorDCElikeinterfaceandwhich
connectorpinassignmentstouse.
Thehandshakingandcontrollinesoftheinterfaceareintendedforthesetupandtakedownofadialup
communicationcircuitinparticular,theuseofhandshakelinesforflowcontrolisnotreliablyimplemented
inmanydevices.
Nomethodisspecifiedforsendingpowertoadevice.Whileasmallamountofcurrentcanbeextracted
fromtheDTRandRTSlines,thisisonlysuitableforlowpowerdevicessuchasmice.
The25wayconnectorrecommendedinthestandardislargecomparedtocurrentpractice.
ThestandarddoesnotaddressthepossibilityofconnectingaDTEdirectlytoaDTE,oraDCEtoa
DCE.

Roleinmodernpersonalcomputers
http://en.wikipedia.org/wiki/RS232

3/12

25/3/2015

RS232Wikipedia,thefreeencyclopedia

InthebookPC97HardwareDesignGuide,[7]Microsoftdeprecatedsupport
fortheRS232compatibleserialportoftheoriginalIBMPCdesign.Today,
RS232hasmostlybeenreplacedinpersonalcomputersbyUSBforlocal
communications.ComparedwithRS232,USBisfaster,useslowervoltages,
andhasconnectorsthataresimplertoconnectanduse.However,USBis
limitedbystandardtonomorethan5metersofcable,thusfavoringRS232
whenlongerdistancesareneeded.Bothstandardshavesoftwaresupportin
popularoperatingsystems.
PCIExpressx1cardwith
USBisdesignedtomakeiteasyfordevicedriverstocommunicatewith
oneRS232port
hardware.USBismorecomplexthantheRS232standardbecauseitincludes
aprotocolfortransferringdatatodevices.Thisrequiresmoresoftwareto
supporttheprotocolused.Thereisnodirectanalogtotheterminalprogramsusedtoletuserscommunicate
directlywithserialports.

Serialportsofpersonalcomputersarealsosometimesusedtodirectlycontrolvarioushardwaredevices,such
asrelaysorlamps.Personalcomputersmayuseaserialporttointerfacetodevicessuchasuninterruptible
powersupplies.Insomecases,serialdataisnotexchanged,butthecontrollinesareusedtosignalconditions
suchaslossofpowerorlowbatteryalarms.AnapplicationprogramcandetectorchangethestateofRS232
controllinesintheregistersoftheserialhardwareusingonlyafewinput/outputinstructionsbycontrast,aUSB
interfacerequiressoftwaretodecodetheserialdata.
DevicesthatconvertbetweenUSBandRS232donotworkwithallsoftwareoronallpersonalcomputers.
Infieldssuchaslaboratoryautomationorsurveying,RS232devicesmaycontinuetobeused.PLCs,VFDs,
servodrives,andCNCequipmentareprogrammableviaRS232.Somemanufacturershaverespondedtothis
demand:ToshibareintroducedtheDE9MconnectorontheTecralaptop.
SerialportswithRS232arealsocommonlyusedtocommunicatetoheadlesssystemssuchasservers,where
nomonitororkeyboardisinstalled,duringbootwhenoperatingsystemisnotrunningyetandthereforeno
networkconnectionispossible.AnRS232serialportcancommunicatetosomeembeddedsystemssuchas
routersasanalternativetonetworkmodeofmonitoring.

Standarddetails
InRS232,userdataissentasatimeseriesofbits.Bothsynchronousandasynchronoustransmissionsare
supportedbythestandard.Inadditiontothedatacircuits,thestandarddefinesanumberofcontrolcircuitsused
tomanagetheconnectionbetweentheDTEandDCE.Eachdataorcontrolcircuitonlyoperatesinone
direction,thatis,signalingfromaDTEtotheattachedDCEorthereverse.Sincetransmitdataandreceivedata
areseparatecircuits,theinterfacecanoperateinafullduplexmanner,supportingconcurrentdataflowinboth
directions.Thestandarddoesnotdefinecharacterframingwithinthedatastream,orcharacterencoding.

Voltagelevels
TheRS232standarddefinesthevoltagelevelsthatcorrespondtologicaloneandlogicalzerolevelsforthe
datatransmissionandthecontrolsignallines.Validsignalsareeitherintherangeof+3to+15voltsortherange
3to15voltswithrespecttotheground/commonpinconsequently,therangebetween3to+3voltsisnot
avalidRS232level.Fordatatransmissionlines(TxD,RxDandtheirsecondarychannelequivalents)logicone
isdefinedasanegativevoltage,thesignalconditioniscalled"mark".Logiczeroispositiveandthesignal
conditionistermed"space".Controlsignalshavetheoppositepolarity:theassertedoractivestateispositive
http://en.wikipedia.org/wiki/RS232

4/12

25/3/2015

RS232Wikipedia,thefreeencyclopedia

voltageandthedeassertedorinactivestateisnegativevoltage.Examplesof
controllinesincluderequesttosend(RTS),cleartosend(CTS),dataterminal
ready(DTR),anddatasetready(DSR).
Thestandardspecifiesamaximumopencircuitvoltageof25volts:signallevels
of5V,10V,12V,and15Vareallcommonlyseendependingonthe
voltagesavailabletothelinedrivercircuit.SomeRS232driverchipshave
inbuiltcircuitrytoproducetherequiredvoltagesfroma3or5voltsupply.RS
232driversandreceiversmustbeabletowithstandindefiniteshortcircuitto
groundortoanyvoltagelevelupto25volts.Theslewrate,orhowfastthe
signalchangesbetweenlevels,isalsocontrolled.
Becausethevoltagelevelsarehigherthanlogiclevelstypicallyusedby
integratedcircuits,specialinterveningdrivercircuitsarerequiredtotranslate
logiclevels.Thesealsoprotectthedevice'sinternalcircuitryfromshortcircuits
ortransientsthatmayappearontheRS232interface,andprovidesufficient
currenttocomplywiththeslewraterequirementsfordatatransmission.
BecausebothendsoftheRS232circuitdependonthegroundpin
beingzerovolts,problemswilloccurwhenconnectingmachineryand
computerswherethevoltagebetweenthegroundpinononeend,and
thegroundpinontheotherisnotzero.Thismayalsocausea
hazardousgroundloop.UseofacommongroundlimitsRS232to
applicationswithrelativelyshortcables.Ifthetwodevicesarefar
enoughapartoronseparatepowersystems,thelocalground
connectionsateitherendofthecablewillhavedifferingvoltagesthis
differencewillreducethenoisemarginofthesignals.Balanced,
differential,serialconnectionssuchasUSB,RS422andRS485can
toleratelargergroundvoltagedifferencesbecauseofthedifferential
signaling.[8]
Unusedinterfacesignalsterminatedtogroundwillhaveanundefined
logicstate.Whereitisnecessarytopermanentlysetacontrolsignalto
adefinedstate,itmustbeconnectedtoavoltagesourcethatasserts
thelogic1orlogic0level,forexamplewithapullupresistor.Some
devicesprovidetestvoltagesontheirinterfaceconnectorsforthispurpose.

Diagrammaticoscilloscope
traceofvoltagelevelsfor
anASCII"K"character
(0x4B)with1startbit,8
databits,1stopbit.Thisis
typicalforstartstop
communications,butthe
standarddoesnotdictatea
characterformatorbit
order.

RS232datalineontheterminalsof
thereceiverside(RxD)probedbyan
oscilloscope(foranASCII"K"
character(0x4B)with1startbit,8
databits,1stopbitandnoparity
bits).

Connectors
RS232devicesmaybeclassifiedasDataTerminalEquipment(DTE)orDataCommunicationEquipment
(DCE)thisdefinesateachdevicewhichwireswillbesendingandreceivingeachsignal.Thestandard
recommendedbutdidnotmakemandatorytheDsubminiature25pinconnector.Accordingtothestandard,
maleconnectorshaveDTEpinfunctions,andfemaleconnectorshaveDCEpinfunctions.Otherdevicesmay
haveanycombinationofconnectorgenderandpindefinitions.Manyterminalsweremanufacturedwithfemale
connectorsbutweresoldwithacablewithmaleconnectorsateachendtheterminalwithitscablesatisfiedthe
recommendationsinthestandard.Thestandardspecifies20differentsignalconnections.Sincemostdevicesuse
onlyafewsignals,smallerconnectorscanoftenbeused.
PersonalcomputermanufacturersreplacedtheDB25MconnectorbythesmallerDE9Mconnector.Different
pinnumberswereusedforthesignals(forthisseeserialport).Thisconnector,withvaryingpinouts,became
commonforpersonalcomputersandrelateddevices.
http://en.wikipedia.org/wiki/RS232

5/12

25/3/2015

RS232Wikipedia,thefreeencyclopedia

Presenceofa25pinDsubconnectordoesnotnecessarilyindicateanRS232Ccompliantinterface.For
example,ontheoriginalIBMPC,amaleDsubwasanRS232CDTEport(withanonstandardcurrentloop
interfaceonreservedpins),butthefemaleDsubconnectoronthesamePCmodelwasusedfortheparallel
Centronicsprinterport.Somepersonalcomputersputnonstandardvoltagesorsignalsonsomepinsoftheir
serialports.

Signals
ThefollowingtablelistscommonlyusedRS232signalsandpinassignments.[9]Seeserialport(pinouts)for
nonstandardvariationsincludingthepopularDE9connector.
Signal
Name

Typicalpurpose

DB
25
Abbreviation DTE DCE pin
Origin

Data
Terminal
Ready

IndicatespresenceofDTEtoDCE.

DTR

Data
Carrier
Detect

DCEisconnectedtothetelephoneline.

DCD

DataSet
Ready

DCEisreadytoreceivecommandsordata.

DSR

Ring
Indicator

DCEhasdetectedanincomingringsignalonthe
telephoneline.

RI

22

RequestTo
DTErequeststheDCEpreparetoreceivedata.
Send

RTS

ClearTo
Send

CTS

IndicatesDCEisreadytoacceptdata.

Transmitted
CarriesdatafromDTEtoDCE.
Data

TxD

Received
Data

RxD

CarriesdatafromDCEtoDTE.

20

5
2

Common
Ground

GND

common

Protective
Ground

PG

common

ThesignalsarenamedfromthestandpointoftheDTE.Thegroundsignalisacommonreturnfortheother
connections.TheDB25connectorincludesasecond"protectiveground"onpin1.
Datacanbesentoverasecondarychannel(whenimplementedbytheDTEandDCEdevices),whichis
equivalenttotheprimarychannel.Pinassignmentsaredescribedinfollowingtable:

http://en.wikipedia.org/wiki/RS232

6/12

25/3/2015

RS232Wikipedia,thefreeencyclopedia

Signal

Pin

CommonGround

7(sameasprimary)

SecondaryTransmittedData(STD)

14

SecondaryReceivedData(SRD)

16

SecondaryRequestToSend(SRTS) 19
SecondaryClearToSend(SCTS)

13

SecondaryCarrierDetect(SDCD)

12

RingIndicator'(RI),isasignalsentfromthemodemtotheterminaldevice.Itindicatestotheterminaldevice
thatthephonelineisringing.Inmanycomputerserialports,ahardwareinterruptisgeneratedwhentheRIsignal
changesstate.Havingsupportforthishardwareinterruptmeansthataprogramoroperatingsystemcanbe
informedofachangeinstateoftheRIpin,withoutrequiringthesoftwaretoconstantly"poll"thestateofthepin.
RIisaonewaysignalfromthemodemtotheterminal(ormoregenerally,theDCEtotheDTE)thatdoesnot
correspondtoanothersignalthatcarriessimilarinformationtheoppositeway.
OnanexternalmodemthestatusoftheRingIndicatorpinisoftencoupledtothe"AA"(autoanswer)light,
whichflashesiftheRIsignalhasdetectedaring.TheassertedRIsignalfollowstheringingpatternclosely,which
canpermitsoftwaretodetectdistinctiveringpatterns.
TheRingIndicatorsignalisusedbysomeolderuninterruptiblepowersupplies(UPS's)tosignalapowerfailure
statetothecomputer.
Certainpersonalcomputerscanbeconfiguredforwakeonring,allowingacomputerthatissuspendedto
answeraphonecall.

Cables
Thestandarddoesnotdefineamaximumcablelengthbutinsteaddefinesthemaximumcapacitancethata
compliantdrivecircuitmusttolerate.Awidelyusedruleofthumbindicatesthatcablesmorethan50feet(15m)
longwillhavetoomuchcapacitance,unlessspecialcablesareused.Byusinglowcapacitancecables,fullspeed
communicationcanbemaintainedoverlargerdistancesuptoabout1,000feet(300m).[10]Forlonger
distances,othersignalstandardsarebettersuitedtomaintainhighspeed.
Sincethestandarddefinitionsarenotalwayscorrectlyapplied,itisoftennecessarytoconsultdocumentation,
testconnectionswithabreakoutbox,orusetrialanderrortofindacablethatworkswheninterconnectingtwo
devices.ConnectingafullystandardcompliantDCEdeviceandDTEdevicewoulduseacablethatconnects
identicalpinnumbersineachconnector(asocalled"straightcable")."Genderchangers"areavailabletosolve
gendermismatchesbetweencablesandconnectors.Connectingdeviceswithdifferenttypesofconnectors
requiresacablethatconnectsthecorrespondingpinsaccordingtothetableabove.Cableswith9pinsonone
endand25ontheotherarecommon.Manufacturersofequipmentwith8P8Cconnectorsusuallyprovidea
cablewitheitheraDB25orDE9connector(orsometimesinterchangeableconnectorssotheycanworkwith
multipledevices).Poorqualitycablescancausefalsesignalsbycrosstalkbetweendataandcontrollines(such
asRingIndicator).
Ifagivencablewillnotallowadataconnection,especiallyifagenderchangerisinuse,anullmodemcablemay
benecessary.Genderchangersandnullmodemcablesarenotmentionedinthestandard,sothereisno
officiallysanctioneddesignforthem.

http://en.wikipedia.org/wiki/RS232

7/12

25/3/2015

RS232Wikipedia,thefreeencyclopedia

Conventions
Forfunctionalcommunicationthroughaserialportinterface,conventionsofbitrate,characterframing,
communicationsprotocol,characterencoding,datacompression,anderrordetection,notdefinedinRS232,
mustbeagreedtobybothsendingandreceivingequipment.Forexample,considertheserialportsofthe
originalIBMPC.Thisimplementationusedan8250UARTusingasynchronousstartstopcharacterformatting
with7or8databitsperframe,usuallyASCIIcharactercoding,anddataratesprogrammablebetween75bits
persecondand115,200bitspersecond.Dataratesabove20,000bitspersecondareoutofthescopeofthe
standard,althoughhigherdataratesaresometimesusedbycommerciallymanufacturedequipment.Sincemost
RS232devicesdonothaveautomaticbaudratedetection,usersmustmanuallysetthebaudrate(andallother
parameters)atbothendsoftheRS232connection.
Intheparticularcaseofthe8250UARTusedbytheIBMPCandothers,baudrateswereprogrammableby
writingintegervaluestoadividerregisterandbyselectingoneofseveralclockprescalersforthedivider.This
allowedaPCtobeconnectedtodevicesusingratesotherthanthosestandardizedformodems.Notallbaud
ratescanbeprogrammed,duetotheclockfrequencyofthe8250UARTinthePC,andthegranularityofthe
baudratesetting.ThisincludesthebaudrateofMIDI,31,250bitspersecond,whichisnotachievablebya
standardIBMPCserialport.[11]MIDItoRS232interfacesdesignedfortheIBMPCincludebaudrate
translationhardwaretoadjustthebaudrateoftheMIDIdatatosomethingthattheIBMPCcansupport,for
example19,200or38,400bitspersecond.

RTS/CTShandshaking
Intypicalapplication,theDTEassertsRTStoindicatethatitisreadytoreceivedatafromtheDCE,andthe
DCEassertsCTStoindicatethatitisreadytoreceivedatafromtheDTE.Thisiscalled"RTS/CTS
handshaking"andisanexampleofhardwareflowcontrol.However,"hardwareflowcontrol"inthedescription
oftheoptionsavailableonanRS232equippeddevicedoesnotalwaysmeanRTS/CTShandshaking.
Notethatequipmentusingthisprotocolmustbepreparedtobuffersomeextradata,sinceatransmissionmay
havebegunjustbeforethecontrollinestatechange.
ThisisnottheoriginalmeaningofRTS,whichisconsistentwithitsname("requesttosend").
Inolderversionsofthespecification,RS232'suseoftheRTSandCTSlinesisasymmetric:TheDTEasserts
RTStoindicateadesiretotransmittotheDCE,andtheDCEassertsCTSinresponsetograntpermission.
ThereisnowayfortheDTEtoindicatethatitisunabletoacceptdatafromtheDCE.ThisuseofRTS/CTS
allowsforhalfduplex(onedirectionatatime)modemsthatdisabletheirtransmitterswhennotrequired,and
musttransmitasynchronizationpreambletothereceiverwhentheyarereenabled.Suchmodemsarenolonger
incommonuse.
ThisschemeisalsoemployedonpresentdayRS232toRS485converters.RS485isamultipleaccessbus
onwhichonlyonedevicecantransmitatatime,aconceptthatisnotprovidedforinRS232.TheRS232
deviceassertsRTStotelltheconvertertotakecontroloftheRS485bussothattheconverter,andthusthe
RS232device,cansenddataontothebus.
ThesymmetricRTS/CTShandshakingalternativewasdevelopedandmarketedbyvariousequipment
manufacturersbeforeitwasincorporatedinRS232.ItwaseventuallycodifiedinversionRS232E(actually
TIA232Ebythattime)bydefininganewsignal,"RTR(ReadytoReceive),"whichisCCITTV.24circuit
133.TIA232Eandthecorrespondinginternationalstandardswereupdatedtoshowthatcircuit133,when
implemented,sharesthesamepinasRTS(RequesttoSend),andthatwhen133isinuse,RTSisassumedby
theDCEtobeONatalltimes.[12]
http://en.wikipedia.org/wiki/RS232

8/12

25/3/2015

RS232Wikipedia,thefreeencyclopedia

3wireand5wireRS232
Aminimal"3wire"RS232connectionconsistingonlyoftransmitdata,receivedata,andground,iscommonly
usedwhenthefullfacilitiesofRS232arenotrequired.Evenatwowireconnection(dataandground)canbe
usedifthedataflowisoneway(forexample,adigitalpostalscalethatperiodicallysendsaweightreading,ora
GPSreceiverthatperiodicallysendsposition,ifnoconfigurationviaRS232isnecessary).Whenonlyhardware
flowcontrolisrequiredinadditiontotwowaydata,theRTSandCTSlinesareaddedina5wireversion.

Seldomusedfeatures
TheEIA232standardspecifiesconnectionsforseveralfeaturesthatarenotusedinmostimplementations.
Theiruserequires25pinconnectorsandcables.

Signalrateselection
TheDTEorDCEcanspecifyuseofa"high"or"low"signalingrate.Theratesaswellaswhichdevicewillselect
theratemustbeconfiguredinboththeDTEandDCE.Theprearrangeddeviceselectsthehighratebysetting
pin23toON.

Loopbacktesting
ManyDCEdeviceshavealoopbackcapabilityusedfortesting.Whenenabled,signalsareechoedbacktothe
senderratherthanbeingsentontothereceiver.Ifsupported,theDTEcansignalthelocalDCE(theoneitis
connectedto)toenterloopbackmodebysettingpin18toON,ortheremoteDCE(theonethelocalDCEis
connectedto)toenterloopbackmodebysettingpin21toON.Thelatterteststhecommunicationslinkaswell
asbothDCE's.WhentheDCEisintestmodeitsignalstheDTEbysettingpin25toON.
Acommonlyusedversionofloopbacktestingdoesnotinvolveanyspecialcapabilityofeitherend.Ahardware
loopbackissimplyawireconnectingcomplementarypinstogetherinthesameconnector(seeloopback).
LoopbacktestingisoftenperformedwithaspecializedDTEcalledabiterrorratetester(orBERT).

Timingsignals
Somesynchronousdevicesprovideaclocksignaltosynchronizedatatransmission,especiallyathigherdata
rates.TwotimingsignalsareprovidedbytheDCEonpins15and17.Pin15isthetransmitterclock,orsend
timing(ST)theDTEputsthenextbitonthedataline(pin2)whenthisclocktransitionsfromOFFtoON(soit
isstableduringtheONtoOFFtransitionwhentheDCEregistersthebit).Pin17isthereceiverclock,or
receivetiming(RT)theDTEreadsthenextbitfromthedataline(pin3)whenthisclocktransitionsfromONto
OFF.
Alternatively,theDTEcanprovideaclocksignal,calledtransmittertiming(TT),onpin24fortransmitteddata.
DataischangedwhentheclocktransitionsfromOFFtoONandreadduringtheONtoOFFtransition.TTcan
beusedtoovercometheissuewhereSTmusttraverseacableofunknownlengthanddelay,clockabitoutof
theDTEafteranotherunknowndelay,andreturnittotheDCEoverthesameunknowncabledelay.Sincethe
relationbetweenthetransmittedbitandTTcanbefixedintheDTEdesign,andsincebothsignalstraversethe
samecablelength,usingTTeliminatestheissue.TTmaybegeneratedbyloopingSTbackwithanappropriate
phasechangetoalignitwiththetransmitteddata.STloopbacktoTTletstheDTEusetheDCEasthe
frequencyreference,andcorrecttheclocktodatatiming.

http://en.wikipedia.org/wiki/RS232

9/12

25/3/2015

RS232Wikipedia,thefreeencyclopedia

SynchronousclockingisrequiredforsuchprotocolsasSDLC,HDLC,andX.25.

Secondarychannel
Thereisasecondarydatachannel,identicalincapabilitytothefirst.Fivesignals(plusthecommongroundofthe
primarychannel)comprisethesecondarychannel:SecondaryTransmittedData(STD),SecondaryReceived
Data(SRD),SecondaryRequestToSend(SRTS),SecondaryClearToSend(SCTS),andSecondaryCarrier
Detect(SDCD).

Relatedstandards
OtherserialsignalingstandardsmaynotinteroperatewithstandardcompliantRS232ports.Forexample,using
theTTLlevelsofnear+5and0Vputsthemarklevelintheundefinedareaofthestandard.Suchlevelsare
sometimesusedwithNMEA0183compliantGPSreceiversanddepthfinders.
A20mAcurrentloopusestheabsenceof20mAcurrentforhigh,andthepresenceofcurrentintheloopfor
lowthissignalingmethodisoftenusedforlongdistanceandopticallyisolatedlinks.Connectionofacurrent
loopdevicetoacompliantRS232portrequiresaleveltranslator.Currentloopdevicescansupplyvoltagesin
excessofthewithstandvoltagelimitsofacompliantdevice.TheoriginalIBMPCserialportcardimplementeda
20mAcurrentloopinterface,whichwasneveremulatedbyothersuppliersofplugcompatibleequipment.
OtherserialinterfacessimilartoRS232:
RS422(ahighspeedsystemsimilartoRS232butwithdifferentialsignaling)
RS423(ahighspeedsystemsimilartoRS422butwithunbalancedsignaling)
RS449(afunctionalandmechanicalinterfacethatusedRS422andRS423signalsitnevercaughton
likeRS232andwaswithdrawnbytheEIA)
RS485(adescendantofRS422thatcanbeusedasabusinmultidropconfigurations)
MILSTD188(asystemlikeRS232butwithbetterimpedanceandrisetimecontrol)
EIA530(ahighspeedsystemusingRS422orRS423electricalpropertiesinanEIA232pinout
configuration,thuscombiningthebestofbothsupersedesRS449)
EIA/TIA5618PositionNonSynchronousInterfaceBetweenDataTerminalEquipmentandData
CircuitTerminatingEquipmentEmployingSerialBinaryDataInterchange
EIA/TIA562ElectricalCharacteristicsforanUnbalancedDigitalInterface(lowvoltageversionof
EIA/TIA232)
TIA574(standardizesthe9pinDsubminiatureconnectorpinoutforusewithEIA232electrical
signalling,asoriginatedontheIBMPC/AT)

Developmenttools
WhendevelopingortroubleshootingsystemsusingRS232,closeexaminationofhardwaresignalscanbe
importanttofindproblems.AseriallineanalyzerisadevicesimilartoalogicanalyzerbutspecializedforRS
232'svoltagelevels,connectors,and,whereused,clocksignals.Theseriallineanalyzercancollect,store,and
displaythedataandcontrolsignals,allowingdeveloperstoviewthemindetail.Somesimplydisplaythesignals
aswaveformsmoreelaborateversionsincludetheabilitytodecodecharactersinASCIIorothercommon
http://en.wikipedia.org/wiki/RS232

10/12

25/3/2015

RS232Wikipedia,thefreeencyclopedia

codesandtointerpretcommonprotocolsusedoverRS232suchasSDLC,HDLC,DDCMP,andX.25.
Seriallineanalyzersareavailableasstandaloneunits,assoftwareandinterfacecablesforgeneralpurposelogic
analyzersandoscilloscopes,andasprogramsthatrunoncommonpersonalcomputersanddevices.

References
1. ^abEIAstandardRS232C:InterfacebetweenDataTerminalEquipmentandDataCommunication
EquipmentEmployingSerialBinaryDataInterchange.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.TelecommunicationsIndustry
Association.Retrieved28July2011.
5. ^S.Mackay,E.Wright,D.Reynders,J.Park,PracticalIndustrialDataNetworks:Design,Installationand
Troubleshooting,Newnes,2004ISBN075065807X,pages4142
6. ^Horowitz,PaulWinfieldHill(1989).TheArtofElectronics(2nded.).Cambridge,England:Cambridge
UniversityPress.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. ^InfoWorld30Mar1992page80
12. ^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:49249@lllwinken.LLNL.GOV
(news:49249@lllwinken.LLNL.GOV).Retrieved20140203.

Furtherreading
SerialPortComplete:COMPorts,USBVirtualCOMPorts,andPortsforEmbeddedSystems
2ndEditionJanAxelsonLakeviewResearch380pages2007ISBN9781931448062.

Externallinks
Retrievedfrom"http://en.wikipedia.org/w/index.php?title=RS
232&oldid=651814615"
Categories: Telecommunicationsequipment
http://en.wikipedia.org/wiki/RS232

WikimediaCommonshas
mediarelatedtoRS232.
Wikibookshasabookon
thetopicof:Serial
11/12

25/3/2015

RS232Wikipedia,thefreeencyclopedia

Computerhardwarestandards Networkingstandards

Programming:RS232
Connections

Thispagewaslastmodifiedon17March2015,at18:39.
TextisavailableundertheCreativeCommonsAttributionShareAlikeLicenseadditionaltermsmay
apply.Byusingthissite,youagreetotheTermsofUseandPrivacyPolicy.Wikipediaisaregistered
trademarkoftheWikimediaFoundation,Inc.,anonprofitorganization.

http://en.wikipedia.org/wiki/RS232

12/12

Das könnte Ihnen auch gefallen