Baud rate adaptive method

By detecting signals at the 485 bus receiving end and calculating baud rate, and automatically identifying and adapting to the serial port baud rate, the problem that the existing technology cannot automatically adapt to the polarity inversion of the 485 bus is solved, and baud rate adaptation and automatic identification are realized, improving system stability and reliability.

CN119883715APending Publication Date: 2025-04-25AVIC WEIHAI SHIPYARD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411949017.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-27
Publication Date
2025-04-25

AI Technical Summary

Technical Problem

The prior art cannot automatically adapt to the 485 bus polarity inversion, resulting in communication interruption, data errors, and the inability to automatically learn and identify the serial baud rate of the connected device.

Method used

The signal is detected through the serial port receiving end, the minimum pulse width is captured, the baud rate is calculated, and the serial port baud rate is automatically identified and adapted through numerical data comparison, meeting the standard NEMA0183/MODBUSRTU protocol of the ship system.

Benefits of technology

It realizes baud rate adaptation, automatically learns and recognizes the serial baud rate of the connected device, avoids communication interruptions and data errors, and improves system stability and reliability.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119883715A_ABST
    Figure CN119883715A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of Baud rates, in particular to a Baud rate self-adaption method which is characterized by comprising the following steps: S1, starting; s2, a serial port receiving end detects a signal; s3, capturing the minimum pulse width; s4, calculating a baud rate; and S5, numerical data comparison: entering a next-level protocol serial port if the data numerical value is valid, returning to S3 if the data numerical value is invalid, and re-capturing the minimum pulse signal. The method has the advantages that the method is simple, the process is simple and convenient, Baud rate self-adaption is realized, and the Baud rate of the serial port of the connected equipment is automatically learned and identified.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The invention relates to the technical field of baud rate, in particular to a baud rate self-adaptation method which has simple method and convenient flow, realizes baud rate self-adaptation, and automatically learns and recognizes the baud rate of the serial port of a connected device. Background Art

[0002] As we all know, the 485 bus is a commonly used communication bus in many fields such as industrial control and ship systems. It is widely used due to its advantages of long-distance transmission and multi-node mounting. However, during construction and equipment maintenance, it is very easy for the A and B lines of the 485 bus to be reversed. Conventional equipment cannot automatically adapt to polarity reversal, which in turn causes communication interruption and data errors, seriously affecting system stability and reliability, increasing troubleshooting and repair costs and time, and being unable to automatically learn and automatically identify the serial port baud rate of the connected device. Summary of the invention

[0003] The purpose of the present invention is to solve the above-mentioned deficiencies in the prior art and to provide a baud rate adaptation method which has a simple method and a simple flow, realizes baud rate adaptation, and automatically learns and recognizes the baud rate of the serial port of a connected device.

[0004] The technical solution adopted by the present invention to solve its technical problem is: A baud rate adaptive method, characterized in that the adaptive method steps are as follows: S1, start; S2, serial port receiving end detection signal; S3, capture minimum pulse width; S4, calculate the baud rate; S5, numerical data comparison: If the data value is valid, enter the next level protocol serial port; if the data value is invalid, return to S3 and recapture the minimum pulse signal.

[0005] In the S5 step described in the present invention, the data value effectively enters the standard NEMA0183 / MODBUSRTU protocol of the next level ship system. If the standard NEMA0183 / MODBUSRTU protocol of the ship system is met, the CRC correction is entered. If the correction is correct, the correct signal is directly output. If the correction is wrong, the stop bit check bit is adjusted. After the stop bit check bit correction, the CRC correction is entered. If the standard NEMA0183 / MODBUSRTU protocol of the ship system is not met, an error signal is output, and the program is finally terminated.

[0006] The present invention adopts the method, and has the advantages of simple method, simple flow, realization of baud rate self-adaptation, automatic learning and automatic identification of the serial port baud rate of the connected device, etc. BRIEF DESCRIPTION OF THE DRAWINGS

[0007] Figure 1 It is a flow chart of the present invention. DETAILED DESCRIPTION

[0008] The present invention is further described below in conjunction with the accompanying drawings: As shown in the accompanying drawings, a baud rate adaptive method is characterized in that the adaptive method steps are as follows: S1, start; S2, serial port receiving end detection signal; S3, capture minimum pulse width; S4, calculate the baud rate; S5, numerical data comparison: If the data value is valid, enter the next level protocol serial port; if the data value is invalid, return to S3 and recapture the minimum pulse signal.

[0009] Further, in the S5 step, the data value effectively enters the standard NEMA0183 / MODBUSRTU protocol of the next level ship system. If the standard NEMA0183 / MODBUSRTU protocol of the ship system is met, the CRC correction is entered. If the correction is correct, the correct signal is directly output. If the correction is wrong, the stop bit check bit is adjusted. After the stop bit check bit correction, the CRC correction is entered. If it does not meet the standard NEMA0183 / MODBUSRTU protocol of the ship system, an error signal is output and the program is finally terminated.

[0010] The steps of the present invention are mainly analyzed as follows: 1. Frequency characteristic analysis: The frequency characteristics of the collected data signal are calculated, and the system automatically captures and measures the width of each high and low level.

[0011] 2. Baud rate calculation: Calculate the current bus baud rate based on the extracted minimum pulse width. The microcontroller can calculate the baud rate of the device by capturing the low level of the minimum pulse width, thereby achieving baud rate adaptation.

[0012] 3. Baud rate comparison and verification: The system automatically adjusts the baud rate to the bus value to determine whether the received data is valid data. The system can automatically identify the standard NEMA 0183 protocol and MODBUS RTU protocol for ship systems, automatically parse, and calculate CRC check. For the above two ship protocols, the system will automatically try to match the stop bit, data bit, and check bit in the communication, and automatically adjust to meet the application of ships.

[0013] The present invention adopts the method, and has the advantages of simple method, simple flow, realization of baud rate self-adaptation, automatic learning and automatic identification of the serial port baud rate of the connected device, etc.

Claims

1. A baud rate adaptive method, characterized in that The steps of the adaptive method are as follows: S1, start; S2, serial port receiving end detection signal; S3, capture minimum pulse width; S4, calculate the baud rate; S5, numerical data comparison: If the data value is valid, enter the next level protocol serial port; if the data value is invalid, return to S3 and recapture the minimum pulse signal.

2. A baud rate adaptive method according to claim 1, characterized in that In the S5 step, the data value effectively enters the standard NEMA0183 / MODBUSRTU protocol of the next level ship system. If the standard NEMA0183 / MODBUSRTU protocol of the ship system is met, the CRC correction is entered. If the correction is correct, the correct signal is directly output. If the correction is wrong, the stop bit check bit is adjusted. After the stop bit check bit correction, the CRC correction is entered. If it does not meet the standard NEMA0183 / MODBUSRTU protocol of the ship system, an error signal is output and the program is finally terminated.