home *** CD-ROM | disk | FTP | other *** search
/ Acorn User 4 / AUCD4.iso / acorn / documents / appnotes / 231-245 / 234c.arc / Text
Encoding:
Text File  |  1995-01-23  |  31.0 KB  |  740 lines

  1. -----------------------------------------------------------------------------
  2. 23rd January 1995
  3. -----------------------------------------------------------------------------
  4. Support Group Application Note : Peripheral interfacing via the Serial Port
  5. Number:  234 
  6. Issue:   3.02 
  7. Author:  Dave Walker
  8. -----------------------------------------------------------------------------
  9.  
  10. This document describes the hardware configurations of the serial port over 
  11. the history of Acorn 32 bit computers, and details some of the software 
  12. protocols needed to drive them.
  13.  
  14. -----------------------------------------------------------------------------
  15. Applicable Hardware:  All RISC OS and RISC iX computers
  16.  
  17. Related Application Notes: None
  18.  
  19.  
  20. -----------------------------------------------------------------------------
  21. Copyright (C) 1995 Acorn Computers Limited 
  22.  
  23. Every effort has been made to ensure that the information in this leaflet is 
  24. true and correct at the time of printing. However, the products described in
  25. this leaflet are subject to continuous development and improvements and
  26. Acorn Computers Limited reserves the right to change its specifications at
  27. any time. Acorn Computers Limited cannot accept liability for any loss or
  28. damage arising from the use of any information or particulars in this
  29. leaflet. ACORN, ECONET and ARCHIMEDES are trademarks of Acorn Computers
  30. Limited.
  31. -----------------------------------------------------------------------------
  32. Support Group
  33. Acorn Computers Limited
  34. Acorn House
  35. Vision Park
  36. Histon
  37. Cambridge
  38. CB4 4AE                                                  
  39. -----------------------------------------------------------------------------
  40.  
  41. Table of Contents
  42.  
  43. Introduction                                                   3
  44.  
  45. The Hardware Layer                                             3
  46.  
  47. Communication via the Serial Port                              3
  48.  
  49. A Note on Baud Rates                                           5
  50.  
  51. Communication Protocols and Flow Control                       5
  52.  
  53. Communication with BBC Model B and Master Series Computers     6
  54.  
  55. Telecommunication Standards and Data Compression               7
  56.  
  57. The Programmer's Interface to the Serial Port                  9
  58.  
  59. Connecting Printers to the Serial Port                         9
  60.  
  61. Troubleshooting                                                9
  62.  
  63. Appendix A: Cable Configurations                              12
  64.  
  65. Appendix B: Useful Contacts                                   14
  66.  
  67. Appendix C: RS232 Signals                                     14
  68.  
  69. Glossary                                                      16
  70.  
  71.  
  72.  
  73.  
  74.  
  75.  
  76.  
  77.  
  78. Throughout this Application Note, terms are used which may be unfamiliar to 
  79. the reader. Signals are defined in Appendix C, and a Glossary has been 
  80. provided which aims to supply sufficient background information.
  81.  
  82.  
  83. Introduction
  84. A serial port allows data to be transferred between two computers, or a 
  85. computer and peripheral device, as a stream of data bits sent one after the 
  86. other down a single wire. This is fundamentally different from parallel 
  87. communications (commonly used with printers), which transfers data many bits 
  88. at a time over a number of wires. Serial communication can be synchronous or 
  89. asynchronous.
  90.  
  91. As the practice of serial communication between devices dates from the very 
  92. early history of computing, many different standards have sprung up over the 
  93. years; today, as a result of this, there is no de-facto software 
  94. communication protocol and no de-facto hardware connector. However, there is 
  95. a set of standards which most manufacturers tend to agree on; these are the 
  96. RS232 physical connector specification and the RS423 signal level electrical 
  97. specification.
  98.  
  99. The Hardware Layer
  100. The full RS232 standard connector has 25 pins, usually built into a D-type 
  101. connector. Most modern computers and peripherals do not implement the full 
  102. RS232 standard, but employ the signal specification from the RS423 standard, 
  103. again with a D connector. The Acorn serial port is conformant to the RS423 
  104. serial port electrical standard.
  105.  
  106. There are two main classifications of RS232 cable; straight-through and 
  107. crossover. Broadly speaking, if the cable is linking the computer to a 
  108. communications device, such as a modem, then a straight-through cable is 
  109. used - in other words, one where the transmit line is connected to the 
  110. same-numbered pins at either end of the cable, as is the receive line, etc. 
  111. A modem is a piece of Data Communication Equipment (DCE); hence the 
  112. straight-through cable is sometimes referred to as "DTE to DCE." 
  113.  
  114. If the cable is connecting the computer to a peripheral such as a printer, 
  115. then the transmit line from the computer needs to be connected to the 
  116. peripheral's receive line and vice versa; the two lines have to be crossed 
  117. over.  A printer, like the computer itself, is a piece of Data Terminal 
  118. Equipment (the terminology goes back to the concept of a large computer 
  119. which had a number of user-interface terminals connected to it by serial 
  120. lines), and so the cross-over cable is sometimes referred to as "DTE to DTE" 
  121. or a "null modem" cable.
  122.  
  123. Consult the manufacturer of your peripheral to determine which cable type is 
  124. required.
  125.  
  126. Communication via the Serial Port
  127. Data is transferred down a serial line in packets, which comprise a data 
  128. "word" wrapped up with a "parity" bit  and one or more "stop" bits. The 
  129. waveform looks rather like this:
  130.  
  131. <Insert DrawFiles.Fig1>
  132.  
  133. Figure 1: A Typical Serial Data Stream
  134.  
  135. where the "on" and "off" voltages fall  into this range:
  136.  
  137. <Insert DrawFiles.Fig2>
  138.  
  139. Figure 2: Serial Voltage Ranges
  140.  
  141. The format of the packet (number of data bits, type of parity etc) and the 
  142. serial baud rate can be set up using the *CONFIGURE BAUD n and *CONFIGURE 
  143. DATA n commands from the command line; the following table details the 
  144. settings. Consult the documentation supplied with your peripheral to 
  145. determine which settings are appropriate.
  146.  
  147. <Insert DrawFiles.Fig3a>
  148. <Insert DrawFiles.Fig3b>
  149.  
  150. Figure 3: Baud Rate and Word Format Configuration Settings
  151.  
  152. eg *CONFIGURE BAUD 7 would make the system default to 9600 baud 
  153. communications.
  154.  
  155. Note that baud rates above 19200 are only available on the Risc PC; all 
  156. other baud rates listed above are available on all systems fitted with RISC 
  157. OS 3.1 or later.
  158. For high baud rates, the transmit and receive rates must be set to the same 
  159. value; at low baud rates (1200 and below), a system timer can be used for 
  160. the "receive" rate, hence a different receive rate can be set using *FX7, eg 
  161. *FX7,3 would set a receive rate of 300 baud.
  162.  
  163.  
  164. A Note on Baud Rates
  165. A common misconception in serial communications concerns the definition of 
  166. "baud" as the number of bits transmitted per second (bps), particularly when 
  167. used in reference to modems. 
  168.  
  169. The baud rate is the number of changes in signal state per second. The 
  170. Public Switched Telephone Network (PSTN) bandwidth will not support a "true" 
  171. baud rate greater than 600 under any circumstances; however, each change of 
  172. signal state may represent a 1, 2, 4, 8 or 16 bit sequence, depending on the 
  173. coding method in use. Thus the term "baud" is incorrectly used if the 
  174. transmission speed is classed as greater than 600 baud; however, at 
  175. transmission rates of 300 and 600 bits per second including one start, one 
  176. parity and two stop bits, a 1:1 mapping of bits to baud is achieved.
  177.  
  178. The data rate, however, is (bits per second)*(word length)/(total packet 
  179. size in bits), which usually amounts to 300*8/11 or 600*8/11 "useful" bps.
  180.  
  181. Fax transmission rates of 9600 bps require Quadrature Amplitude Modulation, 
  182. in which each combination of phase angle and amplitude represents one of 16 
  183. 4-bit patterns; the baud rate is therefore 9600/16=600 baud, which is still 
  184. just within the PSTN bandwidth. At higher transmission speeds, other coding 
  185. methods allow each line state to represent an 8, 16 or 32 bit pattern.
  186.  
  187. In short, the "old" definition of the baud (ie as the reciprocal of the 
  188. duration of the shortest signalling element) was meaningful for Morse code, 
  189. in which a dot was the shortest-duration element and a dash had a duration 
  190. three times as long. It no longer has any real meaning in digital 
  191. transmission, as all line states last for an equal time.
  192.  
  193. Communication Protocols and Flow Control
  194. Owing to the nature of serial communications, it is necessary to have a 
  195. signalling system by which the peripheral can inform the host that it is 
  196. present, switched on, and ready to receive data or has data to transmit, and 
  197. vice versa. The last two items in this list comprise flow control.
  198.  
  199. Unlike IBM PC compatibles, Acorn machines default to using the DSR line to 
  200. flag readiness to transmit, and require the presence of the DCD signal. IBM 
  201. PC compatibles use CTS instead of DSR, and do not necessarily use DCD. On 
  202. machines fitted with the 82710 or 82711 serial controllers (these machines 
  203. being the A3010, A3020, A4000, A5000, A4 and Risc PC), it is possible to 
  204. change which signals are used for flagging in software, using the 
  205. SWI"OS_SerialOp",0 command. Thus an IBM compatible cable may be used; the 
  206. option to reprogram the serial port in this manner is currently provided by 
  207. some serial communications software. If you have a suitable machine and 
  208. prefer to use an over-the-counter IBM standard cable rather than resort to 
  209. making your own, first check with the supplier of your communications 
  210. software that there is an option to reprogram the serial controller.
  211.  
  212. If you have an older Acorn machine (Archimedes 300 series, 440, 400/1 
  213. series, 540, R140 or R200 series), you will need to have a cable wired to a 
  214. specification based on the figures in Appendix A of this document.
  215.  
  216. The need for flow control and "handshaking," in which the receiving device 
  217. verifies the parity bits included in words and can request the re-sending of 
  218. a corrupted word, has led to the development of a number of serial 
  219. communications protocol standards. These vary in their ease of 
  220. implementation, speed and robustness of transfer, and a number of them are 
  221. described below.
  222.  
  223. XON / XOFF
  224. This is the earliest software flow control system which is still in use, and 
  225. makes use of the flow control characters &11 (XON) and &13 (XOFF). There is 
  226. no error checking implemented as standard. XON / XOFF is incompatible with 
  227. SLIP and PPP, as they require the full 8 bits of the data word to send 
  228. Internet frame data; ie under Internet Protocol, &11 and &13 cannot be 
  229. reserved for flow control.
  230.  
  231. XModem
  232. This is probably the most widely available communications protocol, and is 
  233. supported by a large number of communications packages on many types of 
  234. host. XModem transfers files in blocks of 128 bytes. Each block has a 
  235. checksum, or CRC (Cyclic Redundancy Checksum) added to the end, which is 
  236. calculated by summing the values of the bytes in the packet and taking a 
  237. pair of bits from the sum. From this checksum, the receiving system can 
  238. determine whether the packet was corrupted during transmission, and if so, 
  239. it can ask the sending system to retransmit that block.  Although fairly 
  240. slow in transferring data, XModem will produce reliable transfers.
  241.  
  242. YModem
  243. Based on the same protocol set as XModem, YModem uses 1024 byte packets 
  244. wherever possible, and a different system for  packet integrity checking. 
  245. Although YModem can fall back on smaller packets where applicable, there is 
  246. no backward compatibility with XModem's checksum system.
  247.  
  248. Kermit
  249. This is another packet-oriented serial communication protocol. Developed at 
  250. the University of Columbia, the protocol standard is Public Domain, and 
  251. hence Kermit ranks with XModem for widespread use. Although fairly intensive 
  252. on encoding and checksumming, and hence fairly slow, Kermit connections are 
  253. very robust.
  254.  
  255. SLIP 
  256. SLIP provides a point-to-point connection between two devices for the 
  257. transmission of Internet datagrams; the devices can be either two computers, 
  258. or a computer and an Internet router. SLIP modifies a standard Internet 
  259. datagram by appending a special SLIP END character to it, which allows 
  260. datagrams to be distinguished as separate. Normal parameters for an 
  261. asynchronous lines apply to SLIP; SLIP requires a port configuration of 8 
  262. data bits, no parity, and EIA or hardware flow control. SLIP does not 
  263. provide any protection against line errors and data corruption, being 
  264. reliant on other high-layer protocols for this. Over a particularly 
  265. error-prone dialup link, therefore, SLIP on its own would not be 
  266. satisfactory. A SLIP system also needs to have its IP address configuration 
  267. set every time the SLIP is loaded and configured, as it cannot determine 
  268. network addresses dynamically.
  269.  
  270. PPP
  271. The Point-to-Point Protocol has a number of advantages over SLIP; it is 
  272. designed to operate both over asynchronous connections and bit-oriented 
  273. synchronous systems, can configure connections to a remote network 
  274. dynamically, and test that the link is usable. Full information on PPP can 
  275. be obtained from Internet RFC 1171 (see Glossary), and RFC 1220 describes 
  276. how PPP can be used with remote bridging.
  277.  
  278. Communication with BBC Model B and Master Series Computers
  279. It is possible to transfer data between a 32-bit Acorn computer and an 8 bit 
  280. BBC Model B / Master series computer via the Serial Port; the wiring diagram 
  281. for the appropriate cable is presented as Figure 9 in Appendix A.
  282.  
  283. If no suitable communications packages are available, it is possible to 
  284. transfer data without using one of the  recognised communications protocols; 
  285. this is not recommended except in exceptional circumstances and with a very 
  286. short cable.
  287.  
  288. On the transmitting system (assumed to be the Model B / Master), issue:
  289.  
  290. *FX8,4
  291. *FX3,1
  292.  
  293. The first call sets the transmission rate to 1200 baud, and the second 
  294. selects the serial port as the output device.
  295.  
  296. On the receiving machine, (assumed to be a 32 bit Acorn machine), issue:
  297.  
  298. *FX156,20
  299. *FX7,4
  300. *FX2,1
  301.  
  302. The first command configures the parity and word size appropriately: note 
  303. that the Model B defaults to one stop bit per word, whereas the 32 bit range 
  304. defaults to two stop bits. The second sets the receive rate to 1200 baud, 
  305. and the third causes standard input to be via the serial port.
  306.  
  307. Performing a LIST operation on a BASIC program stored in the BBC's RAM, or a 
  308. *TYPE on a plain text file stored on its disc, will cause the program or 
  309. text  to be loaded into whichever RISC OS application has the caret on the 
  310. receiving machine.
  311.  
  312. Communication is terminated by issuing
  313.  
  314. *FX3,0
  315. *FX2,0
  316.  
  317. on both machines; it is suggested that the receiving machine terminates 
  318. communication first.
  319.  
  320. Telecommunication Standards and Data Compression
  321. The CCITT (European Telecommunication Standards body) has defined a number 
  322. of standards for modem-to-modem communications over the PSTN network, and 
  323. translation from these standards codes to communication capabilities is 
  324. often a point of confusion. The following list covers most of the standards 
  325. currently available.
  326.  
  327. V.21 and Bell 103
  328. Specifies 300 bps 2-wire full duplex communications using FSK (Frequency 
  329. Shift Keying) modulation schemes. AT&T created the Bell 103 specification 
  330. during the days of telephone system monopoly in the USA. The two standards, 
  331. V.21 and Bell 103, differ slightly, but all of today's modems support both 
  332. V.21 and Bell 103. 
  333.  
  334. V.22 and Bell 212A
  335. CCITT standard for 1200 bps full duplex modems. Specifies 1200 bps 2-wire 
  336. full duplex communications using QPSK (Quadrature Phase Shift Keying) 
  337. modulation at 600 baud. Again, these two standards differ slightly. 
  338.  
  339. V.22 bis
  340. CCITT standard for 2400 bps full duplex modems. Specifies 2400 bps 2-wire 
  341. full duplex communications using a QAM (Quadrature Amplitude Modulation) 
  342. scheme at 600 baud.
  343.  
  344. V.23
  345. Specifies an asymmetrical communication scheme which implements 1200 bps 
  346. data transmission in one direction, and 75 baud data transmission in a back 
  347. channel. This FKS-based standard is popularly used in Europe for 
  348. applications which require high data rates in only one direction, eg 
  349. CET 1 / 2 / 3 Teletext.
  350.  
  351. V.24 
  352. Specifies a serial interface; analogous to RS232.
  353.  
  354. V.25 and V.25 bis
  355. CCITT standard for auto-dial commands for modems and other auto-dial 
  356. devices. Not commonly used, because of the popularity of the Hayes command 
  357. set.
  358.  
  359. V.26, V.26 bis and V.26 ter
  360. Specifies half and full duplex leased-line communications at 1200 and 2400 
  361. bps. The specifications employ QPSK modulation at 1200 baud. V.26 ter was 
  362. the first modem standard to specify echo cancellation.
  363.  
  364. V.27, V.27 bis and V.27 ter
  365. Specifies 4800 bps communications requiring 2 wires for half duplex and 4 
  366. wires for full duplex operation. The standards specify QAM modulation at 
  367. 1600 baud. The Group 3 Fax standard references V.27 ter as the base 
  368. requirement for 2-wire half duplex fax communications.
  369.  
  370. V.29
  371. CCITT standard for 9600 bps half duplex modems. Specifies 9600 bps 
  372. communications requiring 2 wires for half duplex operation, and 4 wires for 
  373. full duplex. The standard specifies QAM modulation at 2400 baud. Group 3 Fax 
  374. standard T.4 references V.29 as an option for fax transmissions faster than 
  375. 4800 bps V.29 ter. A high percentage of fax transmissions rely on V.29, but 
  376. virtually all fall back on V.29 ter.
  377.  
  378. V.32
  379. CCITT standard for 9600 bps full duplex modems. Specifies 2-wire full duplex 
  380. 9600 bps communications using QAM modulation at 2400 baud and echo 
  381. cancellation. V.32 modems offer an upgrade path from V.22 bis for 
  382. asynchronous dial-up modem applications.
  383. V.32 AUTOMODE was recently published as an annex to V.32, and defines an 
  384. automatic fall-back capability which does not support 9600 bps 
  385. communications.
  386.  
  387. V.33
  388. Specifies 4-wire full duplex and 2-wire half duplex communications at 14400 
  389. bps. V.33 employs TCM (Trellis-Coded Modulation). The Group 3 Fax study 
  390. group has modified T.4 to include this.
  391.  
  392. V.34
  393. The current state of the art in serial communications over PSTN, V.34 
  394. specifies full duplex 28800 bps.
  395.  
  396. V.42
  397. Specifies error correction techniques which can be implemented in modems 
  398. independently of transmission speed and modulation system. The 
  399. recommendation includes LAPM (Link Access Procedures for Modems) and MNP 
  400. (Microcom Networking Protocol) 2 to 4 error correction. The CCITT standard 
  401. (which is the V.42 specification) utilises MNP4 and LAPM. When a modem makes 
  402. a connection, it tries to use LAPM; if the receiving modem does not support 
  403. LAPM the connecting modem tries MNP4, and if the receiving modem does not 
  404. support MNP4 the system falls back on asynchronous non-error-correcting 
  405. communication. LAPM and MNP4 protocol querying and detection is entirely 
  406. transparent to the user.
  407.  
  408.  
  409. V.42 bis and MNP5
  410. This specifies compression algorithms which can be implemented in modems 
  411. independently of transmission speed and modulation system. V.42 bis provides 
  412. a 4:1 compression ratio, using the Lempel-Ziv algorithm (as used in !Squash 
  413. under RISC OS 3). MNP5 uses a combination of dynamic Huffman and run-length 
  414. encoding. MNP5 is not a standard as defined by a specific organisation, but 
  415. has become a standard in its own right for 2:1 data compression.
  416.  
  417. The Programmer's Interface to the Serial Port
  418. There is a "raw" device which corresponds to the serial port (this is 
  419. serial:); however, writing to the serial port by directly using this device 
  420. is deprecated. The approved programmer interface is via the SWI"OS_SerialOp" 
  421. call (SWI &57), which is described starting on page 2-459 of the RISC OS 3 
  422. Programmer's Reference Manual. Of particular interest is the provision for 
  423. implementation of flow control; the serial status word, accessible via 
  424. SWI"OS_SerialOp",0 allows XON/XOFF with CTS handshaking, use of DCD or use 
  425. of DSR to implement signalling of intent to transmit / receive data. 
  426.  
  427. Unlike IBM compatibles fitted with the 82710 / 82711, Acorn computers 
  428. default to the behaviour associated with the 6551 serial controller fitted 
  429. in the original Archimedes range. In order to allow an IBM type lead to be 
  430. used, bit 1 (ignore DCD) of the serial port status word must be set using 
  431. the appropriate SYS"OS_SerialOp",0 mask. However, to produce a robust 
  432. program capable of coping with a noisy connection, it is necessary to 
  433. periodically reset the status word so that DCD can be checked.  The type of 
  434. cable which is connected may either be selected by a user menu option, or it 
  435. is acceptable to check the state of DCD on program startup. 
  436.  
  437. Full details of this status word are listed on Page 2-462 of the RISC OS 3 
  438. Programmer's Reference Manual.
  439.  
  440. Connecting Printers to the Serial Port
  441. !Printers is capable of sending data to a suitable printer via a serial 
  442. link; the printer usually has to be specially configured to receive data in 
  443. this manner, and it is suggested that you refer to your printer manual for 
  444. information on how the printer's DIP switches must be set and which formats 
  445. of serial word it will accept. !Printers must itself be configured according 
  446. to the information supplied in the User Guide, and some suitable cable 
  447. wiring diagrams are shown in Appendix A. Printers tend to be configured to 
  448. the DTE standard, however you should check this with your printer supplier. 
  449. It is also worth noting that a cable for this purpose usually has fewer 
  450. wires to be soldered, as data is generally only sent in one direction; from 
  451. computer to printer.
  452.  
  453. Troubleshooting
  454. First of all, make sure that your serial lead and your communications 
  455. package are compatible; if you are using an A5000 or later with an IBM type 
  456. lead, make sure that your communications package supports reprogramming of 
  457. the serial controller.
  458.  
  459. On some modems, the modem takes control of the RI line, and this may cause 
  460. an Acorn computer to hang up. The solution to this is to leave Pin 9 (RI) of 
  461. the serial port disconnected if such a modem is in use.
  462.  
  463. Sometimes, when handshaking signals become corrupted (this only occasionally 
  464. happens over long, unshielded cables in areas where a lot of electrical 
  465. equipment is operating), communications will "hang up" in a deadlocked 
  466. state. Rather than reset the computer or the peripheral, it is often 
  467. possible to "wake up" the peripheral by sending a Break Level. Not to be 
  468. confused with an operation involving the Break key on the keyboard, a Break 
  469. Level sends a 0V pulse to the RxD pin on the peripheral. A Break Level can 
  470. be sent, if your communications package does not already implement it, by 
  471. entering BASIC and issuing
  472.  
  473. SYS"OS_SerialOp",2,<duration in centiseconds>
  474.  
  475. eg SYS"OS_SerialOp",2,20 would send a "short break."
  476.  
  477. A "short break" is generally about 0.2 seconds long, and a "long break" can 
  478. be as much as 1.5 seconds. It is suggested that a "long break" only be tried 
  479. as a last resort before a device reset. Any characters being sent when the 
  480. break is issued may be garbled; however, if the break succeeds in waking the 
  481. peripheral, a robust communication protocol would simply ask for the last 
  482. data packet to be re-transmitted.
  483.  
  484. On computers prior to the Risc PC running RISC OS 3.10, communications may 
  485. be unreliable above 9600 baud, depending on the length and impedance of 
  486. cable connected. The unreliability appears in the form of occasional "missed 
  487. words" when receiving data. 
  488.  
  489. A pair of soft-loadable patch modules, SerialDev and SerialUtil, are 
  490. available via Acorn dealers, Acorn Education Centres and bulletin boards, 
  491. and may be downloaded via ftp over Internet from ftp.acorn.co.uk. SerialUtil 
  492. is applicable for use under RISC OS 3.1 in conjunction with communications 
  493. packages written under RISC OS 2, and provides enhanced arbitration of the 
  494. claiming of the serial interrupt vector.  SerialDev is a modified version of 
  495. the serial port device driver which forms part of RISC OS 3.10, and improves 
  496. the interrupt latency of the serial port to give improved communications 
  497. reliability at high baud rates (eg 9600 baud). This improved driver was 
  498. included as part of RISC OS 3.11.
  499.  
  500. If you think that you may have a hardware fault with your serial port, you 
  501. may find it useful to make up a loopback testing plug; using this plug, in 
  502. conjunction with serial loopback test software, should pass data straight 
  503. from the "transmit" pins to  the "receive" pins. 
  504.  
  505. <Include DrawFiles.Fig4>
  506.  
  507. Figure 4: Generic  Loopback Test Plug
  508.  
  509.  
  510. Please note that there are different versions of this Loopback connector, 
  511. modified to work correctly with different machines; hence when building a 
  512. plug from the parts lists below, use the generic board layout above and 
  513. simply omit any components marked as N/F.
  514.  
  515. <Include DrawFiles.Fig5>
  516.  
  517. Figure 5: Archimedes 300 series and 440 serial
  518. loopback parts list  
  519.  
  520. <Include DrawFiles.Fig6>
  521.  
  522. Figure 6: Archimedes 400/1 serial loopback
  523. parts list
  524.  
  525. <Include DrawFiles.Fig7>
  526.  
  527. Figure 7: A3000, A30n0, A4000, A5000 serial
  528. loopback parts list
  529.  
  530. <Include DrawFiles.Fig8>
  531.  
  532. Figure 8: Risc PC 600 serial loopback parts list
  533.                 
  534.  
  535. Appendix A: Cable Configurations
  536.  
  537. The pinout of the Serial Port is as follows:
  538.  
  539. <Include DrawFiles.Fig9>
  540.  
  541. Figure 9: Acorn Serial Port Pinout
  542.  
  543. 9-way serial connectors on other systems generally have the same pinout; 
  544. however, it is suggested that you consult the appropriate documentation for 
  545. the other system. Some suitable cable configurations for Acorn machines are 
  546. shown below; if you make your own cables, ensure that the cable you use is 
  547. adequately screened.
  548.  
  549. <Include DrawFiles.Fig10>
  550.  
  551. Figure 10: DTE to DTE (Acorn computer to Acorn computer)  
  552.  
  553. <Include DrawFiles.Fig11>
  554.  
  555. Figure 11: DTE to DCE (Acorn computer to 25-pin Modem)
  556.  
  557. <Include DrawFiles.Fig12>
  558.  
  559. Figure 12: Acorn Computer to IBM PC compatible   
  560.  
  561. <Include DrawFiles.Fig13>
  562.  
  563. Figure 13: Acorn 32 bit computer to BBC Model B / Master Series
  564.  
  565. <Include DrawFiles.Fig14>
  566.  
  567. Figure 14: Acorn Computer to Apple LaserWriter
  568.  
  569. Risc PCs and A5000s use an 82710 or 82711 peripheral controller, which 
  570. provides the driver hardware for the serial port; as this IC is used in many 
  571. IBM PC compatibles, it is possible to software-configure the computer to use 
  572. the serial port in exactly the same way as an IBM PC compatible does. 
  573. However, the system is pre-configured to behave as an Acorn machine, so 
  574. Archimedes cables which require DCD and have flow control via DSR will work 
  575. correctly without any reconfiguration.
  576.  
  577. Some software communications packages have an option to reconfigure the 
  578. serial port on A5000s and Risc PC so that IBM-type cables can be used.
  579.  
  580. Appendix B:Useful Contacts
  581. For SLIP modules, which can be used in conjunction with the Acorn TCP / IP 
  582. suite on all Acorn 32 bit machines, including the Risc PC:
  583.  
  584. Gnome Computers Limited
  585. 25a Huntingdon Street
  586. St Neots
  587. Cambridgeshire
  588. PE19 1BG
  589.  
  590. Tel: 0480 406164
  591. email: chris@gnome.co.uk
  592.  
  593. For copies of the RS232, RS423 and CCITT standards documents:
  594.  
  595. BSI Standards
  596. Linford Wood
  597. Milton Keynes
  598. MK14 6LE
  599.  
  600. Tel: 0908 221166
  601.  
  602. For Internet RFCs: 
  603. Anonymous FTP to 
  604.  
  605. doc.ic.ac.uk 
  606. or
  607. ota.ox.ac.uk
  608.  
  609. These two sites are given as example only, and are convenient owing to their 
  610. UK location; RFCs are available on many more Internet sites.
  611.  
  612. Appendix C: RS232 Signals
  613. For completeness, and for use when interfacing Acorn systems to hardware 
  614. which uses 25 way serial connectors, there follows a list of the signals 
  615. present in the full RS232 serial port specification.
  616.  
  617. <Include DrawFiles.Fig15>
  618.  
  619. Figure 15: 25 Way Serial Pinout
  620.  
  621. Pin 1. Prot (Protective Ground)
  622. This will usually form a connection between any metal screening on the cable 
  623. and the metal chassis of the computer and peripheral.
  624.  
  625. Pin 2. TXD (Transmitted Data)
  626. This is the line all data is transmitted on. Transmission will only occur if 
  627. line 5, CTS, is active.
  628.  
  629. Pin 3. RXD (Received Data)
  630. This is the line all data is received on.
  631.  
  632. Pin 4. RTS (Request To Send)
  633. This is the line which indicates that an RS232 device is ready to transmit 
  634. data. In order to find out whether data is expected, a receiving device 
  635. tests this line.
  636.  
  637. Pin 5. CTS (Clear To Send)
  638. The state of this line is used to indicate that a device is ready to receive 
  639. data transmitted to it by another RS232 device.It is used to inhibit data 
  640. transfer until the receiving device is ready to accept it.
  641.  
  642. Pin 6. DSR (Data Set Ready)
  643. This line is used to indicate that a connected RS232 receiving device is 
  644. switched on.
  645.  
  646. Pin 7. GND (Signal Ground)
  647. This provides a common reference for both input and output signals on both 
  648. systems.
  649.  
  650. Pin 8. DCD (Data Carrier Detect)
  651. This line is used for hardware flow control on Acorn systems, instead of CTS.
  652.  
  653. Pin 9. Not connected
  654.  
  655. Pin 10. Not connected
  656.  
  657. Pin 11. STF (Select XMT Frequency)
  658.  
  659. Pin 12. dcd (Secondary DCD)
  660.  
  661. Pin 13. cts (Secondary CTS)
  662.  
  663. Pin 14. xmt (Secondary XMT)
  664.  
  665. Pin 15. Xclk (Transmit Clock)
  666.  
  667. Pin 16. rcv (Secondary RCV)
  668.  
  669. Pin 17. Rclk (Receive Clock)
  670.  
  671. Pin 18. Not connected
  672.  
  673. Pin 19. rts (Secondary RTS)
  674.  
  675. Pin 20. DTR (Data Terminal Ready)
  676. This line is used to indicate whether the RS232 transmitting device is 
  677. switched on.
  678.  
  679. Pin 21. SQ1 (Signal Quality)
  680.  
  681. Pin 22. RI (Ring Indicator)
  682.  
  683. Pin 23. DRS (Data Rate Select)
  684.  
  685. Pin 24.          (External Transmit Clock)
  686.  
  687. Pin 25. BY (Busy; Standby)
  688.  
  689.  
  690. Glossary
  691. Asynchronous communication: Communication over a serial line where one 
  692. device has to "sit and listen" while the other sends data; the two devices 
  693. are not able to send data simultaneously.
  694.  
  695. Baud: See "A Note on Baud Rates"
  696.  
  697. DCE: Data Communications Equipment. A piece of equipment which obeys the DCE 
  698. specification as laid down in the RS232 standard.  Usually a modem, or other 
  699. device which passes information through it to other devices.
  700.  
  701. DTE: Data Terminal Equipment. A piece of hardware such as a computer or a 
  702. printer, which obeys the DTE specification as laid down in the RS232 
  703. standard, and which generally does not relay data on electronically.
  704.  
  705. FTP: Internet File Transfer Protocol. Used to download data from an FTP 
  706. server (usually a UNIX or VMS host), via an FTP client such as the one 
  707. supplied as part of the Acorn TCP/IP suite.
  708.  
  709. Hayes Command Set: This is a command protocol used for software control of 
  710. many of today's high-specification modems. A Hayes command sequence starts 
  711. with the letters AT (short for ATtention), and can be followed by a number 
  712. of parameters. A list of Hayes commands is usually supplied with a modem 
  713. supporting the command set.
  714.  
  715. Modem: Short for MODulator / DEModulator. A piece of equipment which 
  716. converts serial data into audio-ftrequency tones suitable for sending over 
  717. the Public Switched Telephone Network (PSTN), and which can take audio data 
  718. back in from a remote system and convert it to serial data.
  719.  
  720. Packet: A standard "chunk" of data sent over a serial link. A basic packet 
  721. comprises a start bit, a single data word, a parity bit and either one or 
  722. two stop bits. Acorn systems default to two stop bits. Communication 
  723. protocols generally use larger packets, containing many words per packet.
  724.  
  725. Parity: A bit added onto the end of a word in a serial data packet, which 
  726. allows a simple measure of detecting whether a word was received without 
  727. being corrupted. Parity comes in two flavours, even and odd; this determines 
  728. the type of checksum calculation carried out.
  729.  
  730. RFC: A "Request For Comment" document. These are usually available over the 
  731. Internet, and are the standards documents which define Internet protocols. 
  732. Two sites which carry many of the RFCs as plain text documents are listed in 
  733. the Useful Contacts section.
  734.  
  735. Synchronous Communication: Communication over a serial line where both 
  736. parties in the transaction can be sending and receiving data simultaneously.
  737.  
  738. Word: A sequence of bits in a basic serial packet which contains the 
  739. "useful" data being transferred. In serial communication, a word is normally 
  740. seven or eight bits long.