This article describes the difference between Memory-mapped I/O and I/O-mapped I/O. The microprocessor is connected with external devices such as the I/O devices, memory, and other peripherals via a link called the Interface. An interface is the communication link between the CPU and the external peripheral devices.
I/O interfacing is defined as the interfacing existing between the processing unit or CPU and I/0 devices such as – keyboard, mouse, printer, etc. Based on the kind of interfacing link between CPU and I/O devices, it can be subdivided into the following two categories –
- Memory-Mapped I/O Interfacing
- Standard I/O Mapped I/O Interfacing
In this article, we will be highlighting the significant differences between Memory-Mapped I/O Interfacing and Standard I/O Mapped I/O Interfacing. But before that let’s look into their basic introductions.
What is Memory-Mapped I/O Interfacing?
Memory-Mapped I/O devices are treated as memory locations and not any separate I/O peripherals. In the case of memory-mapped I/O peripherals no separate memory is allocated for I/O devices, i.e., they share the same memory. A 16-bit address is assigned for the I/O devices in the memory.
Moreover, I/O devices and memory share the same bus to transfer data to and from the processor. As a result, this minimizes the addressing and memory capacity. The memory-mapped I/O interfacing is used in applications having small memory requirements.
In this scenario, the I/O ports are considered memory locations used for performing the writing and reading operations. The same set of instructions is used for the transfer of data to and from the I/O or the memory. A control signal is activated whenever an address is sent over the address line. In a memory-mapped I/O peripheral, the data from the I/O device is sent to the ALU (arithmetic and logical unit).
The assemble language instructions namely LOAD and STORE are utilized to execute the read and write operations from both the I/O peripherals and the memory.
What is I/O Mapped I/O Interfacing?
I/O Mapped I/O devices are also called isolated I/O mapping as the I/O devices are allotted separate addressing space from the memory. These distinct spaces specially allotted for the I/O peripherals are called as ‘Ports’. Therefore, separate instructions for reading and writing are present for both I/O and memory.
The I/O devices in this case have been assigned distinct read and write control lines. The data transfer in the case of I/O mapped I/O devices occurs such that when a piece of data or information has to be transmitted from the I/O to the processes it is firstly placed on the common address bus, followed by the activation of the I/O read and I/O write control lines in order to enable this data transfer.
This kind of system is applicable in scenarios where the memory requirements are large. In contrast to the memory-mapped I/O system, the I/O mapped I/O system operates vis the I/O read and I/O write cycles. However, it interfaces comparatively lesser ports i.e. approximately 256. Moreover, the arithmetic and logic unit (ALU) operations cannot be performed using the information accessed from the I/O devices of the I/O mapped I/O system approach.
Difference Between Memory-mapped I/O and I/O-mapped I/O

The key differences between Memory-mapped I/O and I/O-mapped I/O approaches are listed in the table given below.
Parameter | Memory-mapped I/O | I/O-mapped I/O |
Functionality | I/O peripherals share the same instructions and address space. | I/O peripherals are allotted separate or isolated, special address spaces called ports. |
Width of Assigned address space | The size of the address space is about 16 bits. | The size of the address space is about 8 bits. |
Instruction types | The type of instructions involved in memory writing and memory reading. | The type of instructions involved in I/O writing and I/O reading. |
Instructions for data transfer | Both memory and I/O devices share the same type of instructions for the transfer of data. | Memory and I/O devices have separate and distinct types of instructions for the transfer of data. |
Ports for I/O interfacing | The interfacing size for memory-mapped I/O devices is quite large i.e., 64K bytes. | The interfacing size for I/O-mapped I/O devices is comparatively less i.e., 256 bytes. |
Control signals | No distinct control signals are involved in the transfer of data. | Special and distinct control signals are involved in the transfer of data, namely – I/O read, and I/O write control signals. |
Efficacy | The efficiency of memory-mapped I/O systems is relatively low. | The efficiency of I/O-mapped I/O systems is relatively high. |
Hardware for decoder | Comparatively more hardware is needed to design a decoder. | Comparatively lesser hardware is needed to design a decoder. |
Status of pin IO/M | The value of the IO/M pin of the system is set to 0 (i.e., low) when the memory read and memory write cycles are executed. | The value of the IO/M pin of the system is set to 1 (i.e., high) when the I/O read and I/O write cycles are executed. |
Movement of data | Data is transmitted between ports and registers in the case of a memory-mapped I/O approach. | Data is transmitted between ports and accumulators in the case of the I/O-mapped I/O approach. |
System complexity | The system is relatively simple due to the absence of separate control signals and requires a lesser number of pins. | The system is relatively complex due to the presence of separate control signals and requires a greater number of pins. |
Speed | The speed of operation is relatively low. | The speed of operation is relatively high. |
Application | The memory-mapped I/O approach is used in the case of smaller systems requiring less memory space. | The I/O mapped I/O approach is used in the case of larger systems requiring greater memory space. |
Conclusion
In conclusion, this article highlights the important differences between a memory-mapped I/O and I/O mapped I/O system. The major difference between them is that memory-mapped I/O devices share a common address space and instructions for both I/O devices and memory. While I/O mapped I/O systems have isolated and special address spaces designated for I/O devices.