home *** CD-ROM | disk | FTP | other *** search
/ ProfitPress Mega CDROM2 …eeware (MSDOS)(1992)(Eng) / ProfitPress-MegaCDROM2.B6I / COMM / MISC / TELEDX10.ZIP / RS232 < prev    next >
Encoding:
Text File  |  1992-02-06  |  11.1 KB  |  261 lines

  1.  
  2.  
  3.  
  4.  
  5.  
  6.  
  7.  
  8.  
  9. ───────────────────────────────────────────────────────────────────────────────
  10. ▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌
  11. ───────────────────────────────────────────────────────────────────────────────
  12.                 ╓──────┐ ╓─────┐         ╓─────┐ ╓─────┐ ╓─────┐
  13.                 ║ ┌──╖ │ ║ ┌───┘         ╙───╖ │ ╙───╖ │ ╙───╖ │
  14.                 ║ └──╜ │ ║ └───┐ ╓─────┐ ╓───╜ │   ╓─╜ │ ╓───╜ │
  15.                 ║ ┌─╖ ┌┘ ╙───╖ │ ╙─────┘ ║ ┌───┘   ╙─╖ │ ║ ┌───┘
  16.                 ║ │ ║ └┐ ╓───╜ │         ║ └───┐ ╓───╜ │ ║ └───┐
  17.                 ╙─┘ ╙──┘ ╙─────┘         ╙─────┘ ╙─────┘ ╙─────┘
  18. ───────────────────────────────────────────────────────────────────────────────
  19. ▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌
  20. ───────────────────────────────────────────────────────────────────────────────
  21.  
  22.  
  23.  
  24. Press PgDn to continue...
  25.  
  26.  
  27.  
  28.  
  29.  
  30.  
  31.  
  32.  
  33. The  following information is intended to collect together  in one place,  
  34. and explain in relatively simple terms, enough of the details of the RS-232 
  35. standard to allow a technician to construct and/or  debug  interfaces  
  36. between any  two  "RS-232  Compatible" devices.  
  37.  
  38. This  guide  is necessary due to the casual way  that  vendors implement  
  39. "RS-232"  interfaces,   sometimes  omitting   required signals,  requiring 
  40. optional ones, or worse, implementing signals incorrectly.  Due  to  this,  
  41. and  a lack  of  readily  available information   about  the  real  EIA  
  42. standard,   there  is  often considerable confusion involved in trying to 
  43. interface two RS-232 devices.
  44.  
  45.  
  46.  
  47.  
  48.  
  49.  
  50.                                   BACKGROUND
  51.  
  52.  
  53. RS-232-C  is the most recent version of the  EIA  (Electronics Industry   
  54. Association)  standard  for  low  speed  serial   data communication.  It  
  55. defines  a  number of  parameters  concerning voltage levels, loading 
  56. characteristics and timing relationships. The  actual connectors which are 
  57. almost universally used  (DB-25P and DB-25S,  sometimes called "EIA  connec-
  58. tors") are  recommended, but not mandatory.  Typical practice requires 
  59. mounting the female (DB-25S) connector on the chassis of communication 
  60. equipment, and male  (DB-25P)  connectors  on  the  cable  connecting  two  
  61. such devices.
  62.  
  63. There are two main classes of RS-232 devices, namely DTE (Data Terminal   
  64. Equipment),   such   as  terminals,   and  DCE   (Data Communication  Equip-
  65. ment),  such as modems.  Typically,  one  only interfaces a DTE to a  DCE,  as
  66. opposed to one DTE to another DTE, or  one  DCE to another DCE,   although
  67. there are ways to  do  the later  two  by building non-standard  cables. 
  68. Rarely if ever  are more than two devices involved in a given  interface
  69. (multidrop is not supported). A serial port on a computer may be  implemented
  70. as either  DTE  or  DCE,  depending  on what type of  device  it   is intended
  71. to support.
  72.  
  73.  
  74.  
  75.  
  76. RS-232  is  intended for relatively short (50 feet  or  less), relatively low 
  77. speed (19,200 bits per second or less) serial  (as opposed  to  parallel)  
  78. communications.   Both  asynchronous  and synchronous  serial encoding are 
  79. supported.  As 'digital' signals (switched  D.C.  voltage,  such  as square 
  80. waves)  are  used,  as opposed to 'analog' signals (continuously varying  
  81. voltage,  such as  sine  waves)  a very wide bandwidth channel (such  as  
  82. direct wire) is required.  A limited bandwidth channel (such as a  phone 
  83. circuit)  would  cause  severe and  unacceptable  distortion  and consequent 
  84. loss of information.
  85.  
  86. RS-232 will support simplex,  half-duplex, or full-duplex type channels. In a 
  87. simplex channel, data will only ever be travelling in one direction,  e.g.  
  88. from DCE to DTE.  An example might be  a 'Receive Only' printer. In a 
  89. half-duplex channel, data may travel in  either  direction,  but at any given 
  90. time data will  only  be travelling in one direction, and the line must be 
  91. 'turned around' before  data can travel in the other direction.  An example 
  92. might be  a Bell 201 style modem.  In a full-duplex channel,  data  may 
  93. travel in both directions simultaneously.  An example might be  a Bell 103 
  94. style modem.  Certain of the RS-232 'hand-shaking' lines are used to resolve 
  95. problems associated with these modes, such as which direction data may travel 
  96. at any given instant.
  97.  
  98.  
  99. If  one  of the devices involved in an RS-232 interface  is  a real  modem 
  100. (especially a half-duplex modem),  the 'hand-shaking' lines  must be  support-
  101. ed,  and the timing  relationships  between them  are quite important.   These
  102. lines are typically much easier to deal with if no modems are involved.   In
  103. certain cases,  these lines may be used to allow one device (which is 
  104. receiving data at a  higher rate than it is capable of processing  indefinite-
  105. ly)  to cause the other device to pause while the first one  'catches up'.
  106. This use of the hand-shaking lines was not really intended by  the designers
  107. of the RS-232 standard,  but it is a useful  by-product of the  way such
  108. interfaces are typically implemented.
  109.  
  110. Much  of  the  RS-232 standard is concerned  with  support  of 'modems'.  
  111. These  are devices which can convert a serial  digital data  signal  into  an  
  112. analog signal compatible  with  a  narrow bandwidth  (e.g.  3  kHz) channel 
  113. such as  a  switched  telephone circuit,  and back into serial digital data 
  114. on the other end. The first  process is called 'MOdulation',  and the second 
  115. process is called 'DEModulation', hence the term 'MODEM'. The actual process 
  116. used  (at  data  rates  of up to 1200 bits  per  second)  is  FSK (Frequency 
  117. Shift Keying), in which a constant frequency sine wave (called  the  
  118. 'carrier')  is  shifted to  a  slightly  higher  or slightly  lower   frequen-
  119. cy  to represent a logic 0  or  logic  1, respectively.  In  a  half  duplex 
  120. modem,  the  entire  available bandwidth is used for one direction.   
  121.  
  122.  
  123.  
  124.  
  125.  
  126.  
  127.  
  128.  
  129.  
  130. In a full duplex modem, the available bandwidth is divided into two  
  131. sub-bands, hence there is both  an 'originate carrier' (e.g.  for data from  
  132. the terminal to the computer),  and an 'answer carrier' (e.g.  for data from   
  133. the computer to the terminal). The actual frequencies (in Hertz) used on the  
  134. Bell 103A full duplex modem are:
  135.  
  136.                       Signal    State   Originate  Answer
  137.                
  138.                       logic 0   SPACE     1180      1850
  139.                       carrier             1080      1750
  140.                       logic 1   MARK       980      1650
  141.  
  142.  
  143.  
  144.  
  145.  
  146.  
  147.  
  148.  
  149.  
  150.  
  151.                   THE STANDARD CIRCUITS AND THEIR DEFINITIONS
  152.  
  153. For  the  purposes  of the RS-232  standard,  a  'circuit'  is defined  to  
  154. be a continuous wire from one device to  the  other. There  are 25 circuits 
  155. in the full specification,  less than half of which are at all likely to be 
  156. found in a given  interface.  In the  simplest  case,  a full-duplex  inter-
  157. face may be  implemented with as few as 3 circuits. There is a certain  amount
  158. of confusion associated with the names of these circuits, partly  because
  159. there are three different naming conventions (common name,  EIA  circuit name, 
  160. and CCITT circuit name).  The table below lists all  three  names, along with
  161. the circuit number (which is also the connector pin with  which that circuit
  162. is normally associated on both ends). Note  that  the  signal names are from
  163. the viewpoint  of  the  DTE (e.g.  Transmit Data is  data being sent by the
  164. DTE,  but received by the DCE).
  165.  
  166.  
  167.  
  168.  
  169.  
  170.  
  171.  
  172.  
  173.  
  174.           PIN  NAME EIA  CCITT  DTE  DCE     FUNCTION
  175.  
  176.            1    CG   AA   101     ---        Chassis Ground
  177.            2    TD   BA   103     -->        Transmit Data
  178.            3    RD   BB   104     <--        Receive Data
  179.            4    RTS  CA   105     -->        Request To Send
  180.            5    CTS  CB   106     <--        Clear To Send
  181.            6    DSR  CC   107     <--        Data Set Ready
  182.            7    SG   AB   102     ---        Signal Ground
  183.            8    DCD  CF   109     <--        Data Carrier Detect
  184.            9*                     <--        Pos. Test Voltage
  185.           10*                     <--        Neg. Test Voltage
  186.           11                                 (usually not used)
  187.           12+   SCDC SCF  122     <--        Sec. Data Car. Detect
  188.           13+   SCTS SCB  121     <--        Sec. Clear To Send
  189.           14+   STD  SBA  118     -->        Sec. Transmit Data
  190.           15#   TC   DB   114     <--        Transmit Clock
  191.  
  192.  
  193.  
  194.  
  195.           PIN  NAME EIA  CCITT  DTE  DCE     FUNCTION
  196.  
  197.           16+   SRD  SBB  119     <--        Sec. Receive Data
  198.           17#   RC   DD   115     <--        Receive Clock
  199.           18                                 (not usally used)
  200.           19+   SRTS SCA  120     -->        Sec. Request To Send
  201.           20    DTR  CD   108.2   -->        Data Terminal Ready
  202.           21*   SQ   CG   110     <--        Signal Quality
  203.           22    RI   CE   125     <--        Ring Indicator
  204.           23*        CH   111     -->        Data Rate Selector 
  205.                      CI   112     <--        Data Rate Selector
  206.           24*   XTC  DA   113     -->        Ext. Transmit Clock
  207.           25*                     -->        Busy
  208.  
  209.    In the above, the character following the pin number means:
  210.  
  211.      *    rarely used
  212.  
  213.      +    used only if secondary channel implemented
  214.  
  215.      #    used only on synchronous interfaces
  216.  
  217.  
  218.  
  219.  
  220. Also, the direction of the arrow indicates which end (DTE or DCE) originates 
  221.  each signal,  except for the ground lines (---).  For example, circuit 2 (TD) 
  222. is originated by the DTE, and received by the DCE.  Certain of the above 
  223. circuits (11,  14, 16, and 18) are used only by (or in a different way by) 
  224. Bell 208A modems.
  225.  
  226. A  secondary channel is sometimes used to provide a very  slow (5  to  10 
  227. bits per second) path for return information (such  as ACK or NAK characters) 
  228. on a primarily half duplex channel. If the modem  used  suppports  this 
  229. feature,  it  is  possible  for  the receiver  to accept or reject a message 
  230. without having  to  'turn the  line  around',  a  process  that usally  takes  
  231. 100  to  200 milliseconds. 
  232.  
  233. On  the above circuits,  all voltages are with respect to  the Signal Ground 
  234. (SG) line. The following conventions are used:
  235.  
  236.                    Voltage        Signal    Logic     Control
  237.          
  238.                    +3 to +25      SPACE       0          On
  239.                    -3 to -25      MARK        1          Off
  240.  
  241.  
  242.  
  243.  
  244.  
  245.  
  246.  
  247.  
  248.  
  249.  
  250. Note  that the voltage values are inverted from the logic  
  251. values (e.g.  the  more  positive logic value corresponds  
  252. to  the  more negative  voltage).  Note also that a logic 0 
  253. corresponds to  the signal  name being 'true' (e.g.  if the 
  254. DTR line is at  logic  0, that is,  in the +3 to +25 voltage 
  255. range,  then the Data Terminal IS Ready).
  256.  
  257.                                                                 RS232 DATA
  258.                                                                 LINE
  259.                                                                 DEFINITIONS
  260.                                                                 <232DEF>
  261.