Stop bit - a bit indicating the completion of the message transmission, can take the values 1, 1.5 (Data bit = 5), 2. For example, a reduction of 8E1 means that 8 data bits are transmitted, a parity bit is used in EVEN mode and a stop bit occupies one bit.

* For the RS-232 interface, it is not necessary to use all contact lines. Typically, TxD, RxD and GND ground lines are used, the remaining lines are needed to control the data flow. You will learn more about this in the article.

To work with RS-232 devices, you usually need only 3 contacts: RXD, TXD and GND. But some devices require all 9 contacts to support the flow control function.

To match the line at large distances, the RS-485 is also equipped with 120 Ohm termination resistors at the beginning and end of the line.

In full duplex mode, you can simultaneously receive and transmit data, and in half-duplex mode either transmit or receive.

The RS-422 line is 4 wires for data transmission (2 twisted wires for transmission and 2 twisted wires for receiving) and one common GND ground wire.

In one segment of the RS-485 network there can be up to 32 devices, but with the help of additional repeaters and signal amplifiers up to 256 devices. At one time, only one transmitter can be active.

The speed of the RS-232 depends on the distance between the devices, usually at a distance of 15 meters the speed is 9600 bps. At a minimum distance, the speed is usually 115.2 kbps, but there is hardware that supports speeds of up to 921.6 kbps.

In addition to the two receive and transmit lines, special lines for hardware flow control and other functions are available on the RS-232.

The RS-422 interface is similar to RS-232. Allows you to simultaneously send and receive messages on separate lines (full duplex), but uses a differential signal for this, i.e. The potential difference between conductors A and B.

Because the distance between the receiver and the transmitter RS-422 can reach 1200 meters, then to prevent reflection of the signal from the end of the line, a special 120-ohm termination resistor or "terminator" is put. This resistor is set between RX + and RX-contacts at the beginning and end of the line.

The RS-422 standard does not define a specific type of connector, usually it can be a terminal block or a DB9 connector.

The RS-232 interface (TIA / EIA-232) is intended for the organization of data transfer between the transmitter or terminal (Data Terminal Equipment, DTE) and the receiver or communication equipment (Data Communications Equipment, DCE) in the point-to-point scheme.

The software method uses the Xon and Xoff characters (in the ASCII character Xon = 17, Xoff = 19) transmitted using the same TXD / RXD communication lines as the main data instead of the pins. If the data cannot be received, the receiver transmits the Xoff symbol. To resume data transmission, the Xon symbol is sent.

Image

Twisting wires (twisted pair) with each other allows you to get rid of interference and interference, because the interference acts equally on both wires, and the information is extracted from the potential difference between the conductors A and B of one line.

The RS-232 interface operates in full-duplex mode, which allows you to send and receive information at the same time, because different lines are used for receiving and transmitting. This is in contrast to the half-duplex mode, when one link is used to receive and transmit data, which imposes a restriction on simultaneous operation, so in a half-duplex mode at one time, either the reception or transmission of information is possible.

There are three types of connection of devices to RS-232: terminal-terminal DTE-DTE, terminal-communication equipment DTE-DCE, modem-modem DCE-DCE.

In order not to lose data, there is a mechanism for controlling the flow of data, which allows to stop temporarily transferring data to prevent the buffer from overflowing.

The RS-232, RS-422 and RS-485 designations refer to interfaces for digital data transmission. The RS-232 standard is better known as a normal computer COM port or serial port (although Ethernet, FireWire and USB can also be considered as a serial port). The RS-422 and RS-485 interfaces are widely used in the industry for connecting various equipment.

The hardware method uses the RTS / CTS outputs. If the transmitter is ready to send data, then it sets the signal on the RTS line. If the receiver is ready to receive data, it sets the signal on the CTS line. If one of the signals is not set, no data transfer will occur.

On the computer, the RS-232/422/485 interfaces will be represented as a normal COM port. Accordingly, almost any programs and utilities for working with COM port are suitable.

To test devices with RS-422, it is better to use a converter from RS-422 to RS-232 or USB (I-7561U). Then you can use the software to work with the COM port.

If you have a device with RS-485 and you want to test it, the simplest thing is to connect it to a computer via a converter, for example UPort 1150, and use the special software described later.

In industry, the most common interface is RS-485 (EIA-485), because the RS-485 uses a multi-point topology, which allows you to connect several receivers and transmitters.

The data transfer speed in RS-422 depends on the distance and can vary from 10 kbps (1200 meters) to 10 Mbps (10 meters).

The pinout of the RS-485 connector depends on the manufacturer of the device and is specified in the documentation for it.

Image

Information transmitted via RS-232, RS-422 and RS-485 interfaces is structured as a protocol, for example, the Modbus RTU protocol is widely used in the industry.

When using 3 contacts it is enough to close RXD and TXD with each other. Then all the transferred data will be accepted back. If you have a full RS-232, then you need to unzip a special stub. The following contacts must be connected in it: