The difference between synchronous communication and asynchronous communication _ Programming synthesis

Source: Internet
Author: User
Tags time interval

Principle of synchronous communication

Synchronous communication is a continuous serial transmission of data communication, one communication only one frame of information. The information frame here is different from the character frame in the asynchronous communication, and usually contains several data characters.

When using synchronous communication, a number of characters are formed into an information group so that characters can be transmitted one after another, but in each set of information (usually called frames), the characters are added to the beginning of the message, and when there is no information to transmit, the character is filled in because there is no gap allowed in the synchronous transmission. One character can correspond to the 5~8 bit during synchronous transmission. Of course, for the same transmission process, all characters correspond to the same number of digits, such as n bits. In this way, the transmission is divided into a time slice per n bit, the sender sends a character in a time slice, and the receiving end receives a character in a time slice.

When transmitting synchronously, a frame of information contains many characters, each frame of information starts with a synchronous character, which normally used the same code as the synchronous character and the empty character. Throughout the system, a unified clock controls the sending end and the null character used the same code. The receiver, of course, should be able to recognize the synchronization characters, when the detection of a string of digits and synchronization characters to match, it is considered to start an information frame, so that the subsequent digits as the actual transmission of information to deal with.

Principle of asynchronous communication

Asynchronous communication is a very common way of communication. Asynchronous communication when sending characters, the time interval between the characters that are sent can be arbitrary. Of course, the receiving end must be ready to receive at all times. The sender can start sending characters at any time, so it must be marked at the beginning and end of each character, plus the start and stop bits so that the receiver can properly receive each character. The advantage of asynchronous communication is that the communication device is simple and inexpensive, but the transmission efficiency is low (because the cost of starting bit and stop bit is a large proportion).

Synchronous communication differs from asynchronous communication:

   1. Synchronous communication requires that the receiver clock frequency and the transmitter clock frequency are the same, the sending end sends a continuous bit stream, the asynchronous communication does not require the receiving-end clock and the sending-end clock to synchronize, and the sender ends the byte after sending The next byte can be sent after any length of time.
    2. High synchronous communication efficiency and low asynchronous communication efficiency.
    3. Synchronous communication is more complicated, the allowable error of both clocks is small, asynchronous communication is simple, and both clocks can allow certain errors.
    4. Synchronous communication can be used for point-to-point, and asynchronous communication applies only to point-to-point points.

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.