chris@okstate.UUCP (04/01/87)
I have been playing with the serial prot on mi Amiga, and have discovered something really strange. I can transmit through the rec. line! I couldn't figure out why my project wouldn't talk to the Amiga but the amiga could talk to it. I discovered I had the lines switched. Now why does this happen? I don't have the schematics for this beast, so I am clueless as to why this works. None of my other machines do this..... Is my Amiga sick. It seems to work fine other than this weirdness.
phils@tekigm2.UUCP (04/02/87)
In article <1818@a.cs.okstate.edu> chris@a.cs.okstate.edu (Chris Schuermann) writes: > >I have been playing with the serial prot on mi Amiga, and have >discovered something really strange. I can transmit through the rec. >line! I couldn't figure out why my project wouldn't talk to the Amiga >but the amiga could talk to it. I discovered I had the lines switched. >Now why does this happen? I don't have the schematics for this beast, >so I am clueless as to why this works. None of my other machines do >this..... >Is my Amiga sick. It seems to work fine other than this weirdness. > > No problem here. The problem is in the definition of signals conforming to the RS-232 standard. RS-232 devices come in two flavors: DCE (Data Communication Equipment) and DTE (Data Terminal Equipment). You must always connect a DTE to a DCE. (There is a way to get around this, which I'll talk about later) The pins are numbered and labelled the same on connectors for both varieties of equipment. Pins 2 and 3, called "Transmitted data" and "Received data" are named from the point of view of a DTE. This means that on a DTE, Transmitted data is an output and Received data is an input. (The namings aren't quite so obvious, but you have the same situation on the CTS/RTS (pins 4 and 5) and DTR/DSR (pins 6 and 20) pairs) Now there is a hitch when we get to the DCE end. Obviously, the signal which was an output at the DTE end must be an input at the DCE end, and vice-versa. This could be handled in several ways. First, the pins could be named differently at the DTE and TCE ends: Pin DTE name DCE name 2 Transmitted data (TD) Received data (RD) 3 Received data (RD) Transmitted data (TD) The second option would be to legislate that all RS-232 cables have a built in swap of pins 2 and 3, 4 and 5, and 6 and 20. The third option (the one which was implemented) is to live with an input being called Transmitted Data and an output being called Received Data on one end or the other. How do you decide which end gets labelled correctly? Flip a coin, I guess. As I mentioned before, the DTE end is correctly labelled. This means that any time you come across a DCE (typically computers and modems) count on RD being an output. Terminals and printers (and probably virtually anything else) will be DTEs and RD will be an input. If you ever want to connect a DCE to another DCE (or DTE to a DTE) you'll need to build a cable which reverses pins 2 and 3 (also 4-5 and 6-20 if you need them). This type of cable is known as a "null modem". (Maybe you've heard the term and didn't know what it was. Well, there is what it is and why it is necessary) Hope this helps. -- ------------------------------------------------------------------------------- Phil Staub tektronix!tekigm!phils (206) 253-5634 Tektronix, Inc., ISI Engineering P.O.Box 3500, M/S C1-904, Vancouver, Washington 98668