Share on facebook
Share on twitter
Share on linkedin
Share on whatsapp

Memory mapped I/O interfacing with 8085 microprocessor

In memory mapped I/O interfacing with 8085 microprocessor, the I/O devices are not given separate addresses other than treated as a memory location. It has address range between 0000h to FFFFh (64k). But some part of the space is reserved for I/O devices. Then question is why we use memory mapped I/O interfacing?

Why we use memory mapped I/O interfacing?

Best answer will be we can get some advantages on using it. The advantage is any instruction that related to memory handling can use in this mode. By using those instruction we can also transfer data between an I/O device and the microprocessor. For that, the I/O port should assigned to the memory address space rather than to the I/O address space. The register associated with the I/O port is simply treated as memory location register.

Explanation with Example 

Here we start discussion on this memory mapped I/O interfacing with 8085 microprocessor. let’s take an example in which address bit A15 designates for whether instructions reference is memory or an I/O device. If A15 bit carry 0, then processor will understand a memory register is addressed.  and if A15 bit carry 1, than processor will understand a memory mapped I/O device is addressed. For smooth processing, processor assign the first 32k bytes of memory address space to memory and second 32k to memory mapped I/O devices. In this scheme, IO/ M signal is not used to distinguish between memory and I/O devices. An I/O device is interfaced in the same manner as a memory device.

Instruction Set

In this scheme, all data transfer instructions of the microprocessor can be used for transferring data from and to either memory or I/O devices.Input and output transfer using memory mapped I/O are not limited to the accumulator. For example, some of 8085 A instructions that can be used for memory mapped I/O ports.

MOV r, m :- Move the connects of input port whose address is available in (H,L) reg pair to any internal register.

LDA addr :- Load the accumulator with the content of the input port whose address is available as a second and third byte of the instruction.

Other instructions include, ANA M ADD M, M provide input data transfer and computation in a single instruction. Some instruction that out the data from memory mapped ports.

  • MOV M,r
  • STA addr
  • MVI M, data
  • SHLD addr

LHLD and SHLD carry out 16- bit I/O transfers with single instruction. It reduces program executive time considerably. The price paid for this added capability is a reduction in directly addressable main memory. And the  other is necessity of decoding a 16- bit rather than an 8-bit address.

Process of memory mapped I/O interfacing

So time to discuss the process of memory mapped I/O interfacing with 8085 microprocessor. In this scheme microprocessor works in Memory mapped I/O interfacing with 8085 microprocessor. When a microprocessor puts out an address and generates a control strobe for a memory read, it has no way of determining whether the device that responds with data is a memory device or an I/O device.

It only requires that the devices that respond with in the allowable access time or uses the READY line to request a sufficient number of WAIT states. It supplies an address data and a write strobe and continues its operations, external logic determines whether memory, I/O or anything at all receives the data transferred.

Memory address decoding

Memory address decoding is nothing but to assign an address for each location in the memory chip. The data stored in the memory can accessed by specifying its address. Memory address can decoded in two ways.

  1. Absolute or Fully decoding and
  2. Linear Select or Partial decoding

There are many advantages in absolute address decoding.

  1. Each memory location has only one address, there is no duplication in the address
  2. Memory can placed contiguously in the address space of the microprocessor
  3. Future expansion can made easily without disturbing the existing circuitry

There are few disadvantages in this method

  1.  Extra decoders are necessary
  2.  Some delay will produced by these extra decoders.

The main advantage of linear select decoding is its simplified decoding circuit. This reduces the hardware design cost. But there are many disadvantages in this decoding.

  1.  Multiple addresses are provided for the same location
  2.  Complete memory space of the microprocessor inefficiently used
  3.  Adding or interfacing ICs with already existing circuitry is difficult.

Absolute Address Decoding

The 8085 microprocessor has 16 address lines. Therefore it can access 216 locations in the physical memory. If all these lines connected to a single memory device. Then it will decode these 16 address lines internally and produces 216 different addresses from 0000H to FFFFH. So that each location in the memory will have a unique address.

74LS138 address decoder used to generate the chip select signals for each memory block. In this decoder when the address lines A13, A14 and A15 are 000, the output line Y0 will be activated. This in turn selects the first memory block. Similarly when these lines are 001 (C=0, B=0 and A=1) then Y1 activated and the second memory block selected.

Memory mapped I/O interfacing with 8085 microprocessor In this type of memory interfacing, uses all the address lines (A0 to A15). Each location in the memory will have a single address. This type of address decoding generally called as absolute or fully decoded addressing.

According to the value of Ao and A1, any one register can selected and to select one memory chip we need one chip select signal CS signal as shown in the next diagram.

Memory mapped I/O interfacing with 8085 microprocessor

Let’s check how you learn memory mapped I/O interfacing with 8085 microprocessor with a simple quiz.

Data Transfer

Data Transfer in 8085 microprocessor.

You may read those too…..



Not Enough, Need More

E-Mail Subscription

Leave a Comment

Your email address will not be published. Required fields are marked *

E-Mail Subscription

Table of Contents


Hi myself Subham Dutta, having 15+ years experience in filed of Engineering. I love to teach and try to build foundation of students. Try to make them imagine what they learn.

Need more this type of content in your E-Mail?

Electronics Engineering Study Center