2 control register the control register can be

This preview shows page 16 - 19 out of 20 pages.

data-in register, and whether there has been a device error. 2 Control register The control register can be written by the host to start a command or to change the mode of a device. For instance, a certain bit in the control register of a serial port chooses between full-
Image of page 16
duplex and half-duplex communication, another enables parity checking, a third bit sets the word length to 7 or 8 bits, and other bits select one of the speeds supported by the serial port. 3 Data-in register The data-in register is read by the host to get input. 4 Data-out register The data out register is written by the host to send output. Polling Polling is a process by which a host waits for controller response.It is a looping process, reading the status register over and over until the busy bit of status register becomes clear. The controller uses/sets the busy bit when it is busy working on a command, and clears the busy bit when it is ready to accept the next command. The host signals its wish via the command-ready bit in the command register. The host sets the command-ready bit when a command is available for the controller to execute. In the following example, the host writes output through a port, coordinating with the controller by handshaking The host repeatedly reads the busy bit until that bit becomes clear. The host sets the write bit in the command register and writes a byte into the data-out register. The host sets the command-ready bit. When the controller notices that the command-ready bit is set, it sets the busy bit. The controller reads the command register and sees the write command. It reads the data-out register to get the byte, and does the I/O to the device. The controller clears the command-ready bit, clears the error bit in the status register to indicate that the device I/O succeeded, and clears the busy bit to indicate that it is finished. I/O devices I/O Devices can be categorized into following category. S.N. Category & Description 1 Human readable Human Readable devices are suitable for communicating with the computer user. Examples are printers, video display terminals, keyboard etc. 2 Machine readable Machine Readable devices are suitable for communicating with electronic equipment. Examples are disk and tape drives, sensors, controllers and actuators. 2 Communication Communication devices are suitable for communicating with remote devices. Examples are digital line drivers and modems. Following are the differences between I/O Devices S.N. Criteria & Description 1 Data rate There may be differences of several orders of magnitude between the data transfer rates. 2 Application Different devices have different use in the system. 3 Complexity of Control A disk is much more complex whereas printer requires simple control interface. 4 Unit of transfer Data may be transferred as a stream of bytes or characters or in larger blocks. 5 Data representation Different data encoding schemes are used for different devices. 6 Error Conditions The nature of errors differs widely from one device to another. Direct Memory Access (DMA)
Image of page 17
Image of page 18
Image of page 19

You've reached the end of your free preview.

Want to read all 20 pages?

  • Fall '19
  • Virtual memory, Central processing unit

  • Left Quote Icon

    Student Picture

  • Left Quote Icon

    Student Picture

  • Left Quote Icon

    Student Picture