From: SMTP%"RELAY-INFO-VAX@CRVAX.SRI.COM" 24-JUN-1994 16:30:33.34 To: EVERHART CC: Subj: Connecting printers and other serial devices WAS: how do I get a printer to work with my DecStation and/or VaxStation? Date: 23 Jun 1994 21:33:48 -0400 (EDT) From: Pete Bradley - X9338 Subject: Connecting printers and other serial devices WAS: how do I get a printer to work with my DecStation and/or VaxStation? To: INFO-VAX@SRI.COM Message-id: <940623213348.20411498@evax08.pweh.utc.com> X-Envelope-to: INFO-VAX@SRI.COM Content-transfer-encoding: 7BIT There have been a number or requests similar to this lately, so here's some information on connecting serial devices. This is sort of a hodgepodge of information, but most of the questions have been pretty broad, so it should help. This is intended to be very basic. See the reference at the end for more complete information. CONNECTING AN RS232 (serial) device to the serial port on your computer: SOME TERMS (Note that I'm *really* glossing over the details): Baud rate: this is a measure of how fast data is flowing into and out of a device. In general, the baud rate of the computer must match the baud rate of the printer Parity: Parity checking is a means of checking whether data got corrupted in transmission. Parity settings are typically None, Even, or Odd but there are other less common choices. Character size: Number of data bits used in transmission. Your choices are 7 or 8. Stop bits: Number of bits which act as "space" between characters. Choices are 1, 1.5 and 2. GETTING YOUR COMPUTER AND PRINTER ON SPEAKING TERMS: In order for your computer to talk to your printer, their communication parameters above must be the same. Your computer will have commands to set up the port, and your printer will have switches or setup commands to do the setup. For example, on a VAX, to set device TTA2: up for eight bits, no parity, 9600 baud, you could use the command: SET TERM/PERM/SPEED=9600/NOPARITY For 7 bits, Even parity, 4800 baud, you could use: SET TERM/PERM/SPEED=4800/PARITY=EVEN If you're trying to hook the printer to a LAT port, the idea is similar, but there are other LAT settings required. If you're trying to hook up a printer, you'll probably want to set up a print queue for it. Get out your printer handbook and find out how to set its communication params first. When you have them set up (or at least know what the settings are), set your computer to match. GETTING THE !&!$@#%!@ WIRE CONNECTED: Now you've got two devices that are set up to talk the same way, you can plug them together! This can be a nuisance. There's a connector on your station and a connector on your printer. Are they the same type? The most common is the 25-pin D-shell, but anything is possible. The three wires in your connector that you must have are TRANSMIT (known as TD), RECEIVE (RD), and signal ground (SG). In a 25-pin D shell, pin 2 is TD, pin 3 is RD, and pin 7 is SG. You want a cable that sends TD to RD, RD to TD, and SG to SG like: TD -- -- TD COMPUTER \/ PRINTER /\ RD -- -- RD SG ------- SG If the connector on either of your devices is different, you must either 1) figure out which pins are which and wire as above; 2) buy a ready-made cable for the job. If you make your own, you may also have to connect some other pins together to make it work. The following pinout works for almost all devices with 25-pin serial connections: 1 Protective Ground (FG) * 14 Secondary TD 2 Transmitted Data (TD) ** 15 DCE timing 3 Received Data (RD) ** 16 Secondary RD 4 Request to Send (RTS) * 17 Rcv. Signal Element Timing 5 Clear to Send (CTS) * 18 6 Data Set Ready (DSR) * 19 Secondary RTS 7 Signal Ground (SG) ** 20 Data Terminal Ready (DTR) ** 8 Received Line 21 Signal Quality Detector Signal Detector 22 Ring Indicator 9 + voltage 23 Data Rate Selector 10 - voltage 24 DTE timing 11 25 12 Received Line Signal Indicator 13 Secondary CTS ** Always required * May be required depending on equipment. Usually a Null Modem will meet the need for these signals. ________________________________________________________________________________ Null Modem Cable Pinout ----------------- 1 ----------------- 1 2 -------\ /------ 2 \/ /\ 3 -------/ \------ 3 7 ----------------- 7 4 -+ +- 4 | | 5 -+ +- 5 6 -+ +- 6 | | 8 -+ +- 8 | | 20 -+ +- 20 Finally, if you want to learn more about the stuff that I've glossed over, I highly recommend the book "Technical Aspects of Data Communication" by John E. McNamara. It's available from Digital Press. Pete Bradley United Technologies Pratt & Whitney