Smart test
Exhaust the common buses and interfaces in embedded system design in one article
Any microprocessor must be connected to a certain number of components and peripheral devices, but if each component and each type of peripheral device are directly connected to the CPU with a set of wires, the connection will be complicated and even difficult to implement. In order to simplify the hardware circuit design and simplify the system structure, a group of lines is commonly used, configured with appropriate interface circuits, and connected to various components and peripheral devices. This group of shared connection lines is called a bus. The use of a bus structure facilitates the expansion of components and equipment, especially the development of a unified bus standard makes it easy to interconnect different equipment.
The bus in the microcomputer generally has an internal bus, a system bus and an external bus.
(1). The internal bus is the bus between the peripheral chips and the processor in the microcomputer, which is used for the interconnection of the chips;
(2). The system bus is the bus between each plug-in board and the system board in the microcomputer, which is used for the interconnection of the plug-in boards;
(3), the external bus is a bus between a microcomputer and an external device. As a device, a microcomputer exchanges information and data with other devices through the bus. It is used for the interconnection of devices.
In addition, in a broad sense, computer communication methods can be divided into parallel communication and serial communication, and the corresponding communication buses are called parallel buses and serial buses. Parallel communication is fast and has good real-time performance, but it is not suitable for miniaturized products due to the large number of ports occupied. Although the serial communication rate is low, it is more simple and convenient in the micro-processing circuit where the data communication throughput is not very large. Convenient and flexible. Serial communication can generally be divided into asynchronous mode and synchronous mode.
With the development of microelectronics technology and computer technology, bus technology is also constantly developing and improving, so that the computer bus technology has a wide variety and each has its own characteristics. In the following, only the more popular bus technologies in the various types of microcomputer buses will be introduced separately.
One, internal bus
1. I2C bus
I2C (Inter-IC) bus was introduced by Philips more than 10 years ago. It is a new type of bus standard widely adopted in the field of microelectronic communication control in recent years. It is a special form of synchronous communication, which has the advantages of fewer interface lines, simplified control mode, small device package form, and higher communication speed. In master-slave communication, there can be multiple I2C bus devices connected to the I2C bus at the same time, and the communication object can be identified through the address.
2. SPI bus
Serial peripheral interface SPI (serial peripheral interface) bus technology is a synchronous serial interface introduced by Motorola. Most MCUs (microcontrollers) produced by Motorola are equipped with SPI hardware interfaces, such as 68 series MCUs. The SPI bus is a three-wire synchronous bus. Because of its strong hardware functions, the SPI-related software is quite simple, allowing the CPU to have more time to process other transactions.
3. SCI bus
Serial communication interface SCI (serial communication interface) is also introduced by Motorola. It is a universal asynchronous communication interface UART, which is basically the same as the asynchronous communication function of MCS-51.
2. System bus
1. ISA bus
ISA (industrial standard architecture) bus standard is a system bus standard established by IBM in 1984 for the introduction of PC/AT machines, so it is also called AT bus. It is an extension of the XT bus to meet the requirements of the 8/16-bit data bus. It was widely used in the 80286 to 80486 era, so that there is still an ISA bus slot in the Pentium machine. The ISA bus has 98 pins.
2. EISA bus
EISA bus is a bus standard jointly launched by 9 companies such as Compaq in 1988. It uses a double-layer socket on the basis of the ISA bus, and 98 signal lines are added to the 98 signal lines of the original ISA bus, that is, an EISA signal line is added between the two ISA signal lines. In practice, the EISA bus is fully compatible with ISA bus signals.
3. VESA bus
VESA (video electronics standard association) bus is a local bus jointly launched by 60 accessory card manufacturers in 1992, referred to as VL (VESA local bus) bus. Its introduction laid the foundation for the innovation of the microcomputer system bus architecture. This bus system takes into account the direct connection between the CPU, the main memory and the Cache. Usually this part of the bus is called the CPU bus or the main bus, and other devices are connected to the CPU bus through the VL bus, so the VL bus is called the local bus. It defines a 32-bit data line and can be expanded to 64-bit through an expansion slot. It uses a 33MHz clock frequency and has a transmission rate of 132MB/s. It can work synchronously with the CPU. It is a high-speed, high-efficiency local bus that can support 386SX, 386DX, 486SX, 486DX and Pentium microprocessors.
4. PCI bus
PCI (peripheral component interconnect) bus is one of the current buses, which is a local bus introduced by Intel Corporation. It defines a 32-bit data bus and can be expanded to 64 bits. The PCI bus motherboard slot is smaller than the original ISA bus slot, and its function is greatly improved than VESA and ISA. It supports burst read and write operations, and the transmission rate can reach 132MB/s. It can support multiple sets of peripheral devices at the same time. . The PCI local bus is not compatible with the existing ISA, EISA, and MCA (micro channel architecture) buses, but it is not restricted by the processor and is a bus developed based on a new generation of microprocessors such as Pentium.
5. Compact PCI
The system buses listed above are generally used in commercial PCs. In the computer system bus, there is another type of system bus designed to adapt to the industrial field environment, such as STD bus, VME bus, PC/104 Bus and so on. Here only introduces one of the popular buses of the current industrial computer-Compact PCI. Compact PCI means "solid PCI". It is a PCI system that uses a passive bus backplane structure. It is the electrical and software standard of the PCI bus plus the industrial assembly standard of European cards. It is an industrial computer standard today. Compact PCI is based on the original PCI bus. It uses the advantages of PCI to provide a high-performance system that meets the application requirements of industrial environments. At the same time, it also considers making full use of traditional bus products, such as ISA, STD, VME or PC/104 To expand the I/O and other functions of the system.
Three, external bus
1. RS-232-C bus
RS-232-C is a serial physical interface standard developed by the Electronic Industry Association (EIA). RS is the abbreviation of "Recommended Standard" in English, 232 is the identification number, and C is the number of revisions. The RS-232-C bus standard has 25 signal lines, including a main channel and an auxiliary channel. In most cases, the main channel is mainly used. For general duplex communication, only a few signal lines can be realized, such as one Sending wire, a receiving wire and a ground wire. The data transmission rate specified by the RS-232-C standard is 50, 75, 100, 150, 300, 600, 1200, 2400, 4800, 9600, 19200 baud per second. The RS-232-C standard stipulates that the drive allows a capacitive load of 2500pF, and the communication distance will be limited by this capacitance. For example, when a 150pF/m communication cable is used, the communication distance is 15m; if the capacitance of each meter of cable decreases, The communication distance can be increased. Another reason for the short transmission distance is that RS-232 is a single-ended signal transmission, which has problems such as common ground noise and inability to suppress common mode interference, so it is generally used for communication within 20m.
2. RS-485 bus
When the communication distance is tens of meters to thousands of meters, the RS-485 serial bus standard is widely used. RS-485 uses balanced transmission and differential reception, so it has the ability to suppress common mode interference. In addition, the bus transceiver has high sensitivity and can detect voltages as low as 200mV, so the transmission signal can be recovered from kilometers away. RS-485 adopts half-duplex working mode, and only one point is in the transmitting state at any time. Therefore, the transmitting circuit must be controlled by the enable signal. RS-485 is very convenient when used for multi-point interconnection, and can save a lot of signal lines. The application of RS-485 can be networked to form a distributed system, which allows 32 drivers and 32 receivers to be connected in parallel.
3. IEEE-488 bus
The above two external buses are serial buses, and the IEEE-488 bus is a parallel bus interface standard. The IEEE-488 bus is used to connect the system, such as microcomputers, digital voltmeters, digital displays and other equipment and other instruments can be assembled with the IEEE-488 bus. It transmits signals in a bit-parallel, byte-serial, two-way asynchronous manner, and the connection mode is a bus mode. Instruments and devices are directly connected in parallel on the bus without an intermediary unit, but up to 15 devices can be connected to the bus. The transmission distance is 20 meters, the signal transmission speed is generally 500KB/s, and the transmission speed is 1MB/s.
4. USB bus
Universal serial bus USB (universal serial bus) is a new interface standard jointly launched by 7 world-famous computer and communication companies, including Intel, Compaq, Digital, IBM, Microsoft, NEC, and Northern Telecom. It is based on universal connection technology, realizes simple and fast connection of peripherals, and achieves the purpose of facilitating users, reducing costs, and expanding the range of PC connection peripherals. It can provide power for peripherals, unlike ordinary serial and parallel devices that require a separate power supply system. In addition, fast is one of the outstanding features of USB technology. The transfer rate of USB is up to 12Mbps 100 times faster than serial port and nearly 10 times faster than parallel port, and USB can also support multimedia. However, the computer cannot be interconnected via USB.
5.IEEE1394
Apple’s FireWire is based on a standard made by IEEE. It has great similarities with USB. With tree or daisy chain structure, up to 63 different types of equipment can be connected to one interface in a cascading manner. The transmission rate is high, up to 3.2Gb/s; the real-time performance is good, the bus provides power, the relationship between the devices in the system is equal, the connection is convenient, and hot plug and plug-and-play are allowed.