Serial communication protocol--end-to-end asynchronous communication Protocol (UART)

Source: Internet
Author: User

End-to-end asynchronous communication protocol:

Features and formats:

The characteristic of a start-stop asynchronous protocol is a character transfer, and the transmission of a character always begins with the starting bit, ending with a stopped bit, and there is no fixed time interval between the characters. Its format is shown in 3. Each character is preceded by a starting bit (low level, logical value 0), the character itself has a 5~7 bit data bits, followed by a check bit (also can not check bit), the last is a single, or mean half, or two bit stop bit, the stop bit is followed by an indefinite length of idle bits. Both the stop bit and the idle bit are defined as high (logical values) so that there must be a lower hop edge at the beginning of the starting bit.

As can be seen, this format is the start and stop bit to achieve the definition or synchronization of characters, it is called the start-up protocol. When transmitting, the data is low in front, high in the rear, figure 4 represents the transmission of a character e of the ASCAII code waveform 1010001. When the least significant bit is written to the right, the ASCII code of E is 1000101=45h.

Figure 4

function of the starting/stopping position: The starting bit is actually attached as a contact signal, and when it becomes low, it tells the receiver pays that the transmission begins. It arrives, indicating that the following is the data bit coming, to be ready to receive. While the stop bit flag is the end of a character, it appears, indicating that a character transfer is complete. This provides the communication between the two sides when to start sending and receiving, when the end of the logo. Before the transfer begins, the sender and recipient of the use of the beginning and end of the format (including the character of the length of the data bits, the number of stop bits, there is no check bit and is odd check or even parity) and data transmission rate as a unified provision. After the transfer begins, the receiving device continuously detects the transmission line to see if there is a starting bit coming in. When a series of "1" (Stop bit or idle bit) is received, a lower hop edge is detected, indicating that the starting bit appears and the starting bit is confirmed, and the specified data bits and parity bits and stop bits are received. After processing the stop bit is removed, the data bits are assembled into a parallel byte, and after verification, no parity and even error is counted correctly to receive a character. After one character is received, the receiving device continues to test the transmission line, monitoring the arrival of the "0" level and the start of the next character until all data has been transmitted.

By the above work process can be seen, asynchronous communication is transmitted by character, each transmission of a character, using the starting bit to notify the receiver pays, in order to re-check the transceiver synchronization. If the clock frequency of the receiving device and the transmitting device is slightly biased, this will not cause dislocation due to the accumulation of deviations, and the idle bit between the characters also provides a buffer for this deviation, so the reliability of asynchronous serial communication is high. However, due to the addition of the starting bit and stop bit to the front and back of each character, the transfer efficiency is reduced, only about 80%. Therefore, the start and end protocol is generally used in slower data rates (less than 19.2kbit/s). In high-speed transmission, the synchronization protocol is generally used.

Serial communication protocol--end-to-end asynchronous communication Protocol (UART)

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.