IO Controller Introduction

CPU cannot directly control mechanical parts of IO device, so an electronic part needed for IO device as an “intermediary” between CPU and mechanical parts to realize the control of the device by CPU.

This electronic component is IO controller, also known as IO controller. CPU can control the IO controller, which controls the mechanical parts of device.

Functions of IO Controller

  • Receive device and CPU commands:

CPU read/write commands and parameters are stored in the control register

  • Report the status of device to CPU: There is a corresponding status register in IO controller to record the current status of IO device.

(For example, 1 means the device is busy, 0 means the device is ready)

  • Data exchange: data register, which temporarily stores data sent by CPU and data sent by the device, and then sends the data to the control register or CPU.
  • Address identification: Similar to the memory address, in order to distinguish each register in the controller, it is necessary to set a specific address for each register. The IO controller uses the address provided by CPU to determine which register CPU wants to read and write.

Composition of IO Controller

The interface between CPU and controller (implementing the communication between controller and CPU)

IO logic (responsible for identifying the commands issued by CPU and issuing commands to the device),

The interface between controller and the device (implementing controller and the device) communication between devices)

Two register addressing methods

*Memory mapping IO: **The registers in controller are unified with the memory, and the instructions for operating the memory can be used to operate the controller.

*Register independent programming: The registers in the controller are programmed independently. Special instructions need to be set up to operate the controller.