home *** CD-ROM | disk | FTP | other *** search
/ Amiga Format CD 18 / amigaformatcd18.iso / -in_the_mag- / emulation / emus / connectors / serial.text < prev    next >
Text File  |  1997-07-31  |  11KB  |  269 lines

  1. SERIAL CONNECTIONS  ((third revision, July 1995))
  2.  
  3. How to connect almost everything -›by Mark J Swift and Simon N Goodwin.
  4.  
  5. PART 1 - A tricky business?
  6.  
  7. If you have ever tried to connect two pieces of hardware via a serial
  8. interface, you will know that things can get pretty tricky. The problem
  9. is compounded by the fact that no matter how many leads you have made
  10. up in the past, making a new one is like starting from scratch.
  11.  
  12. With a little foreward planning however, making up a lead can be as simple
  13. as putting together a two-piece jigsaw...
  14.  
  15. These articles explain in words and pictures how you can make cheap and
  16. reliable connections between many Sinclair computers, near relatives like
  17. the Thor XVI and SAM, and other common machines like Amiga, Atari ST, BBC
  18. Micro, Apple Mac, Amstrad PCW (with CPS add-on) and PC-compatibles. This
  19. part includes details for SAM, Interface 1, IBM PCs and clones, BBC Micro
  20. and many printers and plotters. The second part includes details for QL,
  21. Spectrum 128, Apple Macintosh and the S5/8 standard.
  22.  
  23.  
  24. The JIGSAW solution
  25.  
  26. Each of the accompanying diagrams is drawn as a single piece of a two-piece
  27. jigsaw. To discover the cable connections required to connect two machines,
  28. simply take the relevant pieces - and snap them together!
  29.  
  30.  
  31. Other variations
  32.  
  33. Not all the machines have their own picture - for instance, ST, Amiga and
  34. Amstrad PCWs all use the same 'standard' 25 pin connection. This was the
  35. old RS-232 'standard', used on old PCs, TRS-80s and many terminals. This
  36. fell out of favour because of the bulky connector with a large number of
  37. unused pins, sometimes assigned to conflicting 'extra' signals, and rather
  38. confusing names for the signals.
  39.  
  40. Some 'AT' PCs and add-on serial boards for various micros replace the
  41. 25 way connector with a nine pin connector wired as for the SAM, but with
  42. the addition of DSR on pin 6 and a small voltage, usually between 5 and 9
  43. volts, on pin 7. This is nominally RTS, but finds its most common use
  44. providing power for a serial mouse! You can connect a PC mouse to SAM's
  45. Communications interface if you supply +5V on this pin, but you need to
  46. poll the serial port about every 7 mS or characters get lost, and this
  47. makes it inpractical for use with many SAM programs.
  48.  
  49.  
  50. Making your own pieces
  51.  
  52. If you have a machine that is not featured here then you will need to make
  53. up a jigsaw piece of your own. You should be looking for which lines
  54. are DATA and which lines are HANDSHAKE. You should also take note
  55. of the GROUND line and whether the signal lines are INPUT or OUTPUT.
  56.  
  57. It is wise to leave power connections, usually marked +5V or similar,
  58. well alone, as these are not needed for serial communications between
  59. computers and are most likely to cause damage if wrongly connected.
  60.  
  61. If your machine does not match any listed here - and many with 9 pin
  62. or 25 pin D connectors correspond to the SAM and DTE diagrams - you need
  63. to copy the diagram from one of these machines and replace the signal
  64. lines with corresponding ones for the new machine. In the manufacturers
  65. notes, the machine will be described as either DTE or DCE, and this will
  66. determine whether a line is input or output.
  67.  
  68. DTE devices
  69.  
  70. 'Data Terminal Equipment' is generally intellegent equipment such as
  71. Computers, Terminals and Printers. There should be at least FIVE signal
  72. lines as follows:
  73.  
  74.      TxD (output) / CTS (input)  / GND / RxD (input)  / DTR (output)
  75.  
  76. Note that both SAM and Spectrum Interface 1 are DTE devices, but SAM
  77. requires a female connector and the Interface 1 expects a male plug.
  78.  
  79.  
  80. DCE devices
  81.  
  82. 'Data Communication Equipment' is generally dumb equipment such as modems,
  83. but the second QL serial port SER2 falls into this category. The signal
  84. names are taken from the intelligent end, so you will find for example
  85. that the Transmit Data (TxD) line is actually an input! This was one of
  86. the most confusing aspects of the original RS-232 serial standard. Again
  87. there will be at least FIVE signal lines as following:
  88.  
  89.      TxD (input)  / CTS (output) / GND / RxD (output) / DTR (input)
  90.  
  91.  
  92. Further information
  93.  
  94. This article is based on graphics and text released as part of the Amiga
  95. Qdos Emulator, so you can find machine readable files of the diagrams - in
  96. monochrome packed IFF format - on the Amiga Qdos 3.20 SOURCE disk, in the
  97. sub-directory SerialConnections. 
  98.  
  99. The authors would bve interested to hear of details for third-party
  100. Spectrum serial interfaces such as the Swift Disc, Rotronics Wafadrive,
  101. and any others that may be in your collection. Please send details, care
  102. of the Editor, so that we can prepare graphics for these as well.
  103.  
  104. Next issue we shall cover the serial ports on Apple Macs and the remaining
  105. Sinclair machines, and a cheap way to link lots of machines serially.
  106.  
  107.     M.J.SWIFT April 1993, extended by Simon N Goodwin 1994-1995.
  108.  
  109. *************************************************************************
  110.  
  111. SERIAL CONNECTIONS
  112.  
  113. How to connect almost everything -›by Mark J Swift and Simon N Goodwin.
  114.  
  115. PART 2 - MAKING A STANDARD
  116.  
  117. This is the second part of our all-purpose plug-and-play guide to micro
  118. serial connections. The accompanying diagrams are intended to be fitted
  119. together or onto the ones printed last issue, to identify the plugs and
  120. connections to link any pair of machines.
  121.  
  122. Last issue we covered ST, Amiga, PC, QL, ZX Interface 1 and SAM, plus
  123. TRS-80, Amstrad PCW, and other systems with optional 25-pin serial ports.
  124.  
  125. In a rare moment of standardisation, Sinclair used the same connector and
  126. pinout for the Spectrum 128K and QL SER1. We have successfully used cables
  127. and serial-to-parallel converters made for the QL with original 128K and
  128. Plus Three Spectrums. Note that the QL's SER2 port is differently wired -
  129. it uses the DCE standard rather than DTE, as explained in Part 1..
  130.  
  131. The CST Thor 1 and Thor 20 were built around Sinclair QL circuit boards,
  132. so they have the same SER1 and SER2 connections as a 'real' QL. The
  133. CST/Dansoft Thor XVI uses the S5/8 standard, like some micros made by
  134. Philips. This may seem an obscure choice, but it's well thought out and
  135. an ideal way to link a mixture of machines.
  136.  
  137.  
  138. Too many cables?
  139.  
  140. The jigsaw solution introduced last issue eases the problem of making
  141. cables, but there is another problem. As you acquire more and more
  142. machinery, you will need more and more cables - to the point where
  143. you could literally be lost in cables.
  144.  
  145. For example if it is necessary to be able to connect any machine to any
  146. other then:
  147.  
  148. with 2 machines - 1 cable is required
  149. with 3 machines - 2+1 = 3 cables are required
  150. with 4 machines - 3+2+1 = 6 cables
  151. with 5 machines - 4+3+2+1 = 10 cables
  152.  
  153. with n machines - (n-1)+(n-2)+...+2+1 = n(n-1)/2 cables
  154.  
  155. So you'd need 28 separate cables to link all the machines covered in
  156. these articles! There must be a better way, and emulator enthusiast
  157. Mark J Swift has found it.
  158.  
  159. The ideal solution if you have lots of machines is to standardize the
  160. serial connector on each machine by fitting an adaptor, and then to
  161. use a SINGLE cable to connect between machines.
  162.  
  163.  
  164. The S5/8 Standard
  165.  
  166. The S5/8 standard for serial connections came out of a Government study in
  167. the eighties. The S5/8 standard is based on an eight pole DIN connector
  168. and specifies nine signals as follows:
  169.  
  170.      1 - DINP  data input
  171.      3 - DOUT  data output
  172.      4 - HINP  handshake input
  173.      5 - HOUT  handshake output
  174.      6 - SINP  subsidiary input
  175.      7 - SOUT  subsidiary output
  176.      8 - V+    power supply
  177.      2 - GND   signal ground (common)
  178. SHIELD - EARTH earth
  179.  
  180. A device containing an S5/8 connector should contain a socket, and each
  181. device is connected to another with a simple cross-over cable.
  182.  
  183. Of the eight signal lines only 5 are necessary (hence the name S5/8 -
  184. five lines from eight), these lines are:
  185.  
  186.      1 - DINP  data input
  187.      3 - DOUT  data output
  188.      4 - HINP  handshake input
  189.      5 - HOUT  handshake output
  190.      2 - GND   signal ground (common)
  191.  
  192.  
  193. Handshaking
  194.  
  195. The handshake lines are optional controls, used to temporarily pause
  196. the flow of data to make sure that none gets lost at high speeds. If
  197. these are not available you can usually ask your system to use 'software
  198. handshaking', sending special flow-control characters, often known as
  199. XON and XOFF, but this is less reliable and no good at all for binary
  200. data like program code, where the reserved control characters might
  201. appear anywhere.
  202.  
  203. There are two versions of the S5/* cable diagram, for hardware and
  204. software handshaking. Another advantage of standardising on S5/8 is
  205. that you can swap any link from one type to the other by replacing
  206. the single S5/8 cable in the middle.
  207.  
  208.  
  209. Making an S5/8 adaptor
  210.  
  211. This article is accompanied by a set of 'jigsaw' diagrams for various
  212. computers. To find the cable connections required to
  213. convert one of the serial definitions into S5/8, simply snap this
  214. 'jigsaw' piece into place underneath the 'jigsaw' piece for the relevant
  215. hardware.
  216.  
  217. This will standardize the hardware to be S5/8. The simple cable required
  218. to connect two S5/8 devices has its own diagram. You can use this cable to
  219. link two Thor XVI computers, as the serial ports on that machine use the
  220. S5/8 standard.
  221.  
  222.  
  223. Less cables - less hassle
  224.  
  225. Now if it is necessary to be able to connect any machine to any other,
  226. you will need to make up the following leads:
  227.  
  228. with 2 machines - 2 adaptors + 1 cable
  229. with 3 machines - 3 adaptors + 1 cable
  230. with 4 machines - 4 adaptors + 1 cable
  231. with 5 machines - 5 adaptors + 1 cable
  232. ...
  233. with n machines - n adaptors + 1 cable
  234.  
  235. As you can see, the number of cables required no longer increases
  236. exponentially. With just four cables you can connect all three Sinclair
  237. serial ports, PC-ATs, SAM and Thors. Add one more (DTE to S5/8) and
  238. you can include Amigas, PC-XTs, Atari STs, Amstrad PCWs and TRS-80s in
  239. your collection - probably enough to start up a data-transfer agency!
  240.  
  241.  
  242. Other aspects
  243.  
  244. These articles have concentrated on hardware connections and skipped
  245. over software. You should make sure that both ends of the link are
  246. using the same speed and data size. Most machines default to 9600 baud
  247. and 8 data bits, with one or two stop bits. Extra stop bits do no harm.
  248.  
  249. You may need to reduce the rate (at both ends) for flakey interfaces -
  250. particularly if you are not using hardware handshaking or transmitting
  251. to a Sinclair machine. Many links can work at 1200 baud or lower speeds
  252. with no need for handshaking.
  253.  
  254. If you're hungry for further reading, check out the August 1986 issue
  255. of Electronics & Wireless World, for an article entitled 'S5/8 the
  256. technical details' by Andrew Hardie. This was the inspiration for
  257. our 'standard cable' system.
  258.  
  259. While we cannot sort out your serial communications problems on an
  260. individual basis, these articles should at least ensure that you get
  261. the connections right. If you run into configuration problems you
  262. should consider writing a letter to the editor - it's quite likely that
  263. one of the other readers has encountered your problem and found a way
  264. round it. If you do write in, be sure to include full details of the
  265. software configuration commands and menu selections that you've tried
  266. at each end of the link. Good luck, and happy handshaking!
  267.  
  268.     M.J.SWIFT April 1993, extended by Simon N Goodwin 1994-1995.
  269.