ENCYCLOPEDIA OF RADIO ELECTRONICS AND ELECTRICAL ENGINEERING RS-232C interface. Encyclopedia of radio electronics and electrical engineering Encyclopedia of radio electronics and electrical engineering / Computers The RS-232C interface is designed to connect equipment that transmits or receives data (DTE - data terminal equipment, or ADF - data transmission equipment; DTE - Data Terminal Equipment) to the terminal equipment of data channels (DCE; DCE - Data Communication Equipment). The role of the ADF can be a computer, printer, plotter and other peripheral equipment. The modem usually acts as the DCE. The ultimate purpose of a connection is to connect two ADFs. The complete connection diagram is shown in fig. one; The interface allows you to eliminate the remote communication channel along with a pair of DCE devices by connecting the devices directly using a null modem cable (Fig. 1).
The standard describes interface control signals, data transfer, electrical interface and connector types. The standard provides for asynchronous and synchronous communication modes, but COM ports only support asynchronous mode. Functionally, RS-232C is equivalent to CCITT V.24/V.28 and C2 interface, but they have different signal names. The RS-232C standard describes unbalanced transmitters and receivers - the signal is transmitted relative to a common wire - circuit ground (balanced differential signals are used in other interfaces - for example, RS-422). The interface does not provide galvanic isolation of devices. The logical one (MARK state) at the data input (RxD signal) corresponds to the voltage range from -12 to -3 V; logic zero - from +3 to +12 V (SPACE state). For control signal inputs, the ON state ("on") corresponds to the range from +3 to +12 V, the OFF state ("off") - from -12 to -3 V. The range from -3 to +3 V is the dead zone, which determines receiver hysteresis: the line state will be considered changed only after crossing the threshold (Fig. 3). The signal levels at the outputs of the transmitters must be in the ranges from -12 to -5 V and from +5 to +12 V. The potential difference between the circuit grounds (SG) of the connected devices must be less than 2 V, with a higher potential difference, incorrect perception of signals is possible . Note that TTL level signals (at the inputs and outputs of UART chips) are transmitted in direct code for the TxD and RxD lines and in inverse code for all the others. The interface assumes a protective earth connection for the connected devices if they are both powered by AC power and have line filters. Attention!
Connection and disconnection of interface cables of self-powered devices must be carried out with the power off. Otherwise, the difference in unbalanced device potentials at the time of switching may be applied to the output or input (which is more dangerous) interface circuits and disable the microcircuits. The RS-232C standard regulates the types of connectors used. On ADF equipment (including COM ports), it is customary to install DB-25P plugs or a more compact version - DB-9P. Nine-pin connectors do not have pins for the additional signals required for synchronous mode (most 25-pin connectors do not use these pins). DB-25S or DB-9S sockets are installed on AKD equipment (modems). This rule assumes that AKD connectors can be connected to ADF connectors directly or via "straight" female and male adapter cables with pins connected one to one. Adapter cables can also be adapters from 9 to 25-pin connectors (Fig. 4). If the ADF equipment is connected without modems, then the device connectors (plugs) are connected to each other by a null-modem cable (Zero-modem, or Z-modem), which has sockets at both ends, the contacts of which are connected crosswise according to one of the diagrams shown in Fig. 5.
If an outlet is installed on any ADF device, it is almost 100% that it must be connected to another device with a direct cable, similar to a modem connection cable. The socket is usually installed on those devices that do not have a remote connection via a modem. In table. 1 shows the pin assignment of the COM ports (and any other ADF data transmission equipment). The pins of the DB-25S connector are defined by the EIA/TIA-232-E standard, the DB-9S connector is defined by the EIA/TIA-574 standard. Modems (AKD) have the same name of circuits and contacts, but the roles of signals (input-output) are reversed. Table 1. Connectors and signals of the RS-232C interface
1 8-bit multicard ribbon cable. 2 Ribbon cable for 16-bit multicards and ports on motherboards. 3 Ribbon cable option for ports on motherboards. 4 Wide ribbon cable to 25-pin connector. The subset of RS-232C signals related to the asynchronous mode will be considered from the point of view of the PC COM port. For convenience, we will use the mnemonic names adopted in the descriptions of COM ports and most devices (it differs from the faceless RS-232 and V.24 designations). Recall that the active state of the control signals ("on") and the zero value of the transmitted data bit correspond to a positive potential (above +3 V) of the interface signal, and the "off" state and a single bit correspond to a negative potential (below -3 V). The purpose of the interface signals is given in Table. 2. The normal sequence of control signals for the case of connecting a modem to a COM port is illustrated in fig. 6. Table 2. Purpose of RS-232C interface signals
From this sequence, the DTR-DSR and RTS-CTS connections on null modem cables become clear. Asynchronous transfer mode The asynchronous transfer mode is byte-oriented (character-oriented): the minimum unit of information sent is one byte (one character). The byte sending format is illustrated in Fig. 7. The transmission of each byte begins with a start bit, signaling the receiver to start sending, followed by data bits and possibly a parity bit. Ends the send with a stop bit, which guarantees a pause between sends. The start bit of the next byte is sent at any time after the stop bit, that is, pauses of arbitrary duration are possible between transmissions. The start bit, which always has a strictly defined value (logical 0), provides a simple mechanism for synchronizing the receiver with a signal from the transmitter. The receiver and transmitter are assumed to operate at the same baud rate. The receiver's internal clock generator uses a reference frequency divider counter that is reset to zero when the start bit is received. This counter generates internal strobes by which the receiver fixes subsequent received bits. Ideally, the strobes are located in the middle of the bit intervals, which allows you to receive data even with a slight mismatch in the speeds of the receiver and transmitter. Obviously, when transmitting 8 data bits, one control bit and one stop bit, the maximum allowable rate mismatch at which the data will be recognized correctly cannot exceed 5%. Taking into account phase distortions and the discreteness of the operation of the internal synchronization counter, a smaller frequency deviation is actually acceptable. The smaller the division ratio of the reference frequency of the internal oscillator (the higher the transmission frequency), the greater the error of strobe binding to the middle of the bit interval, and the requirements for frequency consistency become more stringent. The higher the transmission frequency, the greater the effect of edge distortion on the phase of the received signal. The interaction of these factors leads to an increase in the requirements for the consistency of the frequencies of the receiver and transmitter with an increase in the exchange frequency.
The asynchronous send format allows you to detect possible transmission errors. The asynchronous send format allows you to detect possible transmission errors.
For asynchronous mode, a number of standard exchange rates have been adopted: 50, 75, 110, 150, 300, 600, 1200, 2400, 4800, 9600, 19200, 38400, 57600 and 115200 bps. Sometimes "baud" (baud) is used instead of the unit of measure "bps", but this is incorrect when considering binary transmitted signals. In bauds, it is customary to measure the frequency of line state changes, and with a non-binary coding method (widely used in modern modems), the bit rate (bps) and signal changes (baud) in the communication channel can differ several times. The number of data bits can be 5, 6, 7 or 8 (5- and 6-bit formats are not widely used). The number of stop bits can be 1, 1,5 or 2 ("one and a half bits" means only the duration of the stop interval). Data flow control To control the flow of data (Flow Control), two protocol options can be used - hardware and software. Flow control is sometimes confused with handshaking. Handshaking involves sending a notification that an element has been received, while flow control involves sending a notification about the possibility or impossibility of receiving data later. Flow control is often based on a handshaking mechanism. The hardware flow control protocol RTS/CTS (hardware flow control) uses the CTS signal, which allows you to stop the transfer of data if the receiver is not ready to receive them (Fig. 8). The transmitter "releases" the next byte only when the CTS line is on. A byte that has already begun to be transmitted cannot be delayed by the CTS signal (this guarantees the integrity of the message). The hardware protocol provides the fastest response of the transmitter to the state of the receiver. Chips of asynchronous transceivers have at least two registers in the receiving part - shift, for receiving the next message, and storage, from which the received byte is read. This allows you to implement an exchange using a hardware protocol without data loss.
The hardware protocol is convenient to use when connecting printers and plotters, if they support it. When connecting two computers directly (without modems), the hardware protocol requires a cross-connection of the RTS - CTS lines. With a direct connection, the transmitting terminal must be provided with the "on" state on the CTS line (by connecting its own RTS - CTS lines), otherwise the transmitter will be "silent". The 8250/16450/16550 transceivers used in the IBM PC do not process the CTS signal in hardware, but only show its state in the MSR register. The implementation of the RTS/CTS protocol is assigned to the BIOS Int 14h driver, and it is not entirely correct to call it "hardware". If the program using the COM port interacts with the UART at the register level (and not through the BIOS), then it handles the processing of the CTS signal to support this protocol itself. A number of communication programs allow you to ignore the CTS signal (unless a modem is used), and they do not need to connect the CTS input to the output of even their own RTS signal. However, there are other transceivers (for example, 8251) in which the CTS signal is processed by hardware. For them, as well as for "honest" programs, the use of the CTS signal on connectors (and even on cables) is mandatory. The XON/XOFF flow control software protocol assumes the presence of a bidirectional data channel. The protocol works as follows: if the device that receives data detects reasons why it can no longer receive it, it sends the XOFF (13h) byte character over the reverse serial channel. The opposite device, having received this character, suspends transmission. When the receiving device becomes ready to receive data again, it sends an XON character (11h), upon receipt of which the opposite device resumes transmission. The response time of the transmitter to a change in the state of the receiver, compared to the hardware protocol, increases by at least the time of transmitting a character (XON or XOFF) plus the response time of the transmitter program to receiving a character (Fig. 9). It follows from this that lossless data can only be received by a receiver that has an additional received data buffer and signals unavailability in advance (having free space in the buffer).
The advantage of the software protocol is that there is no need to transmit interface control signals - the minimum cable for two-way exchange can have only 3 wires (see Fig. 5, a). The disadvantage, in addition to the mandatory presence of a buffer and a longer response time (reducing the overall performance of the channel due to waiting for the XON signal), is the complexity of implementing a full duplex exchange mode. In this case, flow control characters must be extracted (and processed) from the stream of received data, which limits the set of transmitted characters. In addition to these two common standard protocols supported by both the PU and the OS, there are others. Publication: cxem.net See other articles Section Computers. Read and write useful comments on this article. Latest news of science and technology, new electronics: Artificial leather for touch emulation
15.04.2024 Petgugu Global cat litter
15.04.2024 The attractiveness of caring men
14.04.2024
Other interesting news: ▪ Robots LG CLOi will support small patients ▪ Poplars will learn to decompose poisons ▪ Infineon unveils world's smallest GPS receiver ▪ A safe and inexpensive way to launch small satellites ▪ Blood vessels are easier to print News feed of science and technology, new electronics
Interesting materials of the Free Technical Library: ▪ section of the Garland website. Article selection ▪ article by Sappho. Famous aphorisms ▪ article Which science was an exception to Socratic I know that I know nothing? Detailed answer ▪ article Kopeck pea. Legends, cultivation, methods of application ▪ article Voltage swing indicator. Encyclopedia of radio electronics and electrical engineering
Leave your comment on this article: All languages of this page Home page | Library | Articles | Website map | Site Reviews www.diagram.com.ua |