Introduction :
In a microprocessor system, there are two methods of interfacing input/output (I/O) devices: memory-mapped I/O and I/O mapped I/O.
In memory-mapped I/O, input/output devices are mapped to the memory address space of the microprocessor. This means that the I/O devices are treated like memory locations and can be accessed using the same read and write instructions as memory. In other words, the same bus and control signals used for memory access are used for I/O access as well.
On the other hand, in I/O mapped I/O, input/output devices are mapped to a separate I/O address space that is different from the memory address space. The microprocessor uses special instructions to access the I/O devices using specific I/O address signals, which are separate from the memory address signals.
In the case of the 8085 microprocessor, it uses memory-mapped I/O for accessing input/output devices. The input/output devices are mapped to specific memory locations in the address space, and the microprocessor can access these devices using the same instructions it uses for memory access.
For example, if a device is connected to the memory address 0x8000, the microprocessor can read from or write to the device by using the same instructions it uses to access memory locations, such as:
- MOV A, M ; Load accumulator with data from memory location 0x8000
- MOV M, A ; Write the contents of the accumulator to memory location 0x8000
This method of I/O access is simpler and more efficient in terms of hardware design, as it does not require separate I/O address signals. However, it limits the number of memory locations available for use by the microprocessor.
The microprocessor cannot do anything by itself therefore, It needs to be linked with memory, extra peripherals, or IO devices. This linking is called Interfacing. The interfacing of the I/O devices in 8085 can be done in two ways : 1. Memory-Mapped I/O Interfacing : In this kind of interfacing, we assign a memory address that can be used in the same manner as we use a normal memory location. 2. I/O Mapped I/O Interfacing : A kind of interfacing in which we assign an 8-bit address value to the input/output devices which can be accessed using IN and OUT instruction is called I/O Mapped I/O Interfacing.
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 |