home *** CD-ROM | disk | FTP | other *** search
-
-
-
-
-
-
-
-
- ───────────────────────────────────────────────────────────────────────────────
- ▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌
- ───────────────────────────────────────────────────────────────────────────────
- ╓──────┐ ╓─────┐ ╓─────┐ ╓─────┐ ╓─────┐
- ║ ┌──╖ │ ║ ┌───┘ ╙───╖ │ ╙───╖ │ ╙───╖ │
- ║ └──╜ │ ║ └───┐ ╓─────┐ ╓───╜ │ ╓─╜ │ ╓───╜ │
- ║ ┌─╖ ┌┘ ╙───╖ │ ╙─────┘ ║ ┌───┘ ╙─╖ │ ║ ┌───┘
- ║ │ ║ └┐ ╓───╜ │ ║ └───┐ ╓───╜ │ ║ └───┐
- ╙─┘ ╙──┘ ╙─────┘ ╙─────┘ ╙─────┘ ╙─────┘
- ───────────────────────────────────────────────────────────────────────────────
- ▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌
- ───────────────────────────────────────────────────────────────────────────────
-
-
-
- Press PgDn to continue...
-
-
-
-
-
-
-
-
- The following information is intended to collect together in one place,
- and explain in relatively simple terms, enough of the details of the RS-232
- standard to allow a technician to construct and/or debug interfaces
- between any two "RS-232 Compatible" devices.
-
- This guide is necessary due to the casual way that vendors implement
- "RS-232" interfaces, sometimes omitting required signals, requiring
- optional ones, or worse, implementing signals incorrectly. Due to this,
- and a lack of readily available information about the real EIA
- standard, there is often considerable confusion involved in trying to
- interface two RS-232 devices.
-
-
-
-
-
-
- BACKGROUND
-
-
- RS-232-C is the most recent version of the EIA (Electronics Industry
- Association) standard for low speed serial data communication. It
- defines a number of parameters concerning voltage levels, loading
- characteristics and timing relationships. The actual connectors which are
- almost universally used (DB-25P and DB-25S, sometimes called "EIA connec-
- tors") are recommended, but not mandatory. Typical practice requires
- mounting the female (DB-25S) connector on the chassis of communication
- equipment, and male (DB-25P) connectors on the cable connecting two
- such devices.
-
- There are two main classes of RS-232 devices, namely DTE (Data Terminal
- Equipment), such as terminals, and DCE (Data Communication Equip-
- ment), such as modems. Typically, one only interfaces a DTE to a DCE, as
- opposed to one DTE to another DTE, or one DCE to another DCE, although
- there are ways to do the later two by building non-standard cables.
- Rarely if ever are more than two devices involved in a given interface
- (multidrop is not supported). A serial port on a computer may be implemented
- as either DTE or DCE, depending on what type of device it is intended
- to support.
-
-
-
-
- RS-232 is intended for relatively short (50 feet or less), relatively low
- speed (19,200 bits per second or less) serial (as opposed to parallel)
- communications. Both asynchronous and synchronous serial encoding are
- supported. As 'digital' signals (switched D.C. voltage, such as square
- waves) are used, as opposed to 'analog' signals (continuously varying
- voltage, such as sine waves) a very wide bandwidth channel (such as
- direct wire) is required. A limited bandwidth channel (such as a phone
- circuit) would cause severe and unacceptable distortion and consequent
- loss of information.
-
- RS-232 will support simplex, half-duplex, or full-duplex type channels. In a
- simplex channel, data will only ever be travelling in one direction, e.g.
- from DCE to DTE. An example might be a 'Receive Only' printer. In a
- half-duplex channel, data may travel in either direction, but at any given
- time data will only be travelling in one direction, and the line must be
- 'turned around' before data can travel in the other direction. An example
- might be a Bell 201 style modem. In a full-duplex channel, data may
- travel in both directions simultaneously. An example might be a Bell 103
- style modem. Certain of the RS-232 'hand-shaking' lines are used to resolve
- problems associated with these modes, such as which direction data may travel
- at any given instant.
-
-
- If one of the devices involved in an RS-232 interface is a real modem
- (especially a half-duplex modem), the 'hand-shaking' lines must be support-
- ed, and the timing relationships between them are quite important. These
- lines are typically much easier to deal with if no modems are involved. In
- certain cases, these lines may be used to allow one device (which is
- receiving data at a higher rate than it is capable of processing indefinite-
- ly) to cause the other device to pause while the first one 'catches up'.
- This use of the hand-shaking lines was not really intended by the designers
- of the RS-232 standard, but it is a useful by-product of the way such
- interfaces are typically implemented.
-
- Much of the RS-232 standard is concerned with support of 'modems'.
- These are devices which can convert a serial digital data signal into an
- analog signal compatible with a narrow bandwidth (e.g. 3 kHz) channel
- such as a switched telephone circuit, and back into serial digital data
- on the other end. The first process is called 'MOdulation', and the second
- process is called 'DEModulation', hence the term 'MODEM'. The actual process
- used (at data rates of up to 1200 bits per second) is FSK (Frequency
- Shift Keying), in which a constant frequency sine wave (called the
- 'carrier') is shifted to a slightly higher or slightly lower frequen-
- cy to represent a logic 0 or logic 1, respectively. In a half duplex
- modem, the entire available bandwidth is used for one direction.
-
-
-
-
-
-
-
-
-
- In a full duplex modem, the available bandwidth is divided into two
- sub-bands, hence there is both an 'originate carrier' (e.g. for data from
- the terminal to the computer), and an 'answer carrier' (e.g. for data from
- the computer to the terminal). The actual frequencies (in Hertz) used on the
- Bell 103A full duplex modem are:
-
- Signal State Originate Answer
-
- logic 0 SPACE 1180 1850
- carrier 1080 1750
- logic 1 MARK 980 1650
-
-
-
-
-
-
-
-
-
-
- THE STANDARD CIRCUITS AND THEIR DEFINITIONS
-
- For the purposes of the RS-232 standard, a 'circuit' is defined to
- be a continuous wire from one device to the other. There are 25 circuits
- in the full specification, less than half of which are at all likely to be
- found in a given interface. In the simplest case, a full-duplex inter-
- face may be implemented with as few as 3 circuits. There is a certain amount
- of confusion associated with the names of these circuits, partly because
- there are three different naming conventions (common name, EIA circuit name,
- and CCITT circuit name). The table below lists all three names, along with
- the circuit number (which is also the connector pin with which that circuit
- is normally associated on both ends). Note that the signal names are from
- the viewpoint of the DTE (e.g. Transmit Data is data being sent by the
- DTE, but received by the DCE).
-
-
-
-
-
-
-
-
-
- PIN NAME EIA CCITT DTE DCE FUNCTION
-
- 1 CG AA 101 --- Chassis Ground
- 2 TD BA 103 --> Transmit Data
- 3 RD BB 104 <-- Receive Data
- 4 RTS CA 105 --> Request To Send
- 5 CTS CB 106 <-- Clear To Send
- 6 DSR CC 107 <-- Data Set Ready
- 7 SG AB 102 --- Signal Ground
- 8 DCD CF 109 <-- Data Carrier Detect
- 9* <-- Pos. Test Voltage
- 10* <-- Neg. Test Voltage
- 11 (usually not used)
- 12+ SCDC SCF 122 <-- Sec. Data Car. Detect
- 13+ SCTS SCB 121 <-- Sec. Clear To Send
- 14+ STD SBA 118 --> Sec. Transmit Data
- 15# TC DB 114 <-- Transmit Clock
-
-
-
-
- PIN NAME EIA CCITT DTE DCE FUNCTION
-
- 16+ SRD SBB 119 <-- Sec. Receive Data
- 17# RC DD 115 <-- Receive Clock
- 18 (not usally used)
- 19+ SRTS SCA 120 --> Sec. Request To Send
- 20 DTR CD 108.2 --> Data Terminal Ready
- 21* SQ CG 110 <-- Signal Quality
- 22 RI CE 125 <-- Ring Indicator
- 23* CH 111 --> Data Rate Selector
- CI 112 <-- Data Rate Selector
- 24* XTC DA 113 --> Ext. Transmit Clock
- 25* --> Busy
-
- In the above, the character following the pin number means:
-
- * rarely used
-
- + used only if secondary channel implemented
-
- # used only on synchronous interfaces
-
-
-
-
- Also, the direction of the arrow indicates which end (DTE or DCE) originates
- each signal, except for the ground lines (---). For example, circuit 2 (TD)
- is originated by the DTE, and received by the DCE. Certain of the above
- circuits (11, 14, 16, and 18) are used only by (or in a different way by)
- Bell 208A modems.
-
- A secondary channel is sometimes used to provide a very slow (5 to 10
- bits per second) path for return information (such as ACK or NAK characters)
- on a primarily half duplex channel. If the modem used suppports this
- feature, it is possible for the receiver to accept or reject a message
- without having to 'turn the line around', a process that usally takes
- 100 to 200 milliseconds.
-
- On the above circuits, all voltages are with respect to the Signal Ground
- (SG) line. The following conventions are used:
-
- Voltage Signal Logic Control
-
- +3 to +25 SPACE 0 On
- -3 to -25 MARK 1 Off
-
-
-
-
-
-
-
-
-
-
- Note that the voltage values are inverted from the logic
- values (e.g. the more positive logic value corresponds
- to the more negative voltage). Note also that a logic 0
- corresponds to the signal name being 'true' (e.g. if the
- DTR line is at logic 0, that is, in the +3 to +25 voltage
- range, then the Data Terminal IS Ready).
-
- RS232 DATA
- LINE
- DEFINITIONS
- <232DEF>
-