What is the function of serial port?
Serial port (full name serial interface), also known as serial communication interface or serial communication interface (usually referred to as COM interface), is an extended interface using serial communication.
Serial Interface (SerialInterface) refers to the sequential transmission of data one by one, which is characterized by simple communication lines, as long as a pair of transmission lines can realize two-way communication (the telephone line can be directly used as a transmission line), thus greatly reducing the cost, especially It is suitable for long-distance communication, but the transmission speed is slow. Модуль 4G
The working principle of the serial port server is to make the serial port data stream transmission based on TCP/IP, it can connect many serial port devices, and can realize the two-way transparent transmission of serial port data and the network port. In practical applications, the data of the existing RS232/RS485 interface is converted into the data of the IP port, and then the IP-based management and IP-based data access are performed, so that the traditional serial data can be sent to the popular IP Channels can be installed without premature elimination of the original equipment, thereby improving the utilization of existing equipment, saving investment, and simplifying the wiring complexity on the basis of the existing network.
The industrial-grade serial port server is actually the industrial-grade serial port server. Although serial servers are not only used in industrial scenarios, but also in commercial environments such as buildings, security access control, and traffic lights. Industrial grade is used in the production process, and the specific content standard is determined according to the product properties. The industrial-grade serial server usually needs to reach the working temperature of -40°C-85°C to adapt to normal work in the harsh environment of severe cold and heat. Commercial-grade serial port servers are usually used at -25 to 75°C, which is sufficient for practical scenarios.
The principle of serial port sending and receiving
The concept of serial communication is very simple. Serial communication refers to a communication method in which data is transmitted bit by bit between peripherals and computers through data signal lines, ground lines, control lines, etc. This communication method uses fewer data lines and can save communication costs in long-distance communication, but its transmission speed is lower than that of parallel transmission. It is simple and enables long-distance communication.
Communication is done using 3 wires: (1) ground, (2) transmit, (3) receive. Because serial communication is asynchronous, the port can send data on one wire while receiving data on the other. Other lines are used for handshake, but are not required. UART-модуль
The most important parameters of serial communication are baud rate, data bits, stop bits and parity. For two ports communicating, these parameters must match:
(1) Baud rate: This is a parameter that measures the communication speed. It represents the number of bits transmitted per second. High baud rates are often used for communication between instruments placed in close proximity, a typical example being the communication of GPIB devices.
(2) Data bits: This is a parameter that measures the actual data bits in communication. When a computer sends a packet, the actual data will not be 8 bits, the standard values are 5, 7 and 8 bits. Since the actual data bits depend on the choice of communication protocol, the term "packet" refers to any communication situation.
(3) Stop bit: used to represent the last bit of a single packet. Typical values are 1, 1.5 and 2 bits. The more bits available for stop bits, the greater the tolerance for different clock synchronizations, but the slower the data transfer rate.
(4) Parity bit: a simple error detection method in serial communication. There are four error detection modes: even, odd, high and low. For the case of even and odd parity, the serial port will set the parity bit, and use a value to ensure that the transmitted data has even or odd logic high bits.
Ebyte — национальное высокотехнологичное предприятие, специализирующееся на исследованиях и разработках беспроводных модулей и промышленных IoT-терминалов.