1. Job characteristics

The basic internal components and external connection methods of the input/output interface circuit can be represented by the block diagram shown in the following figure. As shown in the figure, the control information of the host to external devices is regarded as output data, and the status and data information provided by external devices to the host for reading are input data. If corresponding registers are set up for data information, control information, and status information in the interface, and different port addresses are assigned, these information will be transmitted to their respective registers by the host or peripheral device using the data bus according to the requirements of I/O control information, and then read and operated by the other party.

It should be noted that “interface” and “port” are two different concepts. A port refers to a register in an interface circuit that can be directly accessed by the CPU. Several ports, along with corresponding control logic circuits, form an interface. The registers that store data information in the interface are called data ports, the registers that store control commands are called control ports, and the registers that store status information are called status ports. The CPU can read information from relevant ports by inputting instructions, and write information to relevant ports by outputting instructions.

  1. The function of the interface

Based on the control instructions of the introduced computer system, the tasks and characteristics that various input and output devices need to complete, and the basic composition of the interface shown in Figure 7.1, it can be seen that the interface roughly has the following functions:

(1) Equipment identification and selection

Each peripheral device sets its own general and specific identification during production, and the host also assigns I/O addresses to the interface circuit. The host can use this function to identify and select devices for information exchange from multiple peripherals.

(2) Data buffering and control (transmission protocol)

The data processing speed of external devices often differs greatly from that of the host, and even if the speed is the same, it is difficult for the two to run synchronously because they do not share the same clock signal. Usually, one to several data buffer registers and controllers are set up in the interface circuit to enable effective transmission and reception of various data information between the two.

(3) Control command and status information transmission

When the CPU needs to start a peripheral device, it first sends a start command to the external device through the command register in the interface. When the peripheral device is ready, a “ready” status information is sent back to the status register in the interface for the CPU to read. Afterwards, the exchange of data information between the host and peripherals can begin.

(4) Data Conversion and Transmission

类似文章