• I/O devices are connected to CPU through controller
  • Function of device Controllers 

Functions of device controllers:

  • Interfacing with computer system (CPU/Memory)
  • Interfacing with I/O device
  • Receiving commands from computer
  • Decoding commands
  • Generating control signals to I/O device
  • Transferring data from computer to device
  • Transferring data from device to computer
  • Converting data from one format to another
  • Error Checking on data
  • Retrying command automatically on encountering error
  • Correcting error
  • Analyzing status of device
  • Interrupting CPU for data transfer/ status transfer
  • Providing device status to CPU when asked for 
  • Testing the device
  • Self test (Controller diagnostics)

Controllers -> Dumb Controllers and Smart Controllers

Dumb Controller

  • Performs only limited function like data transfer & Command decoding other functions by computer software. 

  • Based on pure hardware circuits

Smart Controller

  • Performs everything required to control I/O device. So, CPU/ S/w don’t have these tasks

  • Based on CPU

Device Controllers types

  • Controllers may support one/multiple devices
  • Also controller may support more than one type of device
Controllers No. of device Type of device

Printer Controller

1

Printer

CRT  Controller

1

CRT monitor

Floppy Controller

4

Floppy disk drives

Hard disk drive controller

2/more

Hard disk drives

Common floppy/ hard disk controller

Both floppy disk drives & hard disk drives

 

Controller Commands

Data Transfer Command

  • R/W commands to Floppy disk/ Hard disk controller involves transfer of data between Computer(CPU/Memory) & I/O device
  • Print Command to print controller involves transferring data from computer to printer

2. Positioning or Mechanism Control Commands

  • Seek command -> floppy disk/ hard disk controller involves moving r/w head to desired track
  • Skip command -> printer controller -> moves paper by desired no. of lines

3. Status Transfer Commands

  • Read Status Command transfers status information from floppy or hard disk controller to system
  • Sense device status command
  • Status of device is transferred to system, when given to device controller

4. Diagnostic Commands

  • Diagnostic command from system testing of device controller/ device by device controller

5. Mode Control Commands

  •   Many varieties & vary with device & controller 
Controllers

Can be controlled to be in

Floppy disk controller

Single / Double Density Mode

CRT Controller

25 lines x 80 char or 25 lines x 40 char mode

Printer Controller

Normal / Condensed / Enlarged Mode

Communication Controller

Asynchronous / Synchronous mode

  • Data transfer rate & Data Transfer mode can be selected by mode command