⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 60838

📁 神经网络昆斯林的新闻组分类2006
💻
字号:
Path: cantaloupe.srv.cs.cmu.edu!crabapple.srv.cs.cmu.edu!fs7.ece.cmu.edu!europa.eng.gtefsd.com!howland.reston.ans.net!zaphod.mps.ohio-state.edu!uwm.edu!caen!nigel.msen.com!fmsrl7!glangFrom: glang@slee01.srl.ford.com (Gordon Lang)Newsgroups: comp.sys.ibm.pc.hardwareSubject: Re: HOW is a Null Modem Cable?Date: 21 Apr 1993 17:36:03 GMTOrganization: Ford Motor Company Research LaboratoryLines: 134Message-ID: <1r40m7INNblq@fmsrl7.srl.ford.com>References: <1993Apr20.174525.5046@vax.cns.muskingum.edu>NNTP-Posting-Host: slee01.srl.ford.comX-Newsreader: Tin 1.1 PL5Kevin Kimmell - Computer Science/German Undergrad (ke_kimmell@vax.cns.muskingum.edu) wrote:: : 	I am interrested in the extrodinarily simple concept of the null modem: cable. (Actually I have NO idea, so don't count that last statement.)  What I'm: asking is what pins does it use (or what are it's specifications?)  I just want: to solder one myself instead of buying one.  I don't even know what port is: used.: : Help me please (at ke_kimmell@vax.cns.muskingum.edu): : Kevin: : p.s.  I'm intending to use the cable for PC-to-PC transfers (via Lap-Link or: Telix.  Ideas and info gladly accepted.)I do not have specific knowledge of Lap-Link or Telix, but my recommendationfor ANY package is to follow each one's instructions for making the null-modem cable.  The reason is that each one may be different since there isn'treally a standard for PC to PC communications.  The following is a tutorialI wrote up that will give you an understanding about RS-232 and null modems,but you should still check your software!I will eplain a couple of details of RS-232.  RS-232 isa commumications specification for communicating between a computer and amodem.  Actually it can be between any end system and any communicationshardware.  The terminology used is Data Terminal Equipment (DTE) and DATACommunications Equipment (DCE).  RS-232 spells out the voltage levels, theconnector type, the pinouts, and the signal protocols.  The connector isa "DB-25" but IBM has set an alternative "standard" of DB-9.  The primarysignals are Transmit Data (TD), Recieve Data (RD), and Signal Ground (SG).There are other signals that provide control between the DTE and the DCE.For example, the DTE announces that it is powered up and ready to participatein communications via the Data Terminal Ready (DTR) signal.  DTR is anoutput on the DTE and an input on the DCE.  Similarly, the DCE announces thatit is ready to participate in communications via the Data Set Ready (DSR)signal.  DSR is an input on the DTE and an output on the DCE.  Ok that'sfive signals; there are only four more of interest.  The Request To Send (RTS)signal is an output from the DTE (and an input to the DCE) that is usedto ask the DCE permission to send data.  If the DCE agrees, it sends an okvia the Clear To Send (CTS) signal.  (For completeness, the CTS is an inputto the DTE and an output from the DCE).  The other two signals (of interest)are Ring Indicator (RI) and Data Carrier Detect (DCD).  These are both inputsto the DTE and outputs from the DCE.  RI is just what you would expect -a signal to the DTE saying that someone is attempting to establish a connectionto the DCE.  This is rather specific to the modem / telephone line setup.DCD is a way for the DCE to announce that the "connection" has been establishedi.e. the local DCE is talking to some remote DCE.  There - that's it.  Ohthere are many other RS-232 signals defined, but they are obsolete.  I haveexplained the nine signals that are on a PC.  The pinouts are as follows:Name    DB-9     DB-25 SG       5        7 TD       3        2 RD       2        3DTR       4       20DSR       6        6DCD       1        8RTS       7        4CTS       8        5 RI       9       22Now to address your problem at hand.  When you connect a PC to a PC (a DTEto a DTE), there is no DCE pair in the middle and therefore the RS-232signal definitions don't work out quite right.  There is no DCE to assertthe CTS, DSR, DCD, or RI.  So the common thing to do is to not use thesesignals at all - and also forget about the DTR and RTS outputs as well.  Ifthis is done you simply make a null modem (a cable) that passes through SG,and crosses TD and RD (i.e. pin 2 of one end connects to pin 3 at the otherend, etc).  The problem with this solution is that a PC that wants to senddata has no way of knowing if the other PC is ready.  It would have to justsend the data and hope it got through.  Therefore a better null modem wouldinclude the DTR/DSR pair crossed.  A particular point a confusion is in thesoftware area.  Just because you run the wires does not mean that the soft-ware will use them.  If you are using the built-in BIOS to control theserial port, then the BIOS dictates what wires you need and how they are tobe used.  But if you have a comm. package such as Brooklyn Bridge, or Lap-Link or Telix, then those packages dictate the cabling requirements.  Theonly thing you can guess reliably is the SG, TD, and RD.  The DTR/DSR is alsofairly common.  There is one more issue that needs to be addressed here.  Andthat is flow control.  In the RS-232 scenerio, the DCE's are responsible forflow control and it is assumed that the DCE couldn't possible over-run theDTE.  By this I mean that as long as the DTE has its DTR line asserted, theDCE will send data - without requesting permission first.  Note the contrastto the other direction of data flow: the DTE must request permission byasserting the RTS line and it must wait for the CTS signal before it cansend.  And now in the DTE to DTE scenerio, the question is do you need flowcontrol?  The answser is usually.  But how?  For non-binary communications,one common technique is XON - XOFF which is implemented in software - nowires are dedicated to flow control; the TD and RD carry the XON and XOFFcommands.  This type of flow control can be used in addition to hardwareflow control, but the problem is that you can't send binary data becauseyour data might include the XON or XOFF codes and cause erroneous conrolsignals.  (A work around is to have the software insert and extract "escape"codes, but the hardware flow control is prefered).  The problem with hard-ware flow control is that there is no standard.  There are lots of ways todo it and I bet they have all been tried.  One cornerstone of all the methodsis to use the RTS/CTS for one direction.  But beyond that anything is fairgame.  Again, you must look to you comm package for cabling requirements.But I bet you'll find that one cable (if wired properly) could work withall of the packages as long as they are of the same vintage.  By the way,I am familiar with one package that uses RTS/CTS and DTR/DSR for flow controlthe RTS is request to send and the DTR is ready to recieve, the CTS is theclear to send and the DSR is the request to recieve.  This does not mean adiffernt cable - it is just software.  The clincher to all of this cablingstuff is that it is common to have the UART directly controlled by the CTSsignal which means that the CTS must be present even if you are not support-ing it in software.  For these cases you will find cables that short theRTS to the CTS at the same end (or perhaps the DTR to the CTS).  Otherpossible shorting might be done just because the software expects certainsignals that you don't have (or don't feel like providing because it wouldmean additional wires).  Specifically I am talking about the DSR.  Shortingthe DTR to the DSR is not a good idea in general but you may find cables likethis.  It is a bad idea because it defeats the whole purpose.  One more"gotcha" signal is the DCD.  Some software (including the PC BIOS) expects tosee the DCD before it will work.  This signal sometimes gets shorted with theDTR.  But my favorite null modem has the RTS and CTS shorted at each end, butthe RTS is also connected through to the other end and connected to DCD.  Andof course the DTR/DSR are crossed as are the TD/RD and of course the SG mustpass through.  This null modem works with most software.  The flow control,if any, can use the RTS/DCD with the DTR/DSR.  If your comm. package does notspecify the cable required for PC to PC connection, then I suggest you usethis one.    TD  ------  RD    RD  ------  TD    DTR ------ DSR    DSR ------ DTR    DCD ------ RTS-\  /-RTS ------ DCD |  \-CTS        CTS-/Gordon Lang

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -