The basic concept STM32- Communications

Parallel communication with serial communication

Manner of data transmission, communication and serial communication can be divided into parallel communication, serial communication means between the devices through a small number of data signal lines (typically 8 or less), a ground line and a control signal, according to the data bits in the form of a bit by bit transmission of communication data. Generally refers to communication in parallel using 8, 16, 32 and 64 or more data communication line transmission, the transmission contrast thereof is described in Figure 19-1 communication, parallel communication as a plurality of lanes of the road, can be simultaneous transmission of data from multiple data bits, and serial communications, and serial communication is like a single-lane road, the same time can only transmit data one bit of data.

5d306315ead8299760

Obviously, since a plurality of data bits can be transmitted in the same data transfer rate, the amount of communication data transmitted in parallel is much larger, and the serial communication data line hardware cost savings (especially far distance) and the PCB layout area, serial communication and parallel communication characteristic comparison shown in Table 19-1.

Table 19-1 serial communication and parallel communication characteristic comparison

characteristic
Serial communication
Parallel Communication
Communication distance
Farther
Close
Anti-jamming capability
Stronger
Weak
Transmission rate
Slower
Higher
cost
Lower
Higher

However, because of the synchronous parallel transmission are higher, and with the improvement of communication speed, the problem of signal interference can significantly affect the performance of communications, now with the development of technology, more and more applications using high-speed serial differential transmission rate .

Full-duplex, half duplex and simplex communication

The direction of data communication, the communication is divided into full-duplex, half-duplex and simplex communication, which are mainly in the direction of the channel to distinguish, Figure 19-2 and Table 19-2.

Table 19-2 Description of communication

communication method
Explanation
Full-duplex
At the same time between the two devices can send and receive data simultaneously
Half-duplex
Can send and receive data between two devices, but can not at the same time
Simplex
At any time only one direction of communication, i.e. a fixed transmitting apparatus, another
Fixed to the receiving device

Still the road analogy, full-duplex communication is a two-way lane traffic in both directions independent of each other; that half-duplex is like a country road, a moment, only to let a car pass to the other direction road vehicles can only wait for time to pass out of the air; and simplex is like a one-way street in the other direction the vehicle is completely closed to traffic.

5d30632fd01ed78374

Synchronous communication and asynchronous communication

The data synchronization method of communication, is divided into synchronous and asynchronous, to be used if there is a simple clock signal distinguished according to the process of communication.

In synchronous communications, a transceiver uses both the signal line represents a clock signal, the coordination of both driving clock signal, the synchronization data shown in Figure 19-3. Communication is usually the two sides will carry out uniform regulations sampling of the data lines in the rising or falling edge of the clock signal.

5d30633eaade245930

Not used in the asynchronous communication data synchronization clock signals, some signals are interspersed with synchronization bits in a data signal directly, or the data package body to transmit a data frame format data, Figure 19-4, certain communication also requires the parties have agreed data transmission rate, in order to better synchronize.

5d30634a3217744219

In the synchronous communication, the data signal content transmitted most of the data is valid, and the asynchronous communication frame will contain various identifiers, so higher efficiency synchronous communication, synchronous communication but allows both the clock error is small , while asynchronous communication allows both the clock error is larger.

Communication speed

A very important parameter to measure the communication performance is the communication rate, typically at the bit rate (the Bitrate) to indicate that the number of bits transmitted per second, bits per second (bit / s). Confusing concepts of the bit rate is "baud" (Baudrate), which represents the number of transmission per symbol. The symbol is a conceptual modulated communication signal, communication same time interval used to represent a binary number notation, such signals are referred to as symbols. As is common in the communications transmission, represented by numbers 0 0V, 5V represents a number 1, then one symbol may represent two states 0 and 1, the one symbol equal to a binary bit, the baud rate at this time the size of the bit concordance rate; if transmission in the communication, there is 0V, 2V, 4V and 6V, respectively, represent the binary number 00, 01, 10, 11, then each symbol can represent four states, i.e. two binary bits, the symbol the number is half the number of bits of binary, this time the baud rate is half the bit rate. Because many common communication symbol two states are represented, it is often expressed directly to the baud bit rate, although strictly speaking nothing wrong, but I hope you understand the difference between them.

Guess you like

Origin www.cnblogs.com/luoxiao23/p/11209737.html