Coupon Accepted Successfully!


Memory Interfacing to Microprocessor

Multiplexing of lower order address and data bus
Schematic block diagram for memory and I/O interfacing with microprocessor
The advantages and disadvantages of I/O mapped I/O are given below.

I/O mapped I/O has the following advantages:
  • The total 256-address spaces are available for I/O devices.
  • Program writing will be easy as special instructions are used for I/O operations. In 8085 microprocessor, IN and OUT instructions are usually used for data transfer with I/O devices.
  • In I/O mapped I/O scheme, the I/O address length is usually one byte and instructions are two byte long. Therefore the program requires less memory and shorter execution time compared to memory mapped I/O.
  • The memory reference instructions can be easily distinguished from I/O reference instructions, which make program debugging easier.
I/O mapped I/O has the following disadvantages:
  • One microprocessor pin must be used to distinguish between memory and I/O operations. The additional control signals, IOR and IOW must be generated for read and write operations.
  • In data transfer with I/O devices and microprocessor, the data has to be transferred to the accumulator only to perform arithmetic or logical operations. Different addressing modes are not used in I/O mapped I/O.
Memory mapped I/O scheme
Memory mapped I/O has the following advantages:
  • The Memory mapped I/O scheme can provide more than 256 input-output ports, as the port Addresses are 16-bit.
  • All the memory related instructions can be used in read and write operations of memory mapped I/O devices. The arithmetic and logical operations can be performed on available I/O data directly.
  • CPU registers can exchange transfer of data with I/O devices directly without accumulator.
  • Therefore memory mapped I/O simplifies and increases speed of data transfer.
​​Memory mapped I/O has the following disadvantages:
  • Memory mapped I/O scheme utilizes memory reference instructions, which are three byte instructions and is longer than I/O instructions.
  • Due to wider port address, the interface of hardware is also complicated.
  • The complexity of the program is large.
Comparison between memory mapped I/O and I/O mapped I/O
Memory-Mapped I/O I/O Mapped I/O
16-bit address 8-bit address
MEMR memory read, MEMW memory write IOR I/O read, IOW I/O write
Memory related instructions are MOV M,R, MOV R,M, ADDM, ANA M, SUB M, STA, LDA, LDAX, STAX I/O related instruction are IN and OUT
Data transfer between any register and I/O Data transfer between accumulator and I/O
The memory map 64K is shared between I/Os and system memory The I/O map is independent of the memory map; 256 input devices and 256 output devices
13 T states (STA, LDA) The IN and OUT instructions are required
7 T states (MOV M,R) 10 T–states for execution
More hardware is needed to decode 16 bit address Less hardware is needed to decode 8-bit address.
Arithmetic or logical operations can be directly performed with I/O data Not available


Interfacing 8K byte RAM with microprocessor


Interfacing 4K byte RAM with microprocessor

Test Your Skills Now!
Take a Quiz now
Reviewer Name