Comparison of memory-mapped I/O and I/O-mapped I/O

MicrocontrollerMicroprocessor80858086

In Memory Mapped Input Output −

  • We allocate a memory address to an Input-Output device.

  • Any instructions related to memory can be accessed by this Input-Output device.

  • The Input-Output device data are also given to the Arithmetic Logical Unit.

Input-Output Mapped Input Output −

  • We give an Input-Output address to an Input-Output device.

  • Only IN and OUT instructions are accessed by such devices.

  • The ALU operations are not directly applicable to such Input-Output data.

So as a summary we can mention that −

  • I/O is any general-purpose port used by processor/controller to handle peripherals connected to it.

  • I/O mapped I/Os have a separate address space from the memory. So, total addressed capacity is the number of I/Os connected and a memory connected. Separate I/O-related instructions are used to access I/Os. A separate signal is used for addressing an I/O device.

  • Memory-mapped I/Os share the memory space with external memory. So, total addressed capacity is memory connected only. This is underutilisation of resources if your processor supports I/O-mapped I/O. In this case, instructions used to access I/Os are the same as that used for memory.

  • Let's take an example of the 8085 processor. It has 16 address lines i.e. addressing capacity of 64 KB memory. It supports I/O-mapped I/Os. It can address up to 256 I/Os.

  • If we connect I/Os to it an I/O-mapped I/O then, it can address 256 I/Os + 64 KB memory. And special instructions IN and OUT are used to access the peripherals. Here we fully utilize the addressing capacity of the processor.

  • If the peripherals are connected in memory mapped fashion, then total devices it can address is only 64K. This is underutilisation of the resource. And only memory-accessing instructions like MVI, MOV, LOAD, SAVE are used to access the I/O devices.

raja
Published on 12-Mar-2019 16:51:23
Advertisements