Difference between Memory Mapped IO and IO Mapped IO with reference to 8085 microprocessor
Last Updated :
24 Sep, 2024
In the field of microprocessor architectures, Input/Output (I/O) operations are primitive for communicating with peripheral equipment. The 8085 microprocessor employs two primary methods for handling I/O operations: Memory Mapped I/O Versus I/O Mapped I/O. It is essential to become familiar with the distinctions existing between these two types of approaches for the purpose of designing efficient systems. This article focuses both techniques, characterizing them, illustrating their gains and losses, in addition to analyzing their implementation within the context of the 8085 microprocessor.
What is Memory Mapped I/O?
Memory Mapped I/O is a technique in which an I/O device is mapped as memory itself. In this approach, memory and I/O devices occupy the same space as far as the system is concerned. This implies that the CPU can transmits or receive data from I/O devices using the same format that is used to address normal memory.
Characteristics of Memory Mapped I/O
- Shared Address Space: I/O devices are carved out a particular memory space.
- Unified Instructions: They are identical for both memory and I/O operations.
- Simplified Addressing This means there is no need for special instructions and port for I/O operations as in integrated I/O.
Advantages of Memory Mapped I/O
- Faster Access: Because a memory has faster access times then an I/O operation can have improved access times as well.
- Flexible Addressing: Supports all the addressing modes of the CPU hence making it easier to write programs.
- Simplified Programming Model: Unlike other instruction types, where the Developer requires a special kind of instruction called I/O instruction, they are free to use what is called memory instruction.
Disadvantages of Memory Mapped I/O
- Limited Address Space: It was also pointed out that sharing the address space between memory and I/O can reduce the number of available memory addresses.
- Complexity in Address Decoding: needs extra software logic in order to distinguish between memory accesses and I/O operations.
- Potential for Address Conflicts: Possibility of the existence of similar addresses if not controlled properly.
What is I/O Mapped I/O?
I/O Mapped I/O known as Port Mapped I/O uses dedicated address space for the installation of I/O devices. This method employs specific port commands by which it addresses I/O ports hence enhancing the segregation between memory and ports.
Advantages of I/O Mapped I/O
- Separate Address Space: I/O devices are granted their own address space that is independent of the memory space of the computer.
- Dedicated Instructions: Contains specific I/O instructions known as `IN` and `OUT`.
- Distinct Port Addresses: I/O devices are connected to the computer and can only be addressed by specific port addresses.
Advantages of I/O Mapped I/O
- Expanded Address Space: Preserves memory address space full for the memory operations use, to avoid any conflict.
- Simplified Address Decoding: Hence, it lowers the ontological level seen in previous models and clears the memory –I/O barrier making the model less complex.
- Security and Stability: decreases the possibility of an authority or a code somehow getting the memory’s address and accessing it through I/O channels.
Disadvantages of I/O Mapped I/O
- Slower Access: I/O operations may be slower because of the use of special instruction.
- Limited Addressing Modes: Limited to the addressing modes of I/O instructions; thus the flexibility is somewhat hampered.
- Increased Instruction Set: Needs further instructions which adds to the intricate instruction set architecture.
Difference between Memory-Mapped I/O Interfacing and I/O Mapped I/O Interfacing :
Features | Memory Mapped IO | IO Mapped IO |
---|
Addressing | IO devices are accessed like any other memory location. | They cannot be accessed like any other memory location. |
---|
Address Size | They are assigned with 16-bit address values. | They are assigned with 8-bit address values. |
---|
Instructions Used | The instruction used are LDA and STA, etc. | The instruction used are IN and OUT. |
---|
Cycles | Cycles involved during operation are Memory Read, Memory Write. | Cycles involved during operation are IO read and IO writes in the case of IO Mapped IO. |
---|
Registers Communicating | Any register can communicate with the IO device in case of Memory Mapped IO. | Only Accumulator can communicate with IO devices in case of IO Mapped IO. |
---|
Space Involved | 216 IO ports are possible to be used for interfacing in case of Memory Mapped IO. | Only 256 I/O ports are available for interfacing in case of IO Mapped IO. |
---|
IO/M` signal | During writing or read cycles (IO/M` = 0 ) in case of Memory Mapped IO. | During writing or read cycles (IO/M` = 1) in case of IO Mapped IO. |
---|
Control Signal | No separate control signal required since we have unified memory space in the case of Memory Mapped IO. | Special control signals are used in the case of IO Mapped IO. |
---|
Arithmetic and Logical operations | Arithmetic and logical operations are performed directly on the data in the case of Memory Mapped IO. | Arithmetic and logical operations cannot be performed directly on the data in the case of IO Mapped IO. |
---|
Hardware requirements | Only one set of address and data buses are required for memory and I/O devices | Separate address and data buses are required for memory and I/O devices |
---|
Instruction set | Uses the same instructions for accessing both memory and I/O devices | Special instructions are used for accessing I/O devices |
---|
Address range | Limited number of memory locations available for use by the microprocessor | Dedicated address space available for I/O devices |
---|
Design complexity | Simple to implement and design | More complex to implement and design |
---|
Examples of processors | Intel 8085, Motorola 6800 | Intel 8255, Zilog Z80 |
---|
Conclusion
In the case of the 8085 microprocessor, the Memory Mapped I/O is also advantageous though it has its downside within the same context as the I/O Mapped I/O. Memory Mapped I/O is an improved method of controlling I/O that allows faster I/O operations and use of same model as for memory. But it results in address space constrains and will complicate the decoding of the address lines. In contrast, I/O Mapped I/O offers a totally separate and better secured space serving as I/O space and an expanded memory space for use; although the instructions under this mapping are slower with more complicated bits and pieces.