Basic concepts of the hottest serial communication

2022-08-16
  • Detail

The basic concept of serial communication

parallel communication and serial communication

the terminal communicates with other devices (such as other terminals, computers and external devices) through data transmission. Data transmission can be carried out in two ways: parallel communication and serial communication

1. parallel communication

data transmission between computer and terminal is usually realized by current or voltage changes on cable or channel. If each data bit of a group of data is transmitted simultaneously on multiple lines, this transmission is called parallel communication, as shown in Figure 1

the characteristics of parallel data transmission are: all data bits are transmitted at the same time, with fast transmission speed and high speed. It is mostly used in real-time and fast occasions

the data width of parallel transmission can be 1-128 bits, or even wider, but as many data bits as many data lines are required, so the transmission cost is high. Inside the integrated circuit chip, the data transmission between components on the same plug-in board and between plug-in boards in the same chassis is parallel

parallel data transmission is only applicable to short-range communication, usually less than 30cm

2. serial communication

serial communication refers to that the transmission of data information between the sender and receiver of communication is carried out on a single data line, with 0 and 1 of a binary each time as the minimum unit, bit by bit, as shown in Figure 2

the characteristic of serial data transmission is that data transmission is carried out in bit order, and at least one transmission line is required to complete it, saving transmission lines. Compared with parallel communication, serial communication has more significant advantages, with long transmission distance, which can range from a few meters to thousands of meters. In a long distance, the serial data transmission rate will be faster than the parallel data transmission rate. The communication clock frequency of serial communication is easy to improve. The anti-interference ability of serial communication is very strong, and the mutual interference between its signals can be completely ignored. However, the transmission rate of serial communication is much slower than that of parallel communication. If the parallel communication time is t, the serial time is NT

because of less wiring and low cost of serial communication, it has been widely used in data acquisition and control systems, and its products are also diverse. The communication distance of RS-232 is generally 15 meters, and the RS-232 of Boshi electronics can reach more than 500 meters (product model ex232). The communication distance of RS-485 is generally 1200 meters, and Boshi electronics can reach 1800 meters (product model: 485C, 485a) or even 4800 meters (product model: g485ex)

two serial communication working modes

transmitting information through a single line is the basis of serial data communication. Data is usually transmitted between two stations (point-to-point). According to the direction of data flow, it can be divided into three transmission modes: simplex, half duplex and full duplex

1. Simplex form: the data transmission of the early current loop

simplex form is unidirectional. Among the two sides of communication, one is fixed as the sending end, and the other is fixed as the receiving end. Information can only be transmitted in one direction, using one transmission line, as shown in Figure 3

simplex form is generally used when data is transmitted in only one direction. For example, the computer and the printer 2. The sample should be on the bending core. The communication between the bending machine is simplex, because only the computer transmits data to the printer, and there is no opposite data transmission. And in some communication channels, such as simplex wireless transmission

2. Half duplex form: rs-485

half duplex communication uses the same transmission line, which can send and receive data, but it cannot send and receive data at the same time. At any time, only one party can send data and the other party can receive data. Therefore, one data line or two data lines can be used in the half duplex form, as shown in Figure 4

in half duplex communication, each end needs to have a receive/transmit switching electronic switch, which determines the direction of data transmission through switching. Due to switching, there will be time delay and the efficiency of information transmission will be lower. However, for peripheral devices such as printers that transmit in one direction, half duplex mode can meet the requirements. Full duplex mode is not necessary, and a transmission line can be saved

the rs-232/rs-485 converter of Boshi electronics uses a unique zero delay automatic transceiver conversion technology, which directly extracts the transceiver switching control signal from the RS-485 signal by hardware method, and has the performance of zero delay. Zero delay means that the transition time of the transceiver switching process is 0, which is the same as RS-232 communication when in use

3. full duplex form: RS-232, RS-422

full duplex data communication is transmitted by two transmission lines that can send and receive at the same time at two different stations, and both sides of the communication can send and receive at the same time, as shown in Figure 5

in full duplex mode, there are transmitter and receiver at each end, and there are two transmission lines, which can be used in interactive applications and remote monitoring systems, and the information transmission efficiency is high

three asynchronous transmission and synchronous transmission

in serial transmission, data is transmitted bit by bit in the order of arrival, and the transmission and reception of each data need to be controlled by clock. The sending end determines the start and end of the data bit by sending the clock, and the receiving end needs to sample the data stream at an appropriate time interval to correctly identify the data. The receiving end and the sending end must keep pace, otherwise there will be errors in data transmission. In order to solve the above problems, the serial transmission can adopt the following two methods: asynchronous transmission and synchronous transmission

asynchronous transmission

in asynchronous transmission mode, characters are data transmission units. In the data flow of communication, characters are asynchronous, and bits within characters are synchronized. The "asynchronous" of asynchronous communication mode is mainly reflected in the fact that there is no strict timing requirement for the communication between characters. Asynchronous transmission to develop the new material industry has also become a major way to implement the supply side structural reform. Characters can be sent continuously, one by one, or discontinuous, randomly and separately. After the stop bit of a character format, the start bit of the next character is sent immediately to start the transmission of a new character. This is called continuous serial data transmission, that is, frames are continuous. Intermittent serial data transmission refers to maintaining the "idle" state of the data line after the end of a frame, and the new start bit can start at any time. Once the transmission starts, the method of determining the fatigue limit of metal data under symmetrical cycle will be formed. Each data bit of this character will be sent continuously, and the duration of each data bit is equal. According to this characteristic, the receiving end keeps synchronization with the data sending end, so as to recover the data correctly. The receiver/sender transmits each bit of this character at the transmission rate agreed in advance under the action of the clock

synchronous transmission

in the synchronous transmission mode, the bit block is transmitted in the form of a stable bit stream, and the data is encapsulated into a larger transmission unit, called a frame. Each frame contains multiple character codes, and there is no gap between character codes and character codes, as well as start and stop bits. Compared with asynchronous transmission, the lengthening of data transmission unit is easy to cause clock drift. In order to ensure that the receiving end can correctly distinguish each data bit in the data stream, the sending and receiving master must establish a synchronous clock in some way. An independent clock line can be provided between the transmitter and the receiver. One end of the line (transmitter or receiver) periodically sends a short pulse signal to the line in each bit time, and the other end takes these regular pulses as a clock. This technology performs well in short-distance transmission, but in long-distance transmission, the timing pulse may be destroyed like the information signal, resulting in timing error. Another method is to provide synchronization information to the receiver by using data encoding bits embedded with clock information

four handshake signals

handshake signals are actually control signals used to control the transmission of data. Through the handshake signal, the sender can inform the receiver whether there is data to send. The receiver informs the sender whether it is ready to receive the signal through the handshake signal. Handshake signals follow a protocol

data loss may occur when the sender and receiver process data differently. In transmission, if the sending speed of the sender is faster than the receiving speed of the receiver, and the receiving party is not fast enough to process data, the buffer at the receiving end must overflow after a certain time, resulting in the loss of data sent later that cannot enter the buffer. When the sender can continue to send data and when it must pause sending, so that the receiver has time to process data, which is called flow control. This problem must be solved by handshaking signals. For example, when a printer communicates with a computer, the printing speed of some printers may not keep up with the speed of the computer sending data, so it is necessary to notify the computer to suspend sending data through a handshake signal

1 hardware handshake

in the hardware handshake, the sender pulls a wire to the high level or low level for the utilization trend of lightweight, low odor, new energy, etc. in the automotive field. To indicate that the sender can send data. After the receiver is ready to receive data, it also pulls a wire to the high level or low level to inform the sender that the sender has been detecting this signal. The receiver can invalidate this signal at any time, even in the process of accepting a data block. When the sender detects that the signal becomes invalid, it must stop this transmission until the signal becomes valid

2 software handshake

in the software handshake, the actual hardware circuit is replaced by the data signal on the data line. This method is used for two-way communication between two computers connected directly or through a modem

some standard protocols have been established for software handshake, among which the most commonly used is communication protocol. Communication protocol refers to an agreement between the two sides of communication, including unified provisions on data format, synchronization mode, transmission speed, transmission steps, inspection and error correction mode, control character definition and other issues, which must be observed by both sides of communication. It is also called communication control procedure or transmission control procedure, which belongs to the data link layer of OSI seven layer reference model

3 automatic handshake

the rs-232/rs-485 converter of Boshi electronics uses a unique zero delay automatic transceiver conversion technology. RS-485 is a half duplex communication. The receiving and transmitting cannot be carried out at the same time, and the switching between receiving and transmitting is required. Generally, this requires the use of a handshake signal line of RS-232 and software control. The rs-232/rs-485 converter of Boshi electronics omits the handshake signal line, directly extracts the control signal from the RS-485 signal by hardware method, and has the performance of zero delay. Zero delay means that the transition time of the transceiver switching process is 0, which is the same as RS-232 communication when in use

five communication parameters

the communication mode of serial port is to split bytes into bits one after another and then transmit them. The party receiving this potential signal will combine the bits one by one into the original bytes, so as to form a complete transmission of a byte

in the process of transmission, both parties should clarify the specific way of transmitting information, otherwise both

Copyright © 2011 JIN SHI