Microprocessor and Memory Basics

Memory mapped input/output

We want to create input and output ports that each appear to the microprocessor just like a location in memory (enabling the microprocessor to interact with the outside world).

This would enable us to arrange that every byte read from the input port was a character read from the keyboard, and every byte written appeared as a character on the monitor screen.

The diagram shows an input port and an output port both mapped to memory location 00000000H. Reading from location 00000000H reads from the input port. Writing to 00000000H writes to the output port.

If the microprocessor writes a number to location 00000000H and then reads location 00000000H back it will not necessarily get the same number!

Suitable hardware for memory mapped I/O

Suitable hardware for memory mapped I/O