资源描述:
《RS-232为一种serial》由会员上传分享,免费在线阅读,更多相关内容在教育资源-天天文库。
1、RS-232簡介:RS-232為一種serialportstandard,目前所普遍使用的為RS-232-C,於1969年由EIA(ElectronicIndustriesAssociation)所制定。在此之前還有RS-232-A與RS-232-B兩個standard,但已經不被使用。目前在PC(IBM相容或是Mac)上都有符合RS-232-Cstandard的serialport的蹤跡,就算在有其他serialport如USB、IEEE1394等問世的今日,RS-232-Cstandardserialport依
2、然在工業領域上佔有重要的地位。RS-232standard規範內容:1.Electronic/SignalCharacteristic:Voltagelevels,Signalingrate,Timing,Slew-rateofsignals,Voltagewithstandlevel,short-circuitbehavior,maximumstraycapacitance,cablelength.2.MechanicCharacteristic:Pluggableconnectorsandpinidentifi
3、cation.3.Functionsofeachcircuitintheinterfaceconnector.4.Standardsubsetsofinterfacecircuitsforselectedtelecomapplications.RS-232standard未規範內容:1.Characterencoding(forexample,ASCII,BaudotorEBCDIC)2.Theframingofcharactersinthedatastream(bitspercharacter,start/sto
4、pbits,parity)3.Protocolsforerrordetectionoralgorithmsfordatacompression.4.Bitratesfortransmission,althoughthestandardsaysitisintendedforbitrateslowerthan20,000bitspersecond.Manymoderndevicessupportspeedsof115,200bpsandabove.5.Powersupplytoexternaldevices.DTE&D
5、CE:在溝通上可分為DTE(DataTerminalEquipment)端和DCE(DataCommunicatingEquipment),DTE端為大多為Terminal(多半為PC),DCE端大多為device(大多為printer,modem…等),在DTE端,其pin為male(俗稱公接頭),相反地在DCE端,其pin則為female(俗稱母接頭)。原始的RS-232-Cstandard定義了22個signal,但其pin數目卻為25,故有3個pin並沒有assign功能。但並不是每個device都會使用到
6、所有的signal,大多都只使用以下的8個signal:•TransmittedData(TxD) –DatasentfromDTEtoDCE.•ReceivedData(RxD) –DatasentfromDCEtoDTE.•RequestToSend(RTS) –Asserted(setto0)byDTEtoprepareDCEtoreceivedata.ThismayrequireactiononthepartoftheDCE,e.g.transmittingacarrierorreversingthedir
7、ection•ClearToSend(CTS) –AssertedbyDCEtoacknowledgeRTSandallowDTEtotransmit.•DataTerminalReady(DTR) –AssertedbyDTEtoindicatethatitisreadytobeconnected.IftheDCEisamodem,thismay"wakeup"themodem,bringingitoutofapowersavingmode.Thisbehaviourisseenquiteofteninmoder
8、nPSTNandGSMmodems.Whenthissignalisde-asserted,themodemmayreturntoitsstandbymode,immediatelyhangingupanycallsinprogress.•DataSetReady(DSR) –AssertedbyDCEtoindicateanactiveconnection