

#Usb serial communication protocol verification#
The verification methods include odd, even, space, mark and noparity. Because the data communication is relatively vulnerable to external interference, resulting in the deviation of the transmitted data, the check bit can be added in the transmission process to solve this problem. The number of data bits can be agreed by both communication parties, generally 5 bits, 7 bits or 8 bits.Īfter the valid data, there is an optional data check bit. The data bit immediately following the start bit is the real effective information in communication, that is, the main data content to be transmitted. Therefore, the function of the start bit is to indicate the beginning of character transmission. When the receiving device detects this logic low level, it starts to prepare to receive the data signal. The start bit is transmitted to the receiving device through the communication line. When the transmitting device sends a character data, it first sends a logic "0" signal, and this logic low level is the start bit (falling edge). It is in the logic "1" state when there is no data transmission on the communication line. The data packet format of both communication parties should be consistent before sending and receiving data normally. It is composed of start bit, data bit, check bit and stop bit.

In the serial communication protocol, the content of the data packet is specified. The data of serial communication is transmitted from the transmitting device to the RXD interface of the receiving device through its own TXD interface. Electronic engineers often use this communication mode to output debugging information when debugging equipment. Because it is simple and convenient, most electronic devices support this communication mode. Serial communication is a very common serial communication mode between devices. Next, let's experience the characteristics of serial port communication. There are many serial port debugging software. It is very convenient to receive it with the computer USB port. We can output some debugging information by connecting the hardware with the host computer through the serial port.

We can see the debugging information we want to output directly in the black window.
#Usb serial communication protocol code#
Many times, when we write programs, we inevitably have to debug code or output some debugging information, but the debugging of design hardware is not like pure software.
