MPU communicates with external input/output devices such as keyboards, printers, and converters by identifying them using specific addressing methods. Before any data transfer, the MPU must select the device using an address and appropriate control signals.
There are two main methods of I/O addressing.
- I/O-Mapped I/O (8-bit addressing)
- Memory-Mapped I/O (16-bit addressing)
These methods are described briefly in the following sections:
1. I/O-Mapped I/O (8-bit addressing)
- Uses 8-bit address lines → 256 devices (00H–FFH)
- I/O space is separate from memory
- Uses I/O Read (IOR) and I/O Write (IOW) signals
- Devices are accessed using I/O instructions
2. Memory-Mapped I/O (16-bit addressing)
- Uses 16-bit address lines → shares memory space
- I/O devices act like memory locations
- Uses Memory Read (MEMR) and Memory Write (MEMW)
- Accessed using memory instructions
Basic Steps:
- MPU places address on address bus
- Sends control signal (Read/Write)
- Data transferred via data bus
Comparison of 8-bit and 16-bit Address I/O Mapping
| Features | 8-bit I/O Mapping | 16-bit I/O Mapping |
| Number of Address Lines | 8 | 16 |
| Total I/O Devices | 256 | 65536 |
| Address Range | 00H to FFH | 0000H to FFFFH |
| Control Signals | I/O Read and I/O Write | I/O Read and I/O Write |
| Interfacing Devices Required | Yes | No |
| Memory and I/O Sharing | No | Yes |
Advantages
- Efficient data transfer: MPU communication can provide fast and efficient transfer of data between multiple devices in a computer system.
- Scalability: MPU communication allows for easy scalability, as additional devices can be added to the system without affecting the performance of the existing devices.
- Distributed processing: MPU communication allows for distributed processing, where different processors can work on different parts of a task simultaneously.
- Reduced data loss: MPU communication can help to reduce the loss of data during transmission, as error-checking and correction mechanisms can be implemented.
Disadvantages
- Complexity: MPU communication can be complex to implement, as it requires the use of specialized hardware and software.
- Latency: MPU communication can introduce latency or delay in data transmission, which can affect the overall performance of the system.
- Compatibility: Different devices may use different communication protocols or standards, which can create compatibility issues when trying to communicate between them.
- Security concerns: MPU communication can potentially pose security risks if data is intercepted or accessed by unauthorized parties.