How to Learn Bus Technology
Vividly depicts the basic ideas of bus technology, points out the basic classification of bus and the basic principles of bus transmission, as well as the most basic knowledge that should be mastered in the learning process, it is helpful for beginners to introduce bricks.
0 Introduction
If a bridge can only accommodate one person, and people at both ends want to bridge the bridge, we have to take effective measures to avoid congestion and congestion. For example, to specify the end of a certain period of time when a person crosses the bridge, the other end is waiting for the arrival of the time period when the person crosses the bridge, at the same time, it can also be specified that when there are too many people, they need to bridge the bridge in the order of first arrival or age. In this case, we realized the original idea of transmitting modern electronic information data on time using the bus.
The development of modern network information, especially for cost and space, bus transmission replaces point-to-point transmission, its appearance will provide the most convenient and effective technical solutions for information transmission. If a microprocessor communicates with its components and peripheral devices using point-to-point lines, all connections will be complex and even difficult to implement.
At present, a series of activities related to our daily study are not involved in bus technology applications, such as on the Internet, making phone calls to relatives and friends, and using USB flash drives to store information. Although popular bus adopt different forms, their main principle is nothing more than time-division system, frequency system, phase system and code system. As the saying goes, we can only start from the basic principle and understand the essence of a wide variety of bus, instead of being confused by its diverse forms of appearance, in order to master and use various bus technologies that are currently or will be used flexibly.
1 bus definition and classification 1.1 Definition
Bus, which is called "bus" in English, that is, our Chinese "public vehicle". This is very vivid. For example, public vehicles take certain routes, anyone of us can take a bus to any site on this bus route. If we compare people to electronic signals, that is why we call it "bus" rather than "car" in English. Of course, in terms of professionalism, the bus is a structure that describes electronic signal transmission lines. It is a collection of signal lines and a public channel for inter-subsystem transmission information. The bus enables information transmission, exchange, sharing, and logical control among all components in the system. For example, in a computer system, it is a public channel for transmitting information from the CPU, memory, input, and output devices. Each part of the host is connected through the host, the external device is connected to the bus through the corresponding interface circuit.
1.2 category
There are many bus classification methods, such as being divided into external and internal BUS, system bus and non-system bus. Below are several of the most common classification methods.
1.2.1 by function
The most common feature is to divide the data bus into address bus, data bus, and control bus.
Bus ). In some systems, data bus and address bus can be shared and reused under the control of address latches.
The address bus is used to transmit addresses. During the design process, the most common reason is to select the external storage address from the CPU address bus. The number of bits determines the size of the storage space. For example, if the address bus is 16 bits, the maximum storage space is 216 (64 KB ).
The data bus is used to transmit data information. It also has one-way transmission and two-way transmission of data bus, two-way transmission of data bus usually uses two-way three-state form of bus. The number of digits of the Data Bus is usually the same as that of the word in microprocessing. For example, an Intel 8086 Microprocessor has 16 characters in length, and its data bus width is also 16 characters. In practice, data transmitted on the data bus is not necessarily in the full sense.
The control bus is used to transmit control signals and time series signals. For example, when a microprocessor operates on an external memory, it must first send a read/write signal, a chip selection signal, and a read interrupt response signal through the control bus. The control bus is generally bidirectional, and its transmission direction is determined by the specific control signal. The number of digits depends on the actual control needs of the system.
1.2.2 by Transmission Mode
Bus can be divided into serial bus and parallel bus by means of data transmission. In principle, the parallel transmission mode is superior to the serial transmission mode, but the cost will increase. Generally speaking, the parallel transmission path is like a multi-lane road, while the serial transmission allows only one car to pass through a single road. At present, common serial buses include SPI, I2C, USB, ieee1394, RS232, and can. Parallel buses are relatively rare, such as ieee1284, ISA, and PCI.
1.2.3 minute by clock signal
Depending on whether the clock signal is independent, it can be divided into synchronous bus and asynchronous bus. The clock signal of the synchronous bus is independent of the data. That is to say, a single line is used as the clock signal line. The clock signal of the asynchronous bus is extracted from the data, the edge of the data signal is usually used as the clock synchronization signal.
2. Basic principles of bus Transmission
According to the definition of the bus, the basic function of the bus is to transmit signals, so that information of each subsystem can be transmitted effectively and timely, to avoid mutual signal interference and avoid physical space congestion, the best way is to adopt multiplexing technology, that is, the basic principle of bus transmission is multiplexing technology. Multiplexing refers to a mechanism by which multiple users share public channels. Currently, the most common mechanisms include division multiplexing, division multiplexing, and code multiplexing.
2.1 TDMA)
Time division multiplexing divides the channel by time into multiple time periods. signals from different sources require responses within different time periods, the signal transmission time does not overlap on the time axis.
2.2-Frequency Multiplexing (FDMA)
Frequency Division Multiplexing is to divide the available frequency bands of a channel into several non-overlapping frequencies, and the spectrum of each signal after frequency modulation occupies one of the frequencies, in this way, signals of different frequencies are transmitted in the same channel. After receiving the signal, the receiver uses an appropriate band-pass filter and frequency modem to restore the original signal.
2.3 code division multiplexing (CDMA)
Code Division Multiplexing means that the transmitted signal will have their own specific identification code or address code. The receiving end will distinguish the transmission information on the public channel based on different identification codes or address codes, transmission information is received only when the identity code or address code is exactly the same.
3. Bus Communication Protocol
For bus learning, understanding the communication protocol is the most critical step in the whole process. All documents about bus technology will spend a lot of time describing the protocol, in particular, the seven-layer definition of ISO/OSI. In fact, to understand a bus protocol, the most important thing is to understand the Characteristics and Significance of each bit of the bus frame data, the transmission and receiving of valid data between nodes of the bus are achieved through the judgment and confirmation of the frame data bit or segment by each node.
1 shows a common one-byte data frame transmitted on the I2C bus. Its bus form is a two-line serial bus consisting of the data line SDA and clock SCL, the circuit module connected to the bus can be used as a transmitter (host) and a receiver (slave ). In addition to the control code (including the slave ID and access address code) and data code, the frame data also includes the start signal, end signal, and response signal.
Start signal: in high-power mode, SDA is switched from high to low and data is transmitted.
Control Code: used to select the operation target and object, that is, to connect the circuit to be controlled and determine the type object of control. During the reading period, that is, when the SCL clock line is in the high frequency of the clock pulse, the data bit on the SDA will not change.
Data Code: it is the specific useful data (such as contrast and brightness) and information sent from the host to the slave. During reading, the data bit on SDA will not change.
Response signal: After receiving 8-bit data, the receiver sends a specific low level to the sender. The read/write direction is the opposite of that of other data bits, that is, the slave node writes the low level, and the Host reads the low level.
End signal: in high-power mode, SDA switches from low-level to high-level, indicating that the data frame transmission ends.
Of course, the data bit or segment definitions of different bus must be different. However, based on the same principle, you can learn more about the features and features of the Protocol. Although the size of the Information Frame varies, a specific data bit or data segment is similar to the I2C bus mentioned in this article, it defines the meaning and functions of its compliance according to its Protocol requirements.
4 main technical indicators
The main technical indicators for bus evaluation are bus bandwidth (transmission rate), data Bit Width (Bit Width), operating frequency, and data transmission reliability and stability.
4.1 bandwidth (transmission rate), bit width, and operating frequency
The bandwidth of the bus refers to the amount of data transmitted on the bus per unit time, that is, the maximum data transmission rate of MB per bill. The bus Bit Width refers to the number of digits of binary data that the bus can transmit at the same time, or the number of digits of the data bus, that is, the concept of bus width such as 32-bit and 64-bit; the wider the bus bit width, the larger the data transmission rate, the wider the bandwidth of the bus. The clock frequency of the bus is in MHz. It is related to the transmission medium, the signal amplitude, and the transmission distance. Under the same hardware conditions, the frequency of differential signal transmission is often much higher than that of a single-side signal, because the difference signal is only half the amplitude of a single-side signal.
The bandwidth, bit width, and operating frequency of the bus are closely related. The relationship between them is as follows:
4.2 Data Transmission reliability
Reliability is the most critical parameter for bus evaluation. Without reliability, the transmitted data is all wrong information, and the actual meaning of the bus is lost. To improve the reliability of the bus, the following measures are usually used:
The transmitter listens to the bus before sending data frames. data frames can be transmitted to the bus only when the bus is idle. This avoids data conflicts between different nodes.
The twisted pair differential signal is used to transmit data to reduce the voltage increase and decrease of a single line, and to reduce the higher harmonic generation produced by the signal edge.
Make sure that the data edge has a certain slope.
Increase the matching resistance and capacitance to reduce the signal transmitting on the bus and balance the distribution capacitance on the bus.
Use appropriate network topology and shielding technology to reduce interference from other signals.
In addition, the software improves the reliability of data transmission through measures such as digital filtering and data verification and error correction.
5 conclusion
Learning is a step-by-step process. The learning and understanding of bus technology is also a process that is constantly updated with the continuous development of its technology. Zi Yue: "to do good deeds, you must first sharpen your tools ." Only by setting a solid foundation based on the most basic principles can we achieve a better understanding of this knowledge point and broaden our knowledge.