braner@batcomputer.tn.cornell.edu (braner) (07/06/87)
[This is not specific to comp.sys.atari.st. If you know the most appropriate group please tell me.] My friend Richard Furnas has devised a wonderful solution to the age-old DCE/DTE dichotomy. Devices set up to fit his standard are all the same, and any two can talk to each other with the same cable. And his method uses compact, positive-locking but easy to (dis)connect, inexpensive, widely available connectors and cables. I am posting this for him since he has no access to Usenet. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Handy Dandy Serial Connections with Modular Connectors ------------------------------------------------------ By Richard Furnas For some time now I have been evolving a system for connecting RS232 serial devices using modular connectors. The arrangement I am reporting here is the result of much thought and experimentation. I have been delighted with the elegance of the modular connectors ever since they appeared and hope this adaptation of them does justice to the elegance of the design of the connectors themselves. Rationale for the setup: ======================== When I first looked closely at modular connectors and the way that telephone extension cords are wired, I thought it was all very sad. While the connectors are polarized (can only plug in one way), the usual extension cord flips things over seemingly ignoring the polarization in the plugs! I knew the phone people spoke of RING and TIP but from my experience with playing with installing my own phone lines in my house, it never seemed to matter which way things were hooked up, they always worked anyway (Diodes no doubt). It wasn't until I started to think about the RS232 application that I realized the simple elegance of the modular adapters and plugs: All devices are the same, and the cables do the swapping so RING and TIP retain their identity. While the RED and GREEN lines in the building may remain true to which is which (they are installed by professionals who know their colors and maybe even carry voltmeters), the cables are 'smart' enough not to care. The minimal Serial connection requires 3 wires, Ground, data in and data out of each device. This is a symmetric situation: ______ ______ | |====Data===>| | |device|===Ground===|device| | |<===Data====| | ------ ------ At first I knew that 95% of the direct connections I wanted to make would be 3-wire connections and so wanted to set things up to be able to use ordinary phone cabling. But which lines to use and how? I took a tip (TIP?) from the phone setup: Make all devices the same and let the cables do the thinking. If we are to use telephone-style connectors, it is important to protect the computer devices from the higher voltage of the phone line in case the cable is plugged into a phone outlet by mistake. Most simple telephone lines have 4 wires and only the center two have the higher voltage of the phone line. The outer two are either totally unused or have a lower voltage for lighting your princess phone. Therefore I short the center two lines together and use them for the signal ground. This solves two problems. If the connector gets plugged into the typical phone outlet, it merely "takes the phone off the hook" and does no damage to the computer device. It also makes the cable symmetrical. The outer two lines can be used for the data lines. If two devices are configured identically at their respective connectors, an ordinary telephone-to-wall cable will serve as the 'null modem' cable for a three wire connection between the devices. But there is more to serial data transfer than just three wire connections. Many serial printers prefer a hardware handshake. This requires another wire and hardware handshake can naturally be symmetrical as well. Talking to a printer is usually a one-way affair but two computers may want to talk that way on occasion as well. (Ever want to capture EXACTLY the output intended for a printer and put it in a file?) The standard modular line cord (NOT handset cord) uses a 6-position connector with only the middle four of the positions actually occupied by wires. This is called "6-4". "6-6" versions of the connectors along with the 6-conductor cable are harder to come by but can be had from several of the parts vendors that advertise in the back of BYTE or Computer Shopper. This extra pair of wires preserves the symmetry of the connection and means that once again the business of swapping lines can be done by a uniform, standard cable. The 6-6 setup may not provide adequate handshaking for use with some modems and modem programs since they actually use the additional handshake lines to determine the progress of the call. MODULARS232 Specifications ========================== Imagine (if necessary) that you are sitting at a desk, and you have a standard modular desk telephone on the desk. Rotate it 180 degrees so that you see the connector on its back. Unplug the cable. Look into the socket. It will most likely have the wires on the top and the notch for the locking clip on the bottom. (If it doesn't, turn it upside down.) Now imagine that this phone is actually a computer (or printer or graphics tablet or...). If it conforms to the "MODULARS232" standard, the wires, as you're looking at them, are wired as follows (the mnemonics are introduced here): A T G G R Q __+_+_+_+_+_+__ <A> (Acknowledge) handshake signal coming out | | | | | | | | <T> (Transmit) data coming out of this box | | <G> Ground | | <G> Ground | | <R> (Receive) data going into this box | | <Q> (Query) handshake signal going into this box ----- ----- | | (looking into the socket from outside the box) --- If, when this socket is vacant, you can measure live voltage (12V) between the ground wires and the R or Q wires then you got it reversed: "coming out" means the box applying voltage to the outside world, "going in" means sensing the voltage that is arriving. For the time being we have to live with existing equipment, so the MODULARS232 set-up has to be achieved by making "adaptors". I have set up this system for communications between arbitrary pairs of the following devices, using the pin assignments given below. The lists are the numbers of the pins (in the conventional connectors mentioned) that should be wired to the A,T,G,G,R,Q wires respectively inside a modular socket to make the correct adaptor. Basically DTE Devices: ====================== IBM PC-XT Clones (DB25P Connector on Chassis) 20,2,7,7,3,5; Jumper: 4-6-8 on DB25S (Note 1) IBM PC-AT Clones (DB9P Connector on Chassis) 4,3,5,5,2,8; Jumper: 1-6-7 on DB9S (Note 1) TRS-Model 102 (DB25S Connector on Chassis) 20,2,7,7,3,5; Jumper: 4-6-8 on DB25P (Note 1) HP-IL to Serial Convertor (DTE Setting, DB25P on Chassis) 20,2,7,7,3,5; Jumper: 4-6-8 on DB25S (Note 1) HP Thinkjet (TM) serial printer (DB25S on Chassis) HP 7475 (TM) Serial Plotter (DB25S on Chasis) 20,2,7,7,3,5; Jumper: 4-6-8 on DB25P (Note 1) Basically DCE Devices: ====================== Prometheus Promodem (TM) 1200 (to Eagle w/ MITE and to MAC) 8,3,7,7,2,20 (Notes 2,3) Intectra Serial to Parallel Converter 5,3,7,7,2,20 DTE or DCE? Who cares, here's the connection: ============================================== Eagle (TM) II CP/M Computer 4,3,7,7,2,5; (Note 2) Macintosh with DB9 Socket Mac+ with mini8 to DB9 Socket converter Imagewriter II with mini8 to DB9 Socket converter 6,5,3-8,3-8,9,7; (Note 2) Note 1: ======= For many applications it is not necessary to jumper pins 4-6-8. Especially in direct connect applications which are using software handshaking, the driver software often will ignore the status of the hardware handshake pins anyway. Note 2: ======= Some devices (notably some computers) do not support proper hardware handshake on data input. (Note this is the 'A' line on which the computer could output a signal saying it is full for the moment.) The Eagle II and Macintosh fall in this category. The connections above are compatible with driving printers and all 'three wire' connections and even allow the same connectors to be used to the Prometheus modem. (The MAC just has the +12V line connected signalling the MAC is as ready as it will ever be.) Note 3: ======= The best way to drive an honest to gosh modem if you have a device which supports the modem handshake lines properly (e.g. a PC clone), is with a cable with more wires in it than this modular setup. Practical hints =============== In practice what I have done is wire a cable for each of my desktop machines which has the DB-whatever connector on one end and a modular PLUG on the other. (If I need to connect something I'm going to need some length of cable as well so might as well build it into the adaptor.) Then I just need a double female modular connector to establish the connection. On highly portable devices, I have the DB- whatever and a modular socket. Actually I have cut holes in them and installed the socket in the chassis without any jumpering (so the port can still be fully functional). The modular plug on any of the desktop machines now goes to the socket I have built in my Model 102 for example. To summarize pictorially looking into the socket: _Handshake_ ... Hardware handshake support with 6-6 | _DATA__ | ... 3-wire connection with ordinary 6-4 | | GND | | ... take phone off hook-won't fry device | | | | | | A T G-G R Q ... Our new mnemonics R T G-G R C } T X N-N X T } ... RS232 (DTE) Signal names (sort of) S D D-D D S } | | | | | | out in ... this side accepts input signals out in ... the other side puts out signals | | ^ ^ v v | | ___ - Just a reminder: /_ Standard flat cable _\ d__=============/ /=============__b And for troubleshooting, if your connection does not work, you will find this cable useful: /_ Inverting cable d__=====================---p --/ I have a 3 inch cable like this I use for troubleshooting (with a double-female on one end). With a 3-wire (6-4 modular) connection this will serve to swap the data transmit and receive lines just in case you got them backwards. Recommendation: If that solves the problem, FIX YOUR CONNECTORS. Otherwise you'll be haunted by the incompatible setup until you do. I suggest using crimp pin DBxxx connectors so that the pins can be easily moved if you get something backwards. Richard E. Furnas Microcomputer Power 111 Clover Lane Ithaca, NY 14850 (607) 272-2188 CompuServe ID 76556,3444 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Moshe Braner
wheels@mks.UUCP (07/08/87)
In article <1620@batcomputer.tn.cornell.edu>, braner@batcomputer.tn.cornell.edu (braner) writes: > My friend Richard Furnas has devised a wonderful solution to the > age-old DCE/DTE dichotomy. > > A T G G R Q > __+_+_+_+_+_+__ <A> (Acknowledge) handshake signal coming out > | | | | | | | | <T> (Transmit) data coming out of this box > | | <G> Ground > | | <G> Ground > | | <R> (Receive) data going into this box > | | <Q> (Query) handshake signal going into this box > ----- ----- > | | (looking into the socket from outside the box) > --- I applaud this attempt to make some sense out of the RS232 mess. (Admittedly, the mess is not RS232's fault -- it was never intended to be used to connect things which are in the same room. Oh well.) I'd like to add a thought -- in keeping with the symmetry of the signals, how about a symmetrical connector? I have seen such things, used mainly for connecting the lights of house trailers to automobiles. They look like this (in ASCII graphics!): ------------------ | Q |===== | R |===== <--- pins ------| G |===== cable | ------ ------| G | | T | <--- holes here for mating pins | A | ------------------------ To be safe, the driven lines should appear on the sockets, so they can't short to nearby things. I have shown the signals, and where they should appear on the connector. Using this type of connector, there is no need for adapters to connect extension cables. ANY CONNECTOR CAN PLUG INTO ANY OTHER! Comments? -- "Network XXIII. Where two's company, and three's an audience." -- Max Headroom Gerry Wheeler {seismo,decvax,ihnp4}!watmath!mks!wheels Mortice Kern Systems Inc.