RS-232 interface lines and their usage
INDUSTRIAL LCD DISPLAYS / IGBT MODULES DISTRIBUTOR

Infineon / Mitsubishi / Fuji / Semikron / Eupec / IXYS

RS-232 interface lines and their usage

Posted Date: 2024-01-14

The RS-232/V24 serial interface communication standard has been widely used for many years. It is still used in some cases, particularly in existing installations, although its use is now declining as Ethernet and other standards take its place.

RS232/V24 can be found in many areas, from computers to remote terminals and more. It is an efficient way to provide a serial data connection and is therefore widely used.

Basic knowledge of RS-232 interface

The interface is designed to operate over a distance of up to 15 meters. This is because any modem may be near the terminal. Data rates are also limited. The maximum for RS-232C is 19.2 k baud, or bits per second, but slower rates are typically used. In theory any baud rate can be used, but there are zone numbers for the standard transmission speeds used.

Please note that these rates only represent theoretical maximum transfer speeds, and actual transfer rates may be affected by a variety of factors, such as network congestion, device performance, etc. In addition, different transmission media (such as optical fiber, wireless network) and protocols (such as USB, HDMI) also have different rate limits.

Common data transfer rates

50 75 110 150 300 600 1200 2400 4800 9600 19200 38400 76800

NOTE: Speeds up to 19200 bits per second are typically used. Noise picked up above this, especially on long cable runs, can cause data errors. If high speed and long data runs are required, standards such as RS422 can be used.

RS-232 connection

The RS-232C specification does not include a description of the connector to be used. However, the most common type is the 25-pin D-type connector.

RS232 signal level

Voltage level is one of the main items in the specification. For RS232 data signals, a voltage between -3V and -25V represents a logic 1. Logic 0 is represented by a voltage between +3V and +25V. The control signals are in the "ON" state if their voltages are between +3V and +25V, and in the "OFF" state if they are negative, i.e. between -3V and -25V.

Data is sent serially on RS232, each bit being sent one after the other as there is only one data line in each direction. This data transfer mode also requires the receiver to know when the actual data bits arrive so that it can synchronize with the incoming data. To achieve this, a logic 0 is sent as the synchronized start bit. Next is the data itself, usually seven or eight bits. The receiver obviously has to know how many data bits to expect, and there's usually a small dip switch on the back or inside the device that sets this information.

Data on RS232 is usually sent using ASCII (American Standard Code for Information Interchange). However, other codes, including Murray codes or EBCDIC (Extended Binary Coded Decimal Interchange Code) can be used equally well.

After the data itself, a parity bit is sent. Again, this needs to be set, and since it's optional, it can be even or odd parity. This is used to check the correctness of the received data, it can indicate whether the data has an odd or even number of logics. Unlike many systems today, it has no error correction capabilities.

Finally the stop bit is sent. This is usually one bit long and is used to indicate the end of a specific byte. Sometimes two stop bits are required, and this is usually an option that can be set on the device.

RS232 data transmission is usually asynchronous. However, the transmission and reception speeds obviously have to be the same. Allow a certain amount of tolerance. After the start bit is sent, the receiver samples the center of each bit to see the level. Within each data word, synchronization must not differ by more than half a bit length, otherwise you will see incorrect data. Fortunately, this is easy to achieve with today's accurate bit or baud rate generators.

Lines and their uses

Four types of lines are defined in the RS232 specification. They are data, control, timing and ground. Not all of these are required. Very simple communications can be established using very few lines. When looking at lines and their functions, it is necessary to remember that they are defined for the connection between a modem (data set or communication device) and a terminal or computer (data terminal equipment). All lines have directions, and one-to-one cables work fine when used this way.

The most obvious line is the data line. There are two of them, one for data transmitted in each direction. Transmit data is transmitted on pin 2 and receive data on line 3.

The most basic control circuit is data carrier detection (DCD). This shows when the modem detects a carrier on the phone line and the connection appears to be established. It generates a high voltage that remains high until the connection is lost.

Data Terminal Ready (DTR) and Data Set Ready (DSR) are the main control circuits. They carry primary information between the terminal and the modem. When the terminal is ready to start processing data, it flags the data on the DTR line. If the modem is also ready, it returns its signal on the DSR line. These circuits are mainly used in telephone circuits. Once the connection is established, the modem will use DTR to connect to the line. This connection will remain until the terminal goes offline when the DTR line is disconnected. The modem will detect this and release the phone line.

Sometimes pin 20 is not assigned to DTR. Instead there is another signal called "Connect Data Set to Line" (CDSTL). This is essentially the same as DTR, except that DTR only allows the modem to switch to the phone line. CDSTL commands the modem to switch, although it may be performing any other operation.

Two additional circuits are used, Request to Send (RTS) and Clear to Send (CTS). This pair of circuits are used together. The end device will mark that it has data to send. The modem will then return the CTS signal to clear completely after a short delay.

This signaling is especially used when switching carriers are used. This means that the operator is only present on the line when there is data to send. It comes into play when a central modem serves several other modems in remote locations.

auxiliary line

There are two types of lines specified in the RS-232 specification. There are some main channels that are commonly used and run at normal or higher data rates. However, an auxiliary channel for providing control information is also specified. If it is used, it will typically send data at a much slower rate than the main channel.

Since secondary wiring is rarely used or even implemented on devices, manufacturers often use these connector pins for other purposes. With this in mind, it's worth checking that the lines aren't being used for another purpose before considering using them. When using a secondary system, the handshake signals operate in the same manner as the primary circuit.

ground

The ground connection is also important. There are two. First, protective grounding ensures that both devices are at the same ground potential. This is useful when any one piece of equipment may not be grounded. Signal ground serves as a return path for digital signals traveling along a data link. It is important that large currents that are not part of the signal do not flow along this line, otherwise data errors may occur.

RS232/V24 is still used in some areas, but it has been replaced by faster and more convenient forms of data communication such as Ethernet, USB, etc. Despite this, it continues to be used in some applications.

Review Editor: Huang Fei


#RS232 #interface #lines #usage