Baud rate error of serial port affects data transmission

question:


If the baud rate error is 0.16%, after how many data are sent continuously, there will be wrong data

I read it on the Internet, and they all said that reliable transmission can be guaranteed under the error range of 2.5%. However, recently there is a program that sends about 5,000 pieces of data continuously with an error of 0.16%, and a sending error occurs.


Answer 1: The error must be less than 5%. When the serial port is vibrating, the compatibility between CH chip and some low-end serial port cards is slightly poor. It may be related to the sampling algorithm.

Start bit + data + stop bit, a total of ten bits, at least 4 times the frequency can be collected correctly, then a data packet is collected at least 40 times. The error cannot exceed two acquisition intervals. That's about plus or minus 5%. The actual situation is related to the sampling method and may be more strict.

Answer 2:

No effect, each byte of asynchronous serial port has start bit and stop bit synchronization

According to the different sampling points of the receiving device, the maximum allowable baud rate error is 4%~5%. Of course, a poorly designed UART is likely to be much worse.


Answer 3:

But in actual use, it is found that one or several errors will indeed occur after sending thousands of data in a row.

Hey, although you can use validation or parity to eliminate erroneous data, you still feel uneasy.

Or it is a problem monitored by the PC side. It seems that both receiving and sending are completed by a single chip microcomputer to be determined.


Answer 4:

Asynchronous serial ports have start and stop bits, plus parity bits, and an 8-bit byte can have up to 12 bits.
Usually sampling in the middle of the bit, so a 12-bit deviation of 50% may cause a sampling error to cause communication failure, corresponding to the baud rate deviation of both sides of the communication is about 50%/12=4%,

It has nothing to do with the baud rate of both parties in the communication, and the product of the baud rate and the communication distance has an upper limit.





Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=325765945&siteId=291194637