CN110581814B - Baud rate adjusting method of communication equipment and communication equipment - Google Patents

Baud rate adjusting method of communication equipment and communication equipment Download PDF

Info

Publication number
CN110581814B
CN110581814B CN201910843837.5A CN201910843837A CN110581814B CN 110581814 B CN110581814 B CN 110581814B CN 201910843837 A CN201910843837 A CN 201910843837A CN 110581814 B CN110581814 B CN 110581814B
Authority
CN
China
Prior art keywords
baud rate
communication
adjusting
baud
adjusted
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201910843837.5A
Other languages
Chinese (zh)
Other versions
CN110581814A (en
Inventor
饶添鸿
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Huizhou Factory Jeckson Electric Co Ltd
Original Assignee
Huizhou Factory Jeckson Electric Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Huizhou Factory Jeckson Electric Co Ltd filed Critical Huizhou Factory Jeckson Electric Co Ltd
Priority to CN201910843837.5A priority Critical patent/CN110581814B/en
Publication of CN110581814A publication Critical patent/CN110581814A/en
Application granted granted Critical
Publication of CN110581814B publication Critical patent/CN110581814B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L1/00Arrangements for detecting or preventing errors in the information received
    • H04L1/0001Systems modifying transmission characteristics according to link quality, e.g. power backoff
    • H04L1/0002Systems modifying transmission characteristics according to link quality, e.g. power backoff by adapting the transmission rate
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L25/00Baseband systems
    • H04L25/02Details ; arrangements for supplying electrical power along data transmission lines
    • H04L25/0262Arrangements for detecting the data rate of an incoming signal

Abstract

The invention provides a baud rate adjusting method of communication equipment and the communication equipment, the method comprises: obtaining the preset baud rate of both communication parties; acquiring an error range of the output baud rate of the communication equipment, and acquiring an adjusting range of the baud rate according to a preset baud rate and the error range; inputting an initial baud rate according to a preset baud rate; judging whether the communication equipment can communicate at the current baud rate; when the communication equipment cannot communicate at the current baud rate, adjusting the current baud rate within an adjusting range to obtain the adjusted baud rate; and taking the adjusted baud rate as the current baud rate, returning to the step of continuously judging whether the communication equipment can communicate under the current baud rate, and adjusting the output baud rate of the communication equipment in the adjusting range of the baud rate so that the communication equipment outputs the baud rate capable of normally communicating, thereby not only realizing the normal communication of the communication equipment, but also improving the adjusting efficiency.

Description

Baud rate adjusting method of communication equipment and communication equipment
Technical Field
The invention relates to the technical field of communication systems, in particular to a baud rate adjusting method of communication equipment and the communication equipment.
Background
UART (Universal Asynchronous Receiver/Transmitter) is a Universal serial data bus used for Asynchronous communications. The bus is in bidirectional communication, can realize full duplex transmission and reception, and is commonly used for transmitting data and debugging data. The interface of the UART is a non-source synchronous interface, when two communication devices communicate, the baud rates transmitted by the two communication devices need to be agreed by the two communication devices, that is, the baud rates of the two communication devices need to be identical, so that the UART communication can be realized, and it can be said that the transmission baud rate in the UART communication needs to be within a certain range of a preset baud rate, so that the UART communication can be realized.
However, when designing the UART communication device, the design is limited by the production cost, the volume and other factors, and usually an RC oscillator inside an MCU (micro controller Unit) is used to replace a crystal oscillator as an oscillation source, but the accuracy deviation of the oscillation frequency generated by the RC oscillator is large, and the deviation of the baud rate output by the communication device from a set value is also relatively large, so that the UART communication parties are mismatched.
Disclosure of Invention
Therefore, it is necessary to provide a baud rate adjusting method and a communication device for solving the problems that the deviation between the output baud rate of the communication device and the set value is large and the communication double-shot is unmatched.
A baud rate adjusting method of communication equipment is applied to communication of a universal asynchronous receiver transmitter and a universal asynchronous receiver transmitter, and comprises the following steps: obtaining the preset baud rate of both communication parties; acquiring an error range of an output baud rate of the communication equipment, and acquiring an adjusting range of the baud rate according to the preset baud rate and the error range; inputting an initial baud rate according to the preset baud rate; judging whether the communication equipment can communicate at the current baud rate; when the communication equipment cannot communicate at the current baud rate, adjusting the current baud rate within the adjusting range to obtain the adjusted baud rate; and taking the adjusted baud rate as the current baud rate, and returning to continuously execute the step of judging whether the communication equipment can communicate under the current baud rate.
According to the baud rate adjusting method and the communication equipment, when the communication equipment cannot normally communicate due to large deviation of the output baud rate and the set value, the adjusting range of the baud rate is determined through the error range of the baud rate and the preset baud rate, the output baud rate of the communication equipment is adjusted in the adjusting range of the baud rate, so that the communication equipment outputs the baud rate capable of normally communicating, normal communication of the communication equipment can be realized, and the adjusting efficiency can be improved.
In one embodiment, after the step of determining whether the communication device is capable of communicating at the current baud rate, the method further includes: and when the communication equipment can communicate at the current baud rate, outputting the current baud rate and not executing subsequent steps.
In one embodiment, the step of adjusting the current baud rate within the adjustment range to obtain an adjusted baud rate includes: obtaining a baud rate adjusting value according to the maximum difference of the baud rates of the two communication parties for realizing communication; and in the adjusting range, adjusting the current baud rate according to the adjusting value to obtain the adjusted baud rate.
In one embodiment, the step of adjusting the current baud rate according to the adjustment value in the adjustment range to obtain the adjusted baud rate includes: and summing the current baud rate and the adjusting value within the adjusting range to obtain the adjusted baud rate.
In one embodiment, the adjustment value is less than the baud rate maximum difference.
In one embodiment, the adjustment value is 1/2 to 3/4 of the maximum difference in baud rates.
In one embodiment, before the step of adjusting the current baud rate within the adjustment range to obtain the adjusted baud rate, the method further includes: obtaining an adjustable baud rate according to the adjusting range; judging whether the adjustable baud rate is used by the adjusted baud rate; and when the adjustable baud rate which is not used by the adjusted baud rate exists, executing the step of adjusting the current baud rate in the adjusting range to obtain the adjusted baud rate.
In one embodiment, after the step of determining whether the adjustable baud rate is used by the adjusted baud rate, the method further includes: and when the baud rate adjustable values are used by the adjusted baud rate, outputting an alarm signal without executing subsequent steps.
In one embodiment, the step of obtaining an adjustable baud rate according to the adjustment range includes: and obtaining the adjustable baud rate according to the adjusting range, the initial baud rate and the maximum difference of the baud rates of the two communication parties for realizing communication.
In one embodiment, a communication device adjusts a baud rate by using the baud rate adjustment method of the communication device described in any of the above embodiments.
Drawings
Fig. 1 is a schematic flow chart of a baud rate adjustment method for a communication device according to an embodiment of the present invention;
fig. 2 is a schematic flow chart of a baud rate adjustment method for a communication device according to another embodiment of the present invention;
fig. 3 is a flowchart illustrating a baud rate adjustment method for a communication device according to another embodiment of the present invention.
Detailed Description
To facilitate an understanding of the invention, the invention will now be described more fully with reference to the accompanying drawings. Preferred embodiments of the present invention are shown in the drawings. This invention may, however, be embodied in many different forms and should not be construed as limited to the embodiments set forth herein. Rather, these embodiments are provided so that this disclosure will be thorough and complete.
Unless defined otherwise, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this invention belongs. The terminology used herein in the description of the invention is for the purpose of describing particular embodiments only and is not intended to be limiting of the invention. As used herein, the term "and/or" includes any and all combinations of one or more of the associated listed items.
For example, a baud rate adjusting method for a communication device is provided, which is applied to communication of a universal asynchronous receiver transmitter, and comprises the following steps: obtaining the preset baud rate of both communication parties; acquiring an error range of an output baud rate of the communication equipment, and acquiring an adjusting range of the baud rate according to the preset baud rate and the error range; inputting an initial baud rate according to the preset baud rate; judging whether the communication equipment can communicate at the current baud rate; when the communication equipment cannot communicate at the current baud rate, adjusting the current baud rate within the adjusting range to obtain the adjusted baud rate; and taking the adjusted baud rate as the current baud rate, and returning to continuously execute the step of judging whether the communication equipment can communicate under the current baud rate.
According to the baud rate adjusting method for the communication equipment, when the communication equipment cannot normally communicate due to large deviation of the output baud rate of the communication equipment and a set value, the adjusting range of the baud rate is determined through the error range of the baud rate and the preset baud rate, the output baud rate of the communication equipment is adjusted in the adjusting range of the baud rate, so that the communication equipment outputs the baud rate capable of normally communicating, normal communication of the communication equipment can be realized, and the adjusting efficiency can be improved.
In one embodiment, referring to fig. 1, a baud rate adjustment method for a communication device is applied to communication of a universal asynchronous receiver/transmitter, and includes the following steps:
s110, obtaining the preset baud rate of the two communication parties.
Specifically, the baud rate predetermined by both communication parties, that is, the baud rate agreed by the communication device and the other communication device, is determined by both communication parties, that is, the communication device and the other communication device, in the UART communication, both communication parties can realize communication only by the predetermined baud rate before communication, that is, the baud rates output by both communication parties need to be adjusted to be consistent, or the difference between the baud rates output by both communication parties is within a certain range, so that normal communication between the communication device and the other communication device can be realized.
And S120, acquiring an error range of the output baud rate of the communication equipment, and acquiring an adjusting range of the baud rate according to the preset baud rate and the error range.
Specifically, the communication device includes a baud rate generator that can output a baud rate, since the baud rate output by each communication device has a certain accuracy, the output baud rate has a certain deviation with the set value, the error range of the baud rate output by the communication equipment refers to the deviation range of the baud rate output by the communication equipment according to the set value and the set value, generally, each type of communication equipment can measure the error range of the output baud rate when the communication equipment leaves a factory and the error range is written on a nameplate, therefore, a user can obtain the error range of the output baud rate of the communication equipment by looking at the nameplate of the communication equipment, in addition, the error ranges of the communication equipment with the same type of oscillation source are similar, and the user can also obtain the error range of the output baud rate of the communication equipment according to the type of the oscillation source adopted by the communication equipment.
Specifically, the adjustment range of the baud rate is a range value for adjusting the baud rate output by the communication device, and can be obtained according to the error range of the baud rate output by the communication device and a preset baud rate, and the adjustment range of the baud rate is an adjustment range of a set value of the communication device.
And S130, inputting an initial baud rate according to the preset baud rate.
Specifically, according to the predetermined baud rate, an initial baud rate is input, that is, a set value of the communication device is set to the predetermined baud rate, so as to obtain the initial baud rate. It should be understood that, when a communication device communicates with another communication device, the baud rate of the communication device needs to be adjusted to a predetermined baud rate, but since an actual error of the communication device cannot be determined, a set value of the communication device is usually set at the predetermined baud rate, and the initial baud rate refers to the baud rate actually output when the communication device sets the set value to the predetermined baud rate.
And S140, judging whether the communication equipment can communicate at the current baud rate.
Specifically, whether the communication device can communicate at the current baud rate is judged, that is, whether the communication device normally communicates is judged, that is, whether the absolute value of the difference between the current baud rate of the communication device and the baud rate of another communication device is within the maximum difference range of the baud rates at which the two communication parties can realize communication is judged.
Specifically, the current baud rate is the baud rate currently generated by the communication device, and when the initial baud rate is input and the current baud rate is the initial baud rate at that time, the current baud rate is the adjusted baud rate at that time after the baud rate of the communication device is adjusted.
S150, when the communication equipment can not communicate under the current baud rate, the current baud rate is adjusted in the adjusting range to obtain the adjusted baud rate.
Specifically, when the communication device cannot normally communicate, it is indicated that a difference between the current baud rate of the communication device and the baud rate output by another communication device is large, and the baud rate of the communication device needs to be adjusted to find a matched baud rate to meet the communication requirement. It should be understood that, in the present embodiment, the current baud rate is adjusted by changing the setting value of the communication device, and the adjustment range of the baud rate is the adjustment range of the setting value of the communication device.
Specifically, the current baud rate may be adjusted to any value within an adjustment range, or the current baud rate may be adjusted by adding a fixed adjustment value to the current baud rate, or a plurality of baud rates may be selected within the adjustment range, and the current baud rate may be adjusted to one of the selected baud rates.
And S160, taking the adjusted baud rate as the current baud rate, and returning to continuously execute the step of judging whether the communication equipment can communicate at the current baud rate.
Specifically, the adjusted baud rate is used as the current baud rate to continuously judge whether the adjusted baud rate of the communication device can realize normal communication. In this embodiment, only the baud rate of the communication device is adjusted, and the baud rate of another communication device communicating with the communication device is not adjusted.
According to the baud rate adjusting method for the communication equipment, when the communication equipment cannot normally communicate due to large deviation of the output baud rate of the communication equipment and a set value, the appropriate baud rate is found by adjusting the baud rate of the communication equipment to realize normal communication of both communication sides, in addition, the adjusting range of the baud rate is determined through the error range of the baud rate and the preset baud rate, the output baud rate of the communication equipment is adjusted within the adjusting range of the baud rate to reduce the baud rate adjusting interval, and the adjusting efficiency can be improved.
In one embodiment, after the step of determining whether the communication device is capable of communicating at the current baud rate, the method further includes: and when the communication equipment can communicate at the current baud rate, outputting the current baud rate and not executing subsequent steps. A baud rate adjusting method of communication equipment is applied to communication of a universal asynchronous receiver transmitter and a universal asynchronous receiver transmitter, and comprises the following steps: obtaining the preset baud rate of both communication parties; acquiring an error range of an output baud rate of the communication equipment, and acquiring an adjusting range of the baud rate according to the preset baud rate and the error range; inputting an initial baud rate according to the preset baud rate; judging whether the communication equipment can communicate at the current baud rate; when the communication equipment cannot communicate at the current baud rate, adjusting the current baud rate within the adjusting range to obtain the adjusted baud rate; and taking the adjusted baud rate as the current baud rate, returning to continuously execute the step of judging whether the communication equipment can communicate under the current baud rate, and the like in other embodiments. Specifically, if the communication device can normally communicate at the current baud rate, it is indicated that the baud rate output by the communication device at this time can normally communicate with another communication device, the current baud rate is output, the current baud rate is used as the baud rate value output when the communication device communicates with another communication device, so as to realize normal communication between both communication parties, further, the set value of the baud rate of the communication device at this time can be recorded according to the current baud rate, so as to obtain a first set value, and when the communication device needs to communicate with another communication device subsequently, only the set value of the communication device needs to be adjusted to the first set value, so that normal communication between both communication parties can be realized.
In one embodiment, referring to fig. 2, the step of adjusting the current baud rate within the adjustment range to obtain an adjusted baud rate includes: s151, obtaining a baud rate adjusting value according to the maximum difference of the baud rates of the two communication parties for realizing communication; and S152, in the adjusting range, adjusting the current baud rate according to the adjusting value to obtain the adjusted baud rate. Specifically, the baud rate of the communication realized by the two communication parties is the maximum difference value between the baud rate of the communication equipment and the baud rate of the other communication equipment on the premise that only the communication equipment and the other communication equipment can normally communicate, the maximum difference value of the baud rates is used as an adjustment value, and the current baud rate is adjusted, so that the adjustment amplitude of the baud rate is smaller than the maximum difference value, and the baud rate after adjustment exceeds a proper baud rate range due to the large adjustment amplitude of the baud rate is avoided.
In order to better find out a proper baud rate, in one embodiment, the step of adjusting the current baud rate according to the adjustment value within the adjustment range to obtain an adjusted baud rate includes: and summing the current baud rate and the adjusting value within the adjusting range to obtain the adjusted baud rate. Specifically, each time the current baud rate is adjusted, the adjusted baud rate is obtained by adding the adjustment value to the current baud rate, that is, the baud rate output by the communication device is adjusted in an equal difference mode, and the baud rate is adjusted in an ordered mode.
In one embodiment, the adjustment value is less than the baud rate maximum difference. Specifically, the adjustment value is smaller than the maximum difference of the baud rates, and the adjustment amplitude of the current baud rate is smaller than the maximum difference of the baud rates each time the current baud rate is adjusted, that is, the adjusted baud rate does not exceed the appropriate baud rate each time the current baud rate is adjusted, so that the baud rate output by the communication device can be better adjusted by setting the adjustment value to be smaller than the maximum difference of the baud rates.
In one embodiment, the adjustment value is 1/2 to 3/4 of the maximum difference in baud rates. It should be understood that the adjustment value refers to a value of the current baud rate adjusted each time, since the baud rate is adjusted within a certain range, the larger the adjustment value is, the fewer the adjustment times in the whole adjustment process are, the higher the efficiency of finding a proper baud rate is, but the larger the adjustment value is, the larger the adjustment accuracy error is, the more the adjusted baud rate may exceed the proper baud rate, and the accuracy of adjustment is affected; the smaller the regulating value is, the higher the accuracy of baud rate regulation is, but the more the regulating times in the whole regulating process are, the lower the efficiency of searching for the proper baud rate is, so that a proper regulating value needs to be found, that is, the baud rate regulating efficiency can be ensured, and the baud rate regulating precision can also be ensured. When the adjusting value is 1/2-3/4 of the maximum difference value of the baud rate, the adjusting value of the current baud rate is within the maximum difference value of the baud rate every time, and the adjusting amplitude of the current baud rate exceeds the maximum range of the baud rate after the current baud rate is adjusted twice, so that the baud rate adjusting precision can be ensured, and the adjusting efficiency can be improved by at least 52%. In one embodiment, the adjustment value is 2/3 of the maximum difference in baud rate.
In one embodiment, before the step of adjusting the current baud rate within the adjustment range to obtain the adjusted baud rate, the method further includes: obtaining an adjustable baud rate according to the adjusting range; judging whether the adjustable baud rate is used by the adjusted baud rate; and when the adjustable baud rate which is not used by the adjusted baud rate exists, executing the step of adjusting the current baud rate in the adjusting range to obtain the adjusted baud rate. Specifically, the adjustable baud rate is that a plurality of representative baud rates are selected in a baud rate adjusting range, whether the baud rate which can realize normal communication of the communication equipment exists in the baud rate adjusting range is judged by judging whether the adjustable baud rates are all used by the adjusted baud rate, and when the adjustable baud rate which is not used by the adjusted baud rate exists, the baud rate which can realize normal communication of the communication equipment also exists in the value in the baud rate adjusting range, so that the baud rate needs to be adjusted to better find out a proper baud rate.
In one embodiment, after the step of determining whether the adjustable baud rate is used by the adjusted baud rate, the method further includes: and when the baud rate adjustable values are used by the adjusted baud rate, outputting an alarm signal without executing subsequent steps. Specifically, when the baud rate adjustable values are used by the adjusted baud rate and normal communication of the communication equipment cannot be realized, the communication equipment is abnormal, and then the baud rate is adjusted, and normal communication of the communication equipment cannot be realized, at this time, an alarm signal is output to remind a user that the communication equipment is abnormal, further, the adjustment program can be prevented from entering a dead cycle, namely, the adjustment program is prevented from generating BUG.
In one embodiment, the step of obtaining an adjustable baud rate according to the adjustment range includes: and obtaining the adjustable baud rate according to the adjusting range, the initial baud rate and the maximum difference of the baud rates of the two communication parties for realizing communication. Specifically, through the adjusting range, the initial baud rate and the maximum difference of the baud rates of the two communication sides for realizing communication, the adjustable baud rate can be obtained, the difference value of two adjacent baud rates is less than the maximum difference value of the baud rates, if the baud rate adjusting range of the communication equipment has a baud rate interval capable of normally communicating with another communication equipment, at least one value in the adjustable baud rate falls into the baud rate interval, that is, any value does not exist in the adjustable baud rate, which satisfies the normal communication of two communication parties, it may be said that the communication device is abnormal, and thus, by determining whether the adjustable baud rate is used, whether the baud rate capable of normal communication exists in the baud rate adjusting range can be judged, all the baud rates in all the baud rate ranges do not need to be judged, and the adjusting efficiency is further improved. In one embodiment, the step of obtaining an adjustable baud rate according to the baud rate adjustment range includes: and obtaining the adjustable baud rate according to the baud rate adjusting range, the initial baud rate and the adjusting value. The adjustable baud rate is a data set of one value in the arithmetic progression of the initial baud rate and the arithmetic progression of the initial baud rate with the adjustment value as a tolerance within the baud rate adjustment range, and in one embodiment, the adjustment value is set according to the adjustable baud rate, or the adjustable baud rate is set according to the adjustment value, that is, when the baud rate is adjusted by the communication device, the values are only tried, and other values are not required to be debugged, so as to further improve the adjustment efficiency.
Referring to fig. 3, the baud rate adjusting method of the communication device includes:
s210, obtaining the preset baud rate of the two communication parties.
S220, obtaining an error range of the output baud rate of the communication equipment, and obtaining an adjusting range of the baud rate according to the preset baud rate and the error range.
And S230, inputting an initial baud rate according to the preset baud rate.
S240, judging whether the communication equipment can communicate at the current baud rate; if not, executing step S250; if yes, go to S260.
S250, obtaining an adjustable baud rate according to the adjusting range, the initial baud rate and the maximum difference of the baud rates of the two communication sides for realizing communication, and judging whether the adjustable baud rate is used by the adjusted baud rate; if not, go to step S270, and if so, go to step S290.
And S260, outputting the current baud rate, and not executing the subsequent steps.
S270, obtaining a baud rate adjusting value according to the maximum difference of the baud rates of the two communication parties for realizing communication; and in the adjusting range, adjusting the current baud rate according to the adjusting value to obtain the adjusted baud rate, wherein the adjusting value is smaller than the maximum difference value of the baud rates.
And S280, taking the adjusted baud rate as the current baud rate, and returning to continue executing S240.
And S290, outputting an alarm signal, and not executing the subsequent steps.
In one embodiment, a communication device adjusts a baud rate output by the communication device by using the baud rate adjustment method of the communication device according to any one of the above embodiments. Specifically, the communication device is used for communicating with another communication device, and when the communication device communicates with another communication device, the baud rate output by the communication device is adjusted by using the baud rate adjusting method of the communication device, so as to find out the baud rate capable of realizing communication.
According to the communication equipment, when the communication equipment cannot normally communicate due to large deviation of the output baud rate and the set value, the adjustment range of the baud rate is determined through the error range of the baud rate and the preset baud rate, the output baud rate of the communication equipment is adjusted in the adjustment range of the baud rate, so that the communication equipment outputs the baud rate capable of normally communicating, normal communication of the communication equipment can be realized, and the adjustment efficiency can be improved.
The above-mentioned embodiments only express several embodiments of the present invention, and the description thereof is more specific and detailed, but not construed as limiting the scope of the invention. It should be noted that, for a person skilled in the art, several variations and modifications can be made without departing from the inventive concept, which falls within the scope of the present invention. Therefore, the protection scope of the present patent shall be subject to the appended claims.

Claims (10)

1. A baud rate adjusting method of communication equipment is applied to communication of a universal asynchronous receiver transmitter, and is characterized by comprising the following steps:
obtaining the preset baud rate of both communication parties;
acquiring an error range of an output baud rate of the communication equipment, and acquiring an adjusting range of the baud rate according to the preset baud rate and the error range;
inputting an initial baud rate according to the preset baud rate; the initial baud rate refers to the actual output baud rate when the communication equipment sets a set value as a preset baud rate;
judging whether the absolute value of the difference between the current baud rate of the communication equipment and the baud rate of the other communication equipment is within the maximum difference range of the baud rates of the two communication parties for realizing communication;
when the absolute value of the difference between the current baud rate of the communication equipment and the baud rate of the other communication equipment is not within the maximum difference range of the baud rates of the two communication parties for realizing communication, adjusting the current baud rate within the adjusting range to obtain the adjusted baud rate;
and taking the adjusted baud rate as the current baud rate, and returning to continuously execute the step of judging whether the absolute value of the difference between the current baud rate of the communication equipment and the baud rate of the other communication equipment is within the maximum difference range of the baud rates of the two communication parties for realizing communication.
2. The method for adjusting the baud rate of a communication device according to claim 1, wherein after the step of determining whether the absolute value of the difference between the current baud rate of the communication device and the baud rate of another communication device is within the maximum difference between the baud rates of the two communication parties, the method further comprises:
when the absolute value of the difference between the current baud rate of the communication equipment and the baud rate of the other communication equipment is within the maximum difference range of the baud rates of the two communication parties for realizing communication, the current baud rate is output, and the subsequent steps are not executed.
3. The method for adjusting baud rate of a communication device of claim 1, wherein said step of adjusting said current baud rate within said adjustment range to obtain an adjusted baud rate comprises:
obtaining a baud rate adjusting value according to the maximum difference of the baud rates of the two communication parties for realizing communication;
and in the adjusting range, adjusting the current baud rate according to the adjusting value to obtain the adjusted baud rate.
4. The method for adjusting the baud rate of a communication device according to claim 3, wherein the step of adjusting the current baud rate to obtain the adjusted baud rate according to the adjustment value in the adjustment range comprises:
and summing the current baud rate and the adjusting value within the adjusting range to obtain the adjusted baud rate.
5. The method of claim 3 or 4 wherein said adjustment value is less than said maximum baud rate difference.
6. The baud rate adjustment method of claim 5, wherein the adjustment value is 1/2-3/4 of the maximum difference in the baud rate.
7. The method for adjusting baud rate of a communication device of claim 1, wherein before said step of adjusting said current baud rate to obtain an adjusted baud rate within said adjustment range, said method further comprises:
obtaining an adjustable baud rate according to the adjusting range;
judging whether the adjustable baud rate is used by the adjusted baud rate;
and when the adjustable baud rate which is not used by the adjusted baud rate exists, executing the step of adjusting the current baud rate in the adjusting range to obtain the adjusted baud rate.
8. The method of claim 7, wherein after said step of determining whether said adjustable baud rate is used by said adjusted baud rate, further comprising:
and when the baud rate adjustable values are used by the adjusted baud rate, outputting an alarm signal without executing subsequent steps.
9. The method of claim 7, wherein said step of obtaining an adjustable baud rate based on said adjustment range comprises:
and obtaining the adjustable baud rate according to the adjusting range, the initial baud rate and the maximum difference of the baud rates of the two communication parties for realizing communication.
10. A communication device characterized in that the baud rate is adjusted using the communication device baud rate adjustment method as claimed in any one of claims 1 to 9.
CN201910843837.5A 2019-09-06 2019-09-06 Baud rate adjusting method of communication equipment and communication equipment Active CN110581814B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910843837.5A CN110581814B (en) 2019-09-06 2019-09-06 Baud rate adjusting method of communication equipment and communication equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910843837.5A CN110581814B (en) 2019-09-06 2019-09-06 Baud rate adjusting method of communication equipment and communication equipment

Publications (2)

Publication Number Publication Date
CN110581814A CN110581814A (en) 2019-12-17
CN110581814B true CN110581814B (en) 2022-03-29

Family

ID=68812736

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910843837.5A Active CN110581814B (en) 2019-09-06 2019-09-06 Baud rate adjusting method of communication equipment and communication equipment

Country Status (1)

Country Link
CN (1) CN110581814B (en)

Families Citing this family (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111459727B (en) * 2019-12-25 2023-07-14 山东有人物联网股份有限公司 Intelligent automatic test system and method for serial port baud rate maximum error-free tolerance range
CN112202528B (en) * 2020-08-17 2021-06-29 北京海泰方圆科技股份有限公司 Communication baud rate correction method and device, electronic equipment and storage medium
CN112039635B (en) * 2020-08-28 2023-06-20 杭州万高科技股份有限公司 UART baud rate self-adaption method and device based on RC oscillator
CN112769663B (en) * 2020-12-30 2022-08-19 深圳市亚辉龙生物科技股份有限公司 Communication method, communication apparatus, computer device, and storage medium
CN114024795B (en) * 2021-11-05 2023-08-08 深圳数马电子技术有限公司 Baud rate self-adaption method, device, computer equipment and storage medium
CN116541323A (en) * 2023-03-24 2023-08-04 北京华控智加科技有限公司 Method and device for adjusting baud rate of serial port communication and electronic equipment

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2011234128A (en) * 2010-04-27 2011-11-17 Yazaki Corp Baud rate detecting device for serial communication, baud rate correcting device for serial communication, and baud rate detecting method for serial communication
CN102904688A (en) * 2012-10-12 2013-01-30 北京新雷能科技股份有限公司 Method and device for regulating baud rate
CN103199942A (en) * 2013-03-04 2013-07-10 福建联迪商用设备有限公司 Audio communication method and terminal utilizing same
CN105653491A (en) * 2016-01-04 2016-06-08 上海斐讯数据通信技术有限公司 Serial port communication baud rate adjusting method and system

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2011234128A (en) * 2010-04-27 2011-11-17 Yazaki Corp Baud rate detecting device for serial communication, baud rate correcting device for serial communication, and baud rate detecting method for serial communication
CN102904688A (en) * 2012-10-12 2013-01-30 北京新雷能科技股份有限公司 Method and device for regulating baud rate
CN103199942A (en) * 2013-03-04 2013-07-10 福建联迪商用设备有限公司 Audio communication method and terminal utilizing same
CN105653491A (en) * 2016-01-04 2016-06-08 上海斐讯数据通信技术有限公司 Serial port communication baud rate adjusting method and system

Also Published As

Publication number Publication date
CN110581814A (en) 2019-12-17

Similar Documents

Publication Publication Date Title
CN110581814B (en) Baud rate adjusting method of communication equipment and communication equipment
CN110034884B (en) Method, device and system for transmitting terminal equipment capability
JP2021517434A5 (en)
US9490969B2 (en) Transmission apparatus, reception apparatus, and transmission and reception system
CN105825834B (en) Terminal and its back light brightness regulating method
CN105790756B (en) A kind of method and device communicating calibration clock using UART
CN104158616A (en) Clock synchronization method and device in optical fiber transmission system
CN108770055A (en) Transmission power adjustment method, device and electronic device
JPWO2009019746A1 (en) COMMUNICATION DEVICE, COMMUNICATION SYSTEM, AND COMMUNICATION METHOD
CN111106870A (en) Super-long-distance dual-fiber interconnected multistage optical fiber time frequency transmission system
US20130128933A1 (en) Transceiver without using a crystal oscillator
CN101534152B (en) Method and device for synchronous realization of wireless access network
US10524069B1 (en) System for configuring distribution of audio data to devices based on connection status
US20070014339A1 (en) Data communication system
JP2021027489A (en) Data transmission device and control method thereof
CN102694618B (en) A method for detecting loss of synchronism in an idle state and terminal device
CN105487632A (en) Time calibration system and method and mobile terminal
CN111585681A (en) Household appliance
US11404024B2 (en) Signal adjusting device, signal adjusting method, and test equipment
CN102938747B (en) A kind of digital interphone signal demodulation device
CN106897506B (en) Method for predicting output signal period jitter in phase-locked loop design
CN106603044B (en) Clock correction method and circuit, and reference clock generation method and circuit
CN106559884A (en) A kind of transmission method and equipment of CSI aperiodic
JP6299302B2 (en) Communication apparatus and communication system
CN110224794B (en) Communication data transmission method and system

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant