Summary on computer interface

xiaoxiao2021-03-06  44

Note: Excerpted from http://www.eebyte.com 2003-4-22 Electronic Engineer Website, a little modification! //Http://jjrly.mysmth.net CPU and external devices, memory connections and data exchanges need to be implemented by interface devices, the former is called an I / O interface, and the latter is called a memory interface. The memory is typically working in synchronous control of the CPU, and the interface circuit is relatively simple; and there is a wide variety of I / O devices, and the corresponding interface circuits are different, so it is accustomed to the interface only means I / O interface. First, the concept of I / 0 interface 1. The function of the classification I / O interface of the interface is responsible for implementing the CPU through the system bus to link the I / O circuit and the peripheral device, according to the complexity of the circuit and equipment, I / O interface The hardware is mainly divided into two major categories: 1) I / O interface chip These chips are mostly integrated circuits, entered different commands and parameters through the CPU, and control the relevant I / O circuits and simple peripherals. Common interface chips such as timing / counters, interrupt controllers, DMA controllers, parallel interfaces, etc. 2) I / O Interface Control Card There are several integrated circuits to be a component, or directly on the motherboard directly with the CPU, or one plug-in is inserted on the system bus slot. According to the connection object of the interface, they can be divided into serial interfaces, parallel interfaces, keyboard interfaces, and disk interfaces. 2. The function of the interface is due to a wide variety of peripherals of the computer, and almost all the electromechanical transmission equipment is used. Therefore, the CPU has the following problems when data exchange with the I / O device: speed mismatch: I / O device's working speed Slowly more than CPU, and because of the different types, the speed difference between them is also very large. For example, the transmission speed of the hard disk is much faster than the printer. Timing mismatch: Each I / O device has its own timing control circuit, transmitting data with its own speed, and cannot be unified with the timing of the CPU. Information format does not match: different I / O devices store and process information differently, for example, two types of serial and parallel; can also be divided into binary format, ACSII coding, and BCD coding. The information type does not match: the signal types employed by different I / O devices are different, and some are digital signals, and some are analog signals, so the processing methods employed are also different. Based on the above reasons, data exchange between CPUs and peripherals must be completed by an interface. The usual interface has the following functions: 1) Set the data of the data, buffer logic to accommodate the speed difference between the CPU and the peripheral, the interface is usually Composed of some registers or RAM chips, if the chip is large enough to implement the transmission of bulk data; 2) The conversion of information format, such as serial and parallel conversion; 3) can coordinate the CPU and the outside in information Differences of type and level, such as level conversion drivers, digital / mode or mode / digital converters, etc .; 4) Coordination timing differences; 5) Address decoding and device selection function; 6) Set interrupt and DMA control logic, The interrupt and DMA request signals are guaranteed in the event of interrupt and DMA, and the interrupt processing and DMA transmission are completed after accepting an interrupt and DMA response. 3. Control mode of the interface The CPU has the following ways to control the external settings: 1) Program Query mode In this way, the CPU is inquiry to specify the current state of the peripheral through the I / O instruction, if the peripheral is ready, Then, the input or output of the data, otherwise the CPU waits, the loop query.

The advantage of this way is that the structure is simple, only a small amount of hardware circuitry can, and the disadvantage is that the CPU is much higher than the peripheral, and is usually in the waiting state, the working efficiency is very low. 2) In this way, the CPU is no longer passive, but can perform other programs. Once the peripheral is ready to be used, the service request can be filed to the CPU, if the CPU should be temporarily stopped The execution of the program is turned to execute the service program corresponding to the request, and then proceeds to the procedure that is interrupted. The advantage of interrupt treatment is obvious. It not only saves the CPU to query peripheral status and waiting for peripherals, improve the work efficiency of the CPU, but also meets the real-time requirements of peripherals. However, it is necessary to assign an interrupt request number and a corresponding interrupt service program for each I / O device. In addition, an interrupt controller (I / O interface chip) manages the interrupt request proposed by the I / O device, such as setting interrupt mask, Interrupt request priority, etc. In addition, the disadvantage of the interrupt processing method is that every time it is interrupted, start the interrupt controller, but also retains and restores the site to continue the execution of the original program, the amount of work takes a lot, so if you need a lot of data exchange, The performance of the system will be low. 3) DMA (Direct Memory Access) Transfer mode DMA is most obvious that it is not using software but uses a specialized controller to control data exchange between memory and peripherals, no need to intervene, greatly improve CPU Work efficiency. Prior to the DMA data transfer, the DMA controller will apply to the CPU to apply for bus control. If the CPU is allowed, the control is handed over, and therefore, when the data exchange, the bus control is grasped by the DMA controller, after the transmission ends, The DMA controller returns the bus to the CPU. Second, the common interface interface type means that the electronic whiteboard is connected to the computer system to connect. Current internet and computer connection common interface type: There is a parallel port (also known as IEEE 1284, Centronics) and serial port (also known as RS-232 interface) and USB interface. 1. Currently, the parallel interface in the computer is mainly used as the printer port, and the interface is no longer a 36-pin connector but a 25-pin D connector. The "parallel" means that 8-bit data is transmitted simultaneously through a parallel line, so that the data transfer speed is greatly improved, but the length of the line transmitted in parallel is limited, since the length increases, the interference will increase, it is easy to errone. There are now five common parallel ports: 4-bit, 8-bit, half 8, EPP, and ECP, most PCs are equipped with 4 or 8-bit parallel ports, many portable ports with Intel386 chipset with EPP port, support All IEEE1284 Parallel Specifications Computers are equipped with ECP parallel ports. Standard parallel port 4, 8-bit, half 8 bits: 4 bits can only be input at a time, but 8-bit data can be output; 8-bit port can be input and output at one time; half 8 bits can also be. EPP port (enhanced parallel port): Developed by companies such as Intel, allowing 8 bidirectional data transfer, which can be connected to various non-printer devices such as scanners, LAN adapters, disk drives, and CDROM drives. ECP port (extended parallel port): Developed by Microsoft, HP, support command cycle, data cycle, and multiple logical devices, which can be used in multi-task environments (direct storage access).

At present, almost all 586 machines have integrated parallel port sockets, labeled paralle1 or lpt1, is a 26-pin double-pin socket. 2. Another standard interface of a serial interface computer is a serial port, and now the PC generally has at least two serial ports COM1 and COM2. The serial port is different from the parallel port in that its data and control information are transmitted in a bit. In this way, although the speed is slow, the transfer distance is longer than in parallel, so the long-distance communication should use serial ports. Usually COM1 uses 9-pin D-shaped connector, and COM2 uses some old-fashioned DB25 pin connector, also known as RS-422 interface, but it is already rarely used. 3. Disk interface 1) IDE interface IDE interface is also called ATA ports, only two hard drives that do not exceed 528m, and the cost is very low, so it is very popular at 386,486. However, most IDE interfaces do not support DMA data transmission, and only standard PCI / O port instructions can be used to transmit all commands, status, and data. Almost all 586 motherboards have integrated two 40-pin two-pin pin ID interface socket, respectively, respectively, IDE1 and IDE2, respectively. 2) The EIDE interface EIDE interface has great improvements compared with the IDE interface, which is the most popular interface. First, the periphery it supports no longer two but 4, the supported device except the hard disk, and also includes a CD-ROM drive disk backup device. Second, the EIDE standard cancels 528MB restrictions, and in order to limit 8GP. Third, EIDE has a higher data transfer rate, supports PIO mode 3 and mode 4 standards. 4. SCSI Interface SCSI (SmallComputersystemInterface Small Computer System Interface, the hard disk of the SCSI interface is widely used in a computer that makes graphics processing and network services. In addition to the hard disk, the SCSI interface can also connect to the CD-ROM drive, scanner, and printer, etc., which have the following features: * Can connect to 7 peripherals simultaneously; * The bus is configured to parallel 8 bits, 16-bit or 32 bits; * Allow The maximum hard disk space is 8.4GB (some have reached 9.09GB); * Higher data transfer rate, IDE is 2MB per second, SCSI usually reaches 5MB per second, FastScsi (SCSI-2) can reach 10MB per second, the latest SCSI-3 can even reach 40MB per second, and EIDE can only reach 16.6MB per second; * cost is much higher than IDE and EIDE interface, and the SCSI interface hard disk must be used in conjunction with the SCSI interface card, SCSI interface card is more than IED And the EIDE interface is much more expensive. * The SCSI interface is intelligent, can communicate with each other without increasing the burden of the CPU. When transmitting data between IDE and EIDE devices, the CPU must be intervened, while the SCSI device actively acts in the data transfer process, and can be implemented in the SCSI bus until the CPU is notified. 5. TheUSB interface USB is "Universal Serial Bus", the Chinese name is a universal serial bus. This is a new interface technology that is gradually applied in the PC field in recent years. The USB interface has the characteristics of faster transfer speed, hot swap and connecting multiple devices. It is currently widely used in various external equipment. There are two current USB interfaces: USB1.1 and USB2.0. Theoretically, the transmission speed of USB1.1 can reach 12Mbps / second, and USB2.0 can reach the speed of 480Mbps / sec, and can be compatible with USB1.1.

转载请注明原文地址:https://www.9cbs.com/read-113449.html

New Post(0)