Basic knowledge about interface technology

Publisher:创意狂想Latest update time:2010-09-20 Source: 维库开发网 Keywords:Interface Reading articles on mobile phones Scan QR code
Read articles on your mobile phone anytime, anywhere

The connection and data exchange between the CPU and external devices and memory need to be realized through interface devices. The former is called I/O interface, and the latter is called memory interface. Memory usually works under the synchronous control of the CPU, and the interface circuit is relatively simple; while there are many varieties of I/O devices, and their corresponding interface circuits are also different. Therefore, it is customary to refer to I/O interface when talking about interface.

1. Concept of I/0 interface

1. Classification of interfaces

The function of the I/O interface is to connect the I/O circuit and peripheral devices through the system bus of the CPU. According to the complexity of the circuit and the device, the hardware of the I/O interface is mainly divided into two categories:

1) I/O interface chip

Most of these chips are integrated circuits. They input different commands and parameters through the CPU and control related I/O circuits and simple peripherals to perform corresponding operations. Common interface chips include timers/counters, interrupt controllers, DMA controllers, parallel interfaces, etc.

2) I/O interface control card

Several integrated circuits are logically combined into a component, either directly on the motherboard with the CPU, or as a plug-in inserted into the system bus slot.

According to the connection object of the interface, they can be divided into serial interface, parallel interface, keyboard interface and disk interface, etc.

2. Interface Function

Since there are many kinds of computer peripherals, almost all of which use electromechanical transmission devices, the CPU has the following problems when exchanging data with I/O devices:

Speed ​​mismatch: The working speed of I/O devices is much slower than that of the CPU, and due to different types, the speed difference between them is also very large. For example, the transmission speed of a hard disk is much faster than that of a printer.

Timing mismatch: Each I/O device has its own timing control circuit and transmits data at its own speed, which cannot be unified with the timing of the CPU.

Information format mismatch: Different I/O devices store and process information in different formats, for example

There are two types: serial and parallel; it can also be divided into binary format, ACSII encoding and BCD encoding, etc.

Information type mismatch: Different I/O devices use different signal types, some are digital signals, and some are analog signals, so the processing methods used are also different.

Based on the above reasons, data exchange between the CPU and peripherals must be completed through interfaces. Usually, interfaces have the following functions:

1) Set up data storage and buffering logic to adapt to the speed difference between the CPU and peripherals. The interface is usually composed of some registers or RAM chips. If the chip is large enough, it can also realize batch data transmission;

2) Ability to convert information formats, such as serial and parallel conversion;

3) Ability to coordinate the differences in information type and level between the CPU and peripherals, such as level-shifting drivers, digital/analog or analog/digital converters, etc.

4) Coordinate timing differences;

5) Address decoding and device selection functions;

6) Set up the interrupt and DMA control logic to ensure that interrupt and DMA request signals are generated when interrupt and DMA are allowed, and complete interrupt processing and DMA transfer after receiving interrupt and DMA response.

3. Interface control method

There are several ways for the CPU to control peripherals through interfaces:

1) Program query method

In this mode, the CPU inquires about the current status of the specified peripheral through I/O instructions. If the peripheral is ready, data is input or output. Otherwise, the CPU waits and queries in a loop.

The advantage of this method is that it has a simple structure and only requires a small amount of hardware circuits. The disadvantage is that since the CPU speed is much higher than the peripherals, it is usually in a waiting state and the working efficiency is very low.

2) Interrupt handling method

In this way, the CPU no longer waits passively, but can execute other programs. Once the peripheral is ready for data exchange, it can make a service request to the CPU. If the CPU responds to the request, it will temporarily stop the execution of the current program and switch to execute the service program corresponding to the request. After completion, it will continue to execute the original interrupted program.

The advantages of interrupt handling are obvious. It not only saves the CPU the time spent on querying the status of peripherals and waiting for them to be ready, improves the CPU's working efficiency, but also meets the real-time requirements of peripherals. However, an interrupt request number and a corresponding interrupt service program need to be assigned to each I/O device. In addition, an interrupt controller (I/O interface chip) is required to manage the interrupt requests raised by the I/O devices, such as setting interrupt masking, interrupt request priority, etc.

In addition, the disadvantage of the interrupt processing method is that an interrupt must be generated every time a character is transmitted, the interrupt controller must be started, and the scene must be preserved and restored in order to continue the execution of the original program. This requires a lot of work, so if a large amount of data exchange is required, the system performance will be very low.

3) DMA (direct memory access) transfer method

One of the most obvious features of DMA is that it uses a dedicated controller instead of software to control the data exchange between memory and peripherals, without the need for CPU intervention, greatly improving the CPU's work efficiency.

Before performing DMA data transmission, the DMA controller will apply to the CPU for bus control. If the CPU allows, it will hand over the control. Therefore, during data exchange, the bus control is held by the DMA controller. After the transmission is completed, the DMA controller returns the bus control to the CPU.

2. Common interfaces

1. Parallel interface

At present, the parallel interface in the computer is mainly used as a printer port. The interface no longer uses a 36-pin connector but a 25-pin D-shaped connector. The so-called "parallel" means that 8 bits of data are transmitted simultaneously through parallel lines, which greatly improves the data transmission speed, but the length of the parallel transmission line is limited, because as the length increases, interference will increase, which is prone to errors.

There are five common parallel ports: 4-bit, 8-bit, half 8-bit, EPP and ECP. Most PCs are equipped with 4-bit or 8-bit parallel ports. Many portable computers using INTEL386 chipsets are equipped with EPP ports. Computers that support all IEEE1284 parallel port specifications are equipped with ECP parallel ports.

Standard parallel port 4-bit, 8-bit, half 8-bit:

A 4-bit port can only input 4 bits of data at a time, but can output 8 bits of data; an 8-bit port can input and output 8 bits of data at a time; half-8 bits is also possible.

EPP port (Enhanced Parallel Port): Developed by INTEL and other companies, it allows 8-bit bidirectional data transmission and can connect various non-printer devices such as scanners, LAN adapters, disk drives, and CDROM drives.

ECP port (Extended Parallel Port): Developed by Microsoft and HP, it can support command cycles, data cycles and multiple logical device addressing, and can use DMA (direct memory access) in a multi-tasking environment.

Currently, almost all 586 motherboards are equipped with a parallel port socket, marked as Parallel 1 or LPT 1, which is a 26-pin double-row pin socket.

2. Serial interface

Another standard computer interface is the serial port. Today's PCs generally have at least two serial ports, COM1 and COM2. The difference between a serial port and a parallel port is that its data and control information are transmitted serially, one bit at a time. In this way, although the speed is slower, the transmission distance is longer than that of a parallel port, so a serial port should be used for long-distance communication. Usually COM1 uses a 9-pin D-shaped connector, while some COM2 uses an old-fashioned DB25-pin connector.

3. Disk interface

1) IDE interface

The IDE interface is also called the ATA port. It can only connect two hard disk drives with a capacity of no more than 528M. The cost of the interface is very low, so it was very popular in the 38*86 era. However, most IDE interfaces do not support DMA data transfer and can only use standard PCI/O port instructions to transfer all commands, status, and data. Almost all 586 motherboards are integrated with two 40-pin double-row IDE interface sockets, marked as IDE1 and IDE2.

2) EIDE interface

The EIDE interface is a significant improvement over the IDE interface and is currently the most popular interface.

First of all, the number of peripherals it supports is no longer 2 but 4. In addition to hard disks, the supported devices also include CD-ROM drives, disk backup devices, etc.

Secondly, the EIDE standard removed the 528MB limit and replaced it with an 8GP limit.

Third, EIDE has a higher data transfer rate and supports PIO Mode 3 and Mode 4 standards.

4.SCSI interface

SCSI (Small Computer System Interface) is a small computer system interface. Hard disks with SCSI interfaces are widely used in computers that do graphics processing and network services. In addition to hard disks, SCSI interfaces can also connect CD-ROM drives, scanners, and printers. It has the following characteristics:

*Can connect 7 peripherals at the same time;

* Bus configuration is parallel 8-bit, 16-bit or 32-bit;

* The maximum hard disk space allowed is 8.4GB (some have reached 9.09GB);

* Higher data transfer rate: IDE is 2MB/s, SCSI can usually reach 5MB/s, FASTSCSI (SCSI-2) can reach 10MB/s, and the latest SCSI-3 can even reach 40MB/s, while EIDE can only reach a maximum of 16.6MB/s;

* The cost is much higher than that of IDE and EIDE interfaces. In addition, SCSI interface hard drives must be used in conjunction with SCSI interface cards, which are also much more expensive than IDE and EIDE interfaces.

*SCSI interfaces are intelligent and can communicate with each other without increasing the burden on the CPU. When transferring data between IDE and EIDE devices, the CPU must intervene, while SCSI devices take the initiative in the data transfer process and can perform specific operations within the SCSI bus until completion and then notify the CPU.

5.USB interface

The latest USB serial interface standard is jointly launched by Microsoft, INTEL, Compaq, IBM and other major companies. It provides hot plug-and-play connection outside the chassis. Users no longer need to open the chassis and turn off the power when connecting peripherals. Instead, they use a "cascade" method. Each USB device uses a USB plug to connect to a USB socket of a peripheral, and it itself provides a USB socket for the next USB device to use. Through this connection, a USB controller can connect up to 127 peripherals, and the distance between each peripheral can reach 5 meters. The USB unified 4-pin round plug will replace the numerous serial/parallel ports (mouse, MODEM) keyboard and other plugs behind the chassis. USB can intelligently identify the insertion or removal of peripherals on the USB chain. In addition to being able to connect keyboards, mice, etc., USB can also connect low-speed peripherals such as ISDN, telephone systems, digital audio, printers and scanners.

3. I/O expansion slot

The I/O expansion slot is the path for I/O signal transmission and is an extension of the system bus. Any standard option can be inserted, such as a display card, decompression card, MODEM card, and sound card. Through the I/O expansion slot, the CPU can address and access all I/O interface chips and control cards connected to the channel for reading and writing.

Depending on the type of bus, the expansion slots on the motherboard can be divided into ISA, EISA, MAC, VESA and PCI.

1) ISA slot

Black, divided into 8-bit and 16-bit. The 16-bit expansion slot can be inserted with 8-bit and 16-bit control cards, but the 8-bit expansion slot can only be inserted with 8-bit cards.

2) EISA slot

Brown, the appearance and length are the same as the 16-bit ISA card, but it is deeper and can be inserted with ISA and EISA control cards.

3) VESA slot

Brown, located below the 16-bit ISA expansion slot and used in conjunction with the ISA slot.

4) PCI slot

White, the same length as the VESA slot, parallel to the ISA slot, does not need to be used with the ISA slot, and can only be inserted into the PCI control card. Due to the limited space on the motherboard, the PCI slot takes up the position of the ISA slot

Keywords:Interface Reference address:Basic knowledge about interface technology

Previous article:Design of electronic blood pressure meter based on MSP430F149 microcontroller
Next article:Design of tension control system for coiler based on single chip microcomputer

Recommended ReadingLatest update time:2024-11-16 22:56

How to use 51 microcontroller to expand RAM and ROM at the same time
In the system below, 8051 expands the off-chip program memory and data memory at the same time. The chip select signals of the two memories are both grounded, that is, they are valid at the same time. In other words, there is no need to select the two memories. 51Expand RAM and ROM simultaneously Let’s analyze this
[Microcontroller]
How to send data packets in the RAM area of ​​the microcontroller network card
  This paper studies in depth the use of single-chip microcomputer to control the network card, access Ethernet, that is, IEEE802.3 protocol network, to achieve the networking of serial port instruments.   1 Hardware structure and circuit design   1.1 Overall Design   The whole system design uses ATMEL's 8-bit g
[Microcontroller]
How to send data packets in the RAM area of ​​the microcontroller network card
Intel's internal Cannon Lake-Y 10nm CPU sample exposed with 3 small chips
Recently, an Intel CPU sample based on the Cannon Lake architecture was exposed on the Internet. The interesting thing is that the sample has 3 small chips. This CPU uses a 10nm process. Although the current models on the market have never adopted such a change, Intel may adopt this hybrid chip design in future models
[Home Electronics]
Revenue fell 32.5% month-on-month, and the latest revenue rankings of global DRAM manufacturers’ own-brand memory are released
TrendForce research shows that the DRAM industry revenue in the fourth quarter of 2022 was US$12.28 billion, down 32.5% from the previous quarter. The decline even exceeded the 28.9% decline in the third quarter, and was close to the 36% single-quarter decline during the financial tsunami at the end of 2008. Mainly T
[Semiconductor design/manufacturing]
Revenue fell 32.5% month-on-month, and the latest revenue rankings of global DRAM manufacturers’ own-brand memory are released
SK Hynix: Industry's first 24GB DDR5 memory sample
In October 2020, SK Hynix, the second largest memory chip maker after Samsung, became the world's first company to release DDR5 DRAM chips.   The South Korean company continues its leadership in DDR5 DRAM technology, announcing today that it is trialing the world's first 24GB DDR5 RAM chip with its customers.   The
[Mobile phone portable]
SK Hynix: Industry's first 24GB DDR5 memory sample
The information and innovation industry welcomes a new blue ocean of trillions of yuan, and six companies including Huawei jointly build the foundation of the CPU industry
In recent years, after years of pilot projects and promotion, the information technology application innovation industry (hereinafter referred to as the "innovation industry") has achieved year-on-year iterations in chips and operating systems. In the context of major changes unseen in a century, accelerating the impl
[Mobile phone portable]
The information and innovation industry welcomes a new blue ocean of trillions of yuan, and six companies including Huawei jointly build the foundation of the CPU industry
Samsung considers applying MUF technology to server DRAM memory
According to news on March 4, according to TheElec, Samsung is considering applying molded-in-fill (MUF) technology in its next-generation DRAM. Samsung recently tested an MR MUF process for 3D stacked (3DS) memory. Compared with TC NCF, its throughput has improved, but the physical characteristics have deteriorated.
[Semiconductor design/manufacturing]
Apple iPhone SE 3 confirmed to have 4GB of RAM, previous model only has 3GB
Apple launched the third-generation iPhone SE this week, bringing upgrades including the A15 chip, 5G support, longer battery life, camera upgrades, and more durable glass. Although Apple officials did not publicize it, developers found that the new iPhone SE is also equipped with more RAM.   Developer Moritz Sterne
[Mobile phone portable]
Apple iPhone SE 3 confirmed to have 4GB of RAM, previous model only has 3GB
Latest Microcontroller Articles
  • Download from the Internet--ARM Getting Started Notes
    A brief introduction: From today on, the ARM notebook of the rookie is open, and it can be regarded as a place to store these notes. Why publish it? Maybe you are interested in it. In fact, the reason for these notes is ...
  • Learn ARM development(22)
    Turning off and on interrupts Interrupts are an efficient dialogue mechanism, but sometimes you don't want to interrupt the program while it is running. For example, when you are printing something, the program suddenly interrupts and another ...
  • Learn ARM development(21)
    First, declare the task pointer, because it will be used later. Task pointer volatile TASK_TCB* volatile g_pCurrentTask = NULL;volatile TASK_TCB* vol ...
  • Learn ARM development(20)
    With the previous Tick interrupt, the basic task switching conditions are ready. However, this "easterly" is also difficult to understand. Only through continuous practice can we understand it. ...
  • Learn ARM development(19)
    After many days of hard work, I finally got the interrupt working. But in order to allow RTOS to use timer interrupts, what kind of interrupts can be implemented in S3C44B0? There are two methods in S3C44B0. ...
  • Learn ARM development(14)
  • Learn ARM development(15)
  • Learn ARM development(16)
  • Learn ARM development(17)
Change More Related Popular Components

EEWorld
subscription
account

EEWorld
service
account

Automotive
development
circle

About Us Customer Service Contact Information Datasheet Sitemap LatestNews


Room 1530, 15th Floor, Building B, No.18 Zhongguancun Street, Haidian District, Beijing, Postal Code: 100190 China Telephone: 008610 8235 0740

Copyright © 2005-2024 EEWORLD.com.cn, Inc. All rights reserved 京ICP证060456号 京ICP备10001474号-1 电信业务审批[2006]字第258号函 京公网安备 11010802033920号