1.1 Definition
Bus, called "BUS" in English, that is, our Chinese "public **** car", this is a very good image of, for example, public **** car route is certain, we can anyone take a public **** car to any one of the public **** car route. Any one of us can take a bus to any one of the stops on the bus route. If we compare people to electronic signals, this is why the English call it "BUS" rather than "CAR" the real intention. Of course, professionally speaking, the bus is a form of structure describing the electronic signal transmission lines, is a collection of a class of signal lines, is a subsystem between the transmission of information between the public **** channel [1]. The bus enables functions such as transmission, exchange, ****enjoyment and logical control of information between components within the entire system. Such as in the computer system, it is the CPU, memory, input and output devices to transfer information in the public channel, the host of the various components connected through the host, external devices through the corresponding interface circuit and then connected to the bus.
1.2 Classification
There are many ways to classify buses, such as being divided into external and internal buses, system buses and non-system buses, etc., the following are some of the most commonly used classification methods [2].
1.2.1 Functionality
The most common way to categorize data buses is functionality, which can be divided into address buses, data buses and control buses. In some systems, the data bus and address bus can be ****-enjoyed under the control of an address latch, i.e., multiplexed.
The address bus is dedicated to transmitting addresses. During the design process, the most seen should be the CPU address bus from the CPU address bus to select the storage address of the external memory. The number of bits in the address bus often determines the size of the memory storage space, for example, if the address bus is 16 bits, the maximum storage space available is 216 (64KB).
The data bus is used for transmitting data information, and it is divided into unidirectional and bidirectional transmission data buses, and the bidirectional transmission data bus usually adopts a bidirectional tri-state form of the bus. The number of bits of the data bus is usually consistent with the word length of the microprocessor. For example, Intel 8086 microprocessor word length of 16 bits, the width of its data bus is also 16 bits. In practice, what is transmitted on the data bus is not necessarily data in the full sense of the word.
The control bus is used to transmit control signals and timing signals. For example, sometimes the microprocessor to operate on the external memory through the control bus to send read/write signals, chip select signals and read interrupt response signals. The control bus is generally bi-directional, the direction of transmission by the specific control signals, the number of bits should also be based on the actual control needs of the system.
1.2.2 Transmission Mode
According to the mode of data transmission, buses can be categorized into serial buses and parallel buses. From the principle point of view, the parallel transmission method is actually superior to the serial transmission method, but its cost will increase. In layman's terms, the parallel transmission path is like a multi-lane highway, while the serial transmission allows only one car to pass through the single-lane highway. At present, the common serial bus SPI, I2C, USB, IEEE1394, RS232, CAN, etc.; and parallel bus is relatively less diverse, common such as IEEE1284, ISA, PCI and so on.
1.2.3 According to the clock signal mode
According to whether the clock signal is independent, can be divided into synchronous bus and asynchronous bus. The clock signal of synchronous bus is independent of the data, which means that a separate line is used as the clock signal line; while the clock signal of asynchronous bus is extracted from the data, and the edge of the data signal is usually used as the clock synchronization signal.
2 bus transmission basic principles
Based on the previous definition of the bus can be seen that the basic role of the bus is used to transmit signals, in order to the subsystems of the information can be transmitted in an effective and timely manner, in order to not interfere with each other's signals and to avoid overcrowding of the physical space, the best way to use the multiplexing technology [3], that is to say, the basic principle of bus transmission is the multiplexing technology. The basic principle of bus transmission is multiplexing technology. The so-called multiplexing refers to multiple users *** enjoy the common channel of a mechanism, the most common are time division multiplexing, frequency division multiplexing and code division multiplexing.
2.1 Time-Division Multiplexing (TDMA)
Time-Division Multiplexing (TDMA) is a mechanism that divides a channel into multiple time segments according to time, where signals from different sources are requested to respond in different time segments, and the transmission times of each other's signals do not overlap on the time axis.
2.2 Frequency Division Multiplexing (FDMA)
Frequency Division Multiplexing (FDMA) is the channel's available frequency band is divided into a number of non-overlapping frequency bands, each signal after frequency modulation spectrum occupies one of the frequency bands, so as to realize the transmission of multiple signals of different frequencies in the same channel. When the receiver receives the signal, it will use appropriate band-pass filters and frequency demodulators to restore the original signal.
2.3 Code Division Multiplexing (CDMA)
Code Division Multiplexing (CDMA) is the process by which signals are transmitted with their own specific identification or address codes, and the receiving end distinguishes between the transmissions on the public *** channel according to the different identification or address codes, and the transmissions are received only if they are identical in terms of identification or address codes.
3 bus communication protocol
For the study of the bus, to understand the communication protocol is the most critical step in the process, all the bus technology information will spend a large part of the description of the protocol, especially the ISO/OSI definition of the seven layers. In fact, to understand the protocol of a bus, the main thing is to understand the bus frame data for each one of the characteristics and significance of the bus nodes to send and receive valid data are through the nodes of the frame data bits or segments of the judgement and certainty to be realized.
As shown in Figure 1 is a common I2C bus transmission of a byte of data frame, the bus form is composed of data lines SDA and clock SCL two-wire serial bus, and connected to the bus circuit module can be used as a transmitter (host) and can be used as a receiver (slave). The frame data includes a start signal, an end signal and an answer signal in addition to the control code (including the slave identification code and access address code) and the data code [4].
Start Signal: When SCL is high, SDA jumps from high to low to start transmitting data.
Control code: It is used to select the target and object of operation, i.e., to turn on the circuit to be controlled and to determine the kind of object to be controlled. The data bit on SDA does not jump during the read period, i.e., when the SCL clock line is at the high level of the clock pulse.
Data codes: are specific useful data (e.g., contrast, brightness, etc.) and information sent from the host to the slave. The data bits on the SDA do not jump during a read.
Answer signal: the receiver receives 8bit data and sends a specific low level to the sender. The read/write is in the opposite direction of the other data bits, i.e., the slave writes that low level and the host reads it.
End signal: When SCL is high, SDA jumps from low to high indicating the end of data frame transmission.
Of course, the definition of data bits or segments must be different for different buses, but based on the same principle, you can more quickly understand the characteristics and features of its protocol. Although the size of the information frame varies, the specific data bits or segments are similar to the I2C bus mentioned in this article, and will be defined according to the requirements of its protocol to achieve the meaning and function of the standard.
4 main technical indicators
The main technical indicators for evaluating a bus are the bandwidth (i.e., transmission rate) of the bus, the width of the data bits (bit-width), the operating frequency, and the reliability and stability of the transmitted data.
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 of time, i.e., the maximum data transmission rate of MB per banknote transmission. The bit width of the bus refers to the number of bits of binary data that can be transmitted simultaneously by the bus, or the number of bits of the data bus, i.e., 32-bit, 64-bit, etc. The concept of bus width; the wider the bit width of the bus, the greater the data transfer rate, the wider the bandwidth of the bus. The operating clock frequency of the bus is measured in MHz, which is related to the medium of transmission, the amplitude size of the signal and the transmission distance. In the same hardware conditions, we use differential signal transmission frequency is often much higher than the single-sided signal, this is because the amplitude of the differential signal is only half of the single-sided signal.
The bandwidth, bit width, and operating frequency of a bus are closely related to each other:
4.2 Reliability of Transmitted Data
Reliability is the most critical parameter for evaluating a bus. Without reliability, the transmitted data are all incorrect information, and the practical significance of the bus is lost. In order to improve the reliability of the bus, the measures usually used are:
The use of data frames sent before the transmitter listens to the bus, only to listen to the bus in the idle state before transmitting data frames to the bus, so as to avoid data conflicts between different nodes.
The use of twisted-pair differential signaling to transmit data to reduce the voltage rise and fall of a single line, reducing the high harmonics generated by the edges of the signal.
Appropriately allow the edges of the data to have a certain slope.
Adding matching resistors, capacitors, etc. to reduce signal emissions on the bus and balance the distributed capacitance on the bus, etc.
Use appropriate network topology and shielding techniques to minimize interference from other signals.
There are also software measures to improve the reliability of data transmission through digital filtering, data checking and error correction.
5 Conclusion
Learning is a gradual process, the learning and understanding of bus technology is also with the continuous development of its technology and the process of continuous updating. The son said, "If you want to do a good job, you must first sharpen your tools." Only from the most basic principles, lay a good foundation, in order to be able to integrate in the future learning, forward and backward, and further in-depth knowledge of the point and broaden the knowledge base.