Explanation of the principle of synchronous communication and asynchronous communication

Source: Internet
Author: User

5.1.3 Synchronous communication and asynchronous communication
One, synchronous communication and asynchronous communication
Serial communication can be divided into two types, one is called synchronous communication, the other is called asynchronous communication.
Synchronous communication means that a number of characters are formed into an information group, so that characters can be transmitted one after the other, but in each group of information (usually referred to as the information frame) to the beginning of the addition of synchronous characters, when no information to transfer, to fill the sky characters, because synchronous transmission does not allow gaps. synchronous mode, the sender in addition to the transmission of data, but also to transmit the synchronous clock signal, the information transmission of the two sides with the same clock signal to determine the transmission process every 1 bits of the position. See Figure 5.2 on the right.



Figure 5.2 Synchronous communication
In asynchronous communication mode, the transmission interval between two data characters is arbitrary, so that each data character is preceded and used as a separator bit by some digits.
As can be seen in Figure 5.2, the standard asynchronous communication data format (called asynchronous communication Frame format), 1 characters in the transmission, in addition to the actual data character information transmission, but also transfer several additional digits. Specifically, the output line must be logically in the "1" state before the 1-character start of the transmission, which is known as an identity state. At the beginning of the transfer, the output line is changed from the identity state to the "0" status as the starting bit. The starting bit is followed by 5~8 information bits, the information bits are arranged from low to high, that is, the low of the first pass character, and the high of the post-pass character. After the information bit is the check bit, the check bit can be set by the odd check, or it can be set by the parity check, or the check bit is not set. The last is the logical "1" as the stop bit, the stop bit can be 1-bit, 1.5-bit, or 2-bit. If the next character is transferred immediately after 1 characters are transmitted, the starting bit of the latter character is next to the stop bit of the previous character, otherwise the output line will enter the identity state. In asynchronous mode of communication, both the sending and receiving parties must agree on the same frame format, otherwise they will cause transmission errors. In asynchronous communication mode, the sender sends only the data frame, does not transmit the clock, and both the sending and receiving parties must agree on the same transfer rate. Of course, the actual working rate of the two sides can not be absolutely equal, but as long as the error does not exceed a certain limit, it will not cause transmission error. Figure 5.3 is the standard data format for asynchronous communication.

Figure 5.3 Asynchronous communication
Compared with the transmission rate, the information in the synchronous communication mode is more efficient than the asynchronous mode, because the proportion of non-data information is smaller in the synchronous mode.
Second, transmission rate
The so-called transmission rate refers to the number of transmissions per second, the transmission rate is often called baud rate. In a computer, the meaning of the number of bits per second transmitted and the baud rate is exactly the same, but, in the initial definition, the number of bits per second and the baud rate are different, the former refers to how many digits are transferred per second, and the baud rate is the number of discrete signals transmitted per second. The so-called discrete signal refers to non-uniform, discontinuous and irrelevant signals. In the computer, only the high and low levels of discrete signals are allowed, respectively, they represent L and 0, resulting in a baud rate and the number of transmissions per second of the two. But on other occasions, that may not be the case. For example, when pulse modulation is used, 4 phases can be allowed, and each phase represents 2 digits, in which case the transmission rate is twice times the baud rate, in terms of the number of bits per second (bps).
International standard baud Rate series, standard baud rate is also the most commonly used baud rate, standard baud rate series of 110, 300, 600, 1200, 1800, 2400, 4800, 9600, 19200 ...
The baud rate of most interfaces can be specified by programming.
As an example, we can consider an asynchronous transfer process where each character corresponds to 1 starting bits, 7 data bits, a single odd/even bit, and a stop bit, and if the baud rate is 1200, the maximum number of characters that can be transmitted per second is 1200/10=120.
As a comparison, let's look at a synchronous transmission example. If you also work with a baud rate of 1200, each character is 7 bits, with 4 simultaneous characters as the header of the information frame, but no odd/even check, then the time to transmit 100 characters is 7x (100+4)/ 1200=0.6067, that is, the number of characters that can be transmitted per second can reach 100/0.6067=165.
Iii. error types of asynchronous communication
Communication errors can occur during asynchronous communication, and there are generally 3 kinds of error:
1. Frame format error: When the stop bit should be received, the logic "0" is received, and the frame format is wrong.
2, parity error: Received parity bit error.
3, coverage error: The communication interface received data and put into the data input register, but the CPU did not come in time to take, the later received data covering the previous received data, called coverage error.
There are several possible reasons for frame-format errors and parity errors:
Both the sending and receiving parties used different transmission rates, or although both parties agreed on the same transmission rate, the transmission rate could not be absolutely equal. In the case of high communication rate, if the transmission error of both sides reaches a certain degree, it will also cause communication error.
The communication both sides adopt the different frame format;
Interference

Explanation of the principle of synchronous communication and asynchronous communication

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.