IO interfacing Methods
There is two method of interfacing memory or I/O devices with the microprocessor are as follows:
- I/O mapped I/O
- Memory mapped I/O
I/O MAPPED I/O
- In this technique, I/O device treated as an I/O device and memory as memory. Each IO interfacing Methods device uses eight address lines.
- If eight address lines used to interface to generate the address of the I/O port, then 256 Input/output devices can interface with the microprocessor.
- The 8085 microprocessor has 16-bit address bus, so we can either use lower order address lines (A0 – A7) or higher order address lines(A8 – A15) to address I/O devices. We used lower order address bus & address available on A0 – A7 will be copied on the address lines A8 – A15.
- In I/O mapped I/O, the complete 64 Kbytes of memory can use to address memory locations separately as the address space not shared with I/O devices.
- In this interface type, the data transfer possible between accumulator (A) and I/O devices only. Arithmetic and logical operation are not possible directly.
- As 8-bit device address used, Address decoding simple so less hardware required.
- The separate control signals used to access I/O devices and memory such as IOR, IOW for I/O port and MEMR, MEMW for memory hence memory location protected from the I/O access.
MEMORY MAPPED I/O
- In this technique, I/O devices treated as memory and memory as memory, hence the address of the I/O devices as same as that of memory i.e. 16 bit for 8085 microprocessor.
- So, the address space of the memory i.e. 64 Kbytes will share by the I/O devices as well as by memory. All 16 address lines i.e. A0-A15 used to address memory locations as well as I/O devices.
- The control signals MEMR and MEMW used to access memory devices as well as I/O devices.