Memory-mapped I/O and Peripheral-mapped I/O in 8085 microprocessor

microprocessor

In the book it is given that:

"to identify the I/O devices these devices can be interfaced using address from memory space: MEMORY-MAPPED I/O. Another option is to have a separate numbering (addressing) scheme for I/O devices. The 8085 has separate 8-bit addressing scheme:
PERIPHERAL-MAPPED I/O."

When the 8085 microprocessor has fixed 64kB of memory which it uses for addressing the different memory locations then how it can share that memory with the I/O address (i.e., for any external peripheral) in memory mapped and how can it use "separate 8-bit addressing scheme" when it has fixed memory in it.

I am unable to understand this. If anyone knows this please explain this in detail or tell me where it is explained in detail.

Best Answer

The 8085 has different instructions for accessing main memory and I/O 'memory'. In addition to the standard memory interface pins the 8085 also provides a pin that identifies whether a memory access cycle is accessing main or I/O. This extra line is used in the select logic of both main and I/O 'memory'.

But there is no law that I/O can only be accessed by I/O instructions: in a small system the highest address line could be used to distinguish between memory (a15=0) and I/O (a15=1), so we get 32Kb for real memory (ROM and RAM) and 32 Kb for I/O.

Note that it is even possible to use the I/O addresses to access RAM, but that is less useful because there are only 256 I/O addresses and the addressing modes available for these addresses are very limited.