Presentation is loading. Please wait.

Presentation is loading. Please wait.

Input/Output. I/O Initiation & Control  Transfer of data between circuitry external to the microprocessor and the microprocessor itself.  Transfer of.

Similar presentations


Presentation on theme: "Input/Output. I/O Initiation & Control  Transfer of data between circuitry external to the microprocessor and the microprocessor itself.  Transfer of."— Presentation transcript:

1 Input/Output

2 I/O Initiation & Control  Transfer of data between circuitry external to the microprocessor and the microprocessor itself.  Transfer of information is initiated and controlled by: Program controlled I/O Interrupt-program controlled I/O Hardware controlled I/O  Interfacing some peripheral devices to an MPU includes the use of a combination of the methods.

3 Program Controlled I/O  The transfer of data is completely under the control of the microprocessor program an I/O operation takes place only when an I/O transfer instruction is encountered in the execution of the program Necessary to determine the “readiness” of the device before the data transfer occurs  Testing one or more external flags or status bits associated with the I/O devices which requires a transfer of status information to the microprocessor – an additional I/O op.

4 Interrupt-program Controlled I/O  An external device indicates directly to the microprocessor its readiness to transfer data  interrupt input  Most microprocessor interrupt inputs can be disabled under program control  other interrupts which occur between during the disable period are ignored.

5 Interrupt-program Controlled I/O  When a microprocessor is interrupted: The program being executed is suspended Control is transferred to an interrupt service subroutine  The subroutine performs the data transfer.  Once the subroutine is done, it returns control to the program at the point it was interrupted, and the processing continues.  Hence, the transfer is initiated by external hardware and then controlled by an interrupt service subroutine.

6 Hardware Controlled I/O  Commonly referred to as Direct Memory Access (DMA)  Direct transfers between an I/O device and memory  Data is NOT routed from an I/O device to one of the microprocessor’s registers and then to memory, or vice versa.

7 DMA  The MPU still sets up the transfer in the sense that it sends initialization information to the DMA device (the starting address in main memory and the number of words to be transferred).  Then, hardware associated with the DMA device initiates and controls the actual data transfer.  Primarily used to transfer a large chunk of words or a block of data at high speed.

8 I/O Address Space  Isolated I/O or Standard I/O I/O ports are assigned to a separate address space  Memory mapped I/O I/O ports are assigned to the same address space as memory

9 Isolated I/O  Only the IN and OUT instructions provide data transfer for isolated I/O.  They are 2-byte instructions The second byte specify port address It means only 256 addressable  IN and OUT produces /RD and /WR respectively Port number can be assigned the same for separate input and output devices.

10 Memory-mapped I/O  Any instruction which references memory can also transfer data between an I/O device and the microprocessor As long as the I/O port is assigned to the memory address space rather than to the I/O address space  The register associated with the I/O port is simply treated as a memory location.


Download ppt "Input/Output. I/O Initiation & Control  Transfer of data between circuitry external to the microprocessor and the microprocessor itself.  Transfer of."

Similar presentations


Ads by Google