SERIAL CONNECTIONS How to connect almost everything -›by Mark J Swift and Simon N Goodwin. A tricky business? If you have ever tried to connect two pieces of hardware via a serial interface, you will know that things can get pretty tricky. The problem is compounded by the fact that no matter how many leads you have made up in the past, making a new one is like starting from scratch. With a little advance planning however, making up a lead can be as simple as putting together a two-piece jigsaw... Thes files explain in words and pictures how you can make cheap and reliable connections between many Sinclair computers, near relatives like the Thor XVI and SAM, and other common machines like Amiga, Atari ST, Amstrad PCW (with CPS add-on) and PC-compatibles. The accompanying .IFF files show the connections for common serial ports on Spectrum and other machines. The files for Spectrum 128 (also QL SER1) and Interface 1 should be self-evident. The others contain the pin-outs for D-type serial ports, as used on Amiga, Atari ST, most Amstrads and IBM-compatibles. The 25 pin variant is used on older PCs, Amiga, ST, PCW, TRS-80 etc. The DB9 variant is used on SAM's optional Communications interface, recent PC clones and many laptop and portable computers, The JIGSAW solution Each of the accompanying diagrams is drawn as a single piece of a two-piece jigsaw. To discover the cable connections required to connect two machines, simply take the relevant pieces - and snap them together! Other variations Not all the machines have their own picture - for instance, ST, Amiga and Amstrad PCWs all use the same 'standard' 25 pin connection. This was the old RS-232 'standard', used on old PCs, TRS-80s and many terminals. This fell out of favour because of the bulky connector with a large number of unused pins, sometimes assigned to conflicting 'extra' signals, and rather confusing names for the signals. Some 'AT' PCs and add-on serial boards for various micros replace the 25 way connector with a nine pin connector wired as for the SAM, but with the addition of DSR on pin 6 and a small voltage, usually between 5 and 9 volts, on pin 7. This is nominally RTS, but finds its most common use providing power for a serial mouse! You can connect a PC mouse to SAM's Communications interface if you supply +5V on this pin, but you need to poll the serial port about every 7 mS or characters get lost, and this makes it inpractical for use with many SAM programs. Making your own pieces If you have a machine that is not featured here then you will need to make up a jigsaw piece of your own. You should be looking for which lines are DATA and which lines are HANDSHAKE. You should also take note of the GROUND line and whether the signal lines are INPUT or OUTPUT. It is wise to leave power connections, usually marked +5V or similar, well alone, as these are not needed for serial communications between computers and are most likely to cause damage if wrongly connected. If your machine does not match any listed here - and many with 9 pin or 25 pin D connectors correspond to the SAM and DTE diagrams - you need to copy the diagram from one of these machines and replace the signal lines with corresponding ones for the new machine. In the manufacturers notes, the machine will be described as either DTE or DCE, and this will determine whether a line is input or output. DTE devices 'Data Terminal Equipment' is generally intillegent equipment such as Computers, Terminals and Printers. There should be at least FIVE signal lines as follows: TxD (output) / CTS (input) / GND / RxD (input) / DTR (output) Note that both SAM and Spectrum Interface 1 are DTE devices, but SAM requires a female connector and the Interface 1 expects a male plug. DCE devices 'Data Communication Equipment' is generally dumb equipment such as modems, but the second QL serial port SER2 falls into this category. The signal names are taken from the intelligent end, so you will find for example that the Transmit Data (TxD) line is actually an input! This was one of the most confusing aspects of the original RS-232 serial standard. Again there will be at least FIVE signal lines as following: TxD (input) / CTS (output) / GND / RxD (output) / DTR (input) In a rare moment of standardisation, Sinclair used the same connector and pinout for the Spectrum 128K and QL SER1. We have successfully used cables and serial-to-parallel converters made for the QL with original 128K and Plus Three Spectrums. Note that the QL's SER2 port is differently wired - it uses the DCE standard rather than DTE. Further information This article is based on graphics and text released as part of the Amiga Qdos Emulator, so you can find machine readable files of the diagrams - in monochrome packed IFF format - on the Amiga Qdos 3.20 SOURCE disk, in the sub-directory SerialConnections. The authors would bve interested to hear of details for third-party Spectrum serial interfaces such as the Swift Disc, Rotronics Wafadrive, and any others that may be in your collection. Please send details so that we can prepare graphics for these as well. Other aspects This text has concentrated on hardware connections and skipped over software. See the documentation for ZXMIT for a tried and tested way to link a Spectrum and Amiga, and use this data when you wish to transfer Spectrum files from more esoteric sources - almost every machine has a Spectrum emulator, these days! In general you should make sure that both ends of the link are using the same speed and data size. Most machines default to 9600 baud and 8 data bits, with one or two stop bits. Extra stop bits do no harm. You may need to reduce the rate (at both ends) for flakey interfaces - particularly if you are not using hardware handshaking or transmitting to a Sinclair machine. Many links can work at 1200 baud or lower speeds with no need for handshaking. While we cannot sort out your serial communications problems on an individual basis, these articles should at least ensure that you get the connections right. If you run into configuration problems you should consider writing a letter to William - it's quite likely that one of the other users has encountered your problem and found a way round it. If you do write in, be sure to include full details of the software configuration commands and menu selections that you've tried at each end of the link. Good luck, and happy handshaking! M.J.SWIFT April 1993, revised and extended by Simon N Goodwin 1994-1995.