Serial port

Extension interface using serial communication mode
Collection
zero Useful+1
zero
synonym Serial port (Computer term) generally refers to the serial port
Serial interface is also called serial port for short serial communication Interface or Serial communication interface (Usually refers to COM interface ), using serial communication Expansion interface serial Interface (Serial Interface) refers to the sequential transmission of data bit by bit. Its characteristics are Communication line Simple. Only one pair of transmission lines can realize two-way communication (telephone lines can be directly used as transmission lines), which greatly reduces the cost. It is especially suitable for long-distance communication, but the transmission speed is slow.
Chinese name
serial interface
Foreign name
Serial Interface
Alias
Usually refers to COM interface
Abbreviation
Serial port

definition

Announce
edit
Each piece of data of a message is transmitted bit by bit in order Serial communication The characteristics of serial communication are: Data bits The transmission of is carried out in bit order, and only one transmission line is needed at least; Low cost but slow transmission speed. The distance of serial communication can be from several meters to several thousand meters; According to the transmission direction of information, serial communication can be further divided into simplex, half duplex and full duplex.

origin

Announce
edit
Serial port Around 1980, Data transmission rate 115kbps~230kbps. In the early days, serial ports were used to connect computer peripherals. In the early days, serial ports were generally used to connect mouse and external devices Modem As well as old cameras and tablet equipment. The serial port can also be used for the interconnection and data transmission between two computers (or devices). Because serial port (COM) is not supported Hot plug And low transmission rate. Some new mainboards and most portable computers have started to cancel this Interface Serial ports are mostly used in industrial control and measurement equipment and some communication equipment.

Interface division standard

Announce
edit
Synchronous serial interface (English: Synchronous Serial Interface , SSI) is a common industrial communication interface
Asynchronous serial refers to UART (Universal Asynchronous Receiver/Transmitter). UART is a chip with parallel input and serial output, which is usually integrated on the motherboard. UART contains TTL level Serial port and RS232 Level serial port. TTL level It is 3.3V, while RS232 is a negative logic level. It defines+5~+12V as low level, and - 12~- 5V as high level, MDS2710 、MDS SD4、 EL805 Wait for RS232 Interface , EL806 has TTL interface
Serial interface includes RS-232-C RS-422 , RS485, etc. RS-232-C, RS-422 and RS-485 The standard only specifies the electrical characteristics of the interface, and does not involve connectors, cables or protocols.

RS-232

Also called standard Serial port , the most commonly used Serial communication interface It was created in 1970 by Electronic Industry Association of America (EIA) Joint bell system Modem It is jointly formulated by the manufacturer and the computer terminal manufacturer for Serial communication Standards. Its full name is“ [1] Data terminal equipment Technical standard for serial binary data exchange interface between (DTE) and data communication equipment (DCE) ". conventional RS-232 -C Interface There are 22 wires in the standard, and the standard 25 core D-type socket (DB25) is used. Later, it was simplified to 9-core D-type socket (DB9), and the 25 core socket has been rarely used in applications.
RS-232 adopts unbalanced transmission mode, which is called single end communication. Since the difference between the transmission level and the reception level is only about 2V to 3V, its common mode rejection capability is poor. In addition to the distributed capacitance on the twisted pair, the maximum transmission distance is about 15m and the maximum speed is 20kb/s. RS-232 is for Point to point (i.e. only one pair of receiving and transmitting equipment) Driver The load is 3~7k Ω. So RS-232 is suitable for communication between local devices. [2]

RS-422

The full name of the standard is "Balanced Voltage Digital" Interface Electrical characteristics of the circuit ", which defines the characteristics of the interface circuit. A typical RS-422 is a four wire interface. In fact, there is also a signal ground wire, a total of 5 wires. Its DB9 connector pin definition. Because the receiver uses high input impedance and transmission Driver Stronger than RS232 Driving power , so it is allowed to connect multiple receivers on the same transmission line node , up to 10 nodes can be connected. That is, a master device, and the rest are slave devices. Slaves cannot communicate with each other, so RS-422 supports point to many two-way communication. The input impedance of the receiver is 4k, so the maximum load capacity of the transmitter is 10 × 4k+100 Ω (terminal resistance). Since the RS-422 four wire interface uses separate transmission and reception channels, it is unnecessary to control the data direction. Any necessary signal exchange between devices can be realized in software mode (XON/XOFF handshake) or hardware mode (a pair of separate twisted pairs).
The maximum transmission distance of RS-422 is 1219 meters, and the maximum transmission rate is 10 Mb/s. The length of the balanced twisted pair is inversely proportional to the transmission rate. The maximum transmission distance can be reached only when the speed is below 100kb/s. The highest rate transmission can only be achieved in a very short distance. Generally, the maximum transmission rate that can be obtained on a 100 meter long twisted pair is only 1 Mb/s.

RS-485

It is developed from RS-422, so many electrical regulations of RS-485 are similar to RS-422. If the balanced transmission mode is adopted, the terminating resistor shall be connected on the transmission line. RS-485 can adopt two wire and four wire modes. Two wire system can realize true multi-point two-way communication. When using four wire connection, just like RS-422, it can only realize point to many communication, that is, there can only be one master device, and the rest are slave devices. However, it is improved than RS-422. No matter four wire or two wire connection, 32 more devices can be connected to the bus.
The difference between RS-485 and RS-422 is that their common mode output voltage is different. RS-485 is between - 7V and+12V, while RS-422 is between - 7V and+7V. The minimum input impedance of RS-485 receiver is 12k Ω, and that of RS-422 is 4k Ω; Since RS-485 meets all RS-422 specifications Driver It can be applied in RS-422 network.
Like RS-422, RS-485 has a maximum transmission distance of 1219 meters and a maximum transmission rate of 10 Mb/s. The length of the balanced twisted pair is inversely proportional to the transmission rate. The specified longest cable length can be used only when the rate is below 100kb/s. The highest rate transmission can only be achieved in a very short distance. Generally, the maximum transmission rate of 100m twisted pair is only 1Mb/s. [2]

Different from parallel port

Announce
edit
Serial port It can be described as a lane, and Parallel port It means that 8 lanes can transmit 8-bit (one byte) data at the same time. However, it does not mean that the parallel port is fast. Due to the mutual interference (crosstalk) between 8-bit channels, the transmission speed is limited and transmission is prone to errors. Serial ports do not interfere with each other. The parallel port sends a large amount of data at the same time, but it is slower than the serial port. [3] Serial hard disk This is how people attach importance to it.

application

Announce
edit

Serial port of the switch

Switch's Serial port Its English is trunk; It is used for Next Jump route Used for conversion. Each VLAN can be connected to the Internet only after being routed to TRUNK.
Pin explain:
Pin Name Dir Description
1 CD Carrier Detect
2 RXD Receive Data
3 TXD Transmit Data
4 DTR Data Terminal Ready
5 GND System Ground
6 DSR Data Set Ready
7 RTS Request to Send
8 CTS Clear to Send
9 RI Ring Indicator
Commonly used Serial port There are 9-pin serial port (DB9) and 25 pin serial port (DB25). When the communication distance is relatively short (<12m), cable can be used to directly connect to the standard RS232 port (RS422, RS485 are relatively far). If the distance is relatively long, additional Modem (MODEM) or other relevant equipment. The simplest and most commonly used is Three wire system The grounding, receiving data and sending data are connected by three pins. The following involves the most basic connection, which is directly connected by RS232.
(1) Description of common signal pins of DB9 and DB25
DB9 | DB25
pin function name pin function name
1 Data carrier detection DCD 8 Data carrier detection DCD
2 Receive data RXD 3 Receive data RXD
3 Send data TXD 2 Send data TXD
4 Data terminal preparation DTR 20 Data terminal preparation DTR
5 Signal ground GND 7 Signal ground GND
6 Data device ready DSR 6 Data device ready DSR
7 Request to send RTS 4 Request to send RTS
eight Clear Send CTS 5 Clear Send CTS
9 Ringing indication RI 22 Ringing indication RI
(2)RS232C Serial communication Wiring method( Three wire system
first, Serial port The transmission of data can be realized as long as there are receiving data pins and sending pins: the receiving pin and sending pin of the same serial port are directly connected by wire, and two serial ports are connected or one serial port is connected with multiple serial ports.
The receiving pin and the sending pin of the same serial port are directly connected by wire to the 9-pin serial port and the 25 pin serial port, both of which are 2 and 3.
Two different serial ports (either two serial ports of the same computer or serial ports of different computers)
Serial port connecting cable
DB9-DB9
2-3,3-2,5-5
DB25-DB25
2-3,3-2,7-7
DB9-DB25
2-3,3-2,5-7
DB9-DB25 Serial port Adapter cable
2-3,3-2,5-7
The above is the standard for microcomputer Serial port In terms of, there are many non-standard equipment, such as receiving GPS data or electronic compass data. Just remember one principle: the receiving data pin (or line) is connected with the sending data pin (or line), they cross each other, and the signal ground is connected correspondingly.
3. Several points for attention in serial port debugging:
Different coding mechanisms cannot be mixed, for example, RS232C cannot be directly connected with RS422 Interface Connected, various special products on the market converter Sold, can only be connected through a converter.
Prepare a useful debugging tool for serial port debugging, such as Serial port debugging assistant , serial port wizard, etc;
It is strongly recommended not to plug and dial with power Serial port Otherwise, the serial port is easily damaged.
For large industrial control and measuring equipment, it is recommended to use Photocoupler The specific withstand voltage value shall be determined according to the actual demand.

PC motherboard serial port

Serial transmission Interface , it can only transmit 1 Bit at a time. Serial port Can be used to connect external devices Modem , plotter, or serial printer. It can also connect network devices in the way of console connection, such as Router and Switch , which is mainly used to configure them.