Memory-Mapped I/O vs Peripheral-Mapped I/O
Memory-Mapped I/O
Memory-mapped I/O is a technique where I/O devices share the same address space as memory.
Instructions like MOV, LDA, and STA can be used to communicate with I/O devices.
Characteristics:
- Address space: Shared with memory
- Instructions: Memory instructions (LDA, STA, MOV, etc.)
- Control Signals: MEMR (Memory Read), MEMW (Memory Write)
- Example: STA 8000H (sends data to I/O at address 8000H)
- Slower access due to address decoding
- Reduces usable memory space
Applications:
- Microprocessors where full instruction set is desired for I/O
- Systems with small I/O requirements
Peripheral-Mapped I/O (Isolated I/O)
Peripheral-mapped or Isolated I/O assigns a separate address space to I/O devices.
Special instructions like IN and OUT are used for data transfer.
Characteristics:
- Address space: Separate 8-bit I/O space (00H-FFH)
- Instructions: IN and OUT only
- Control Signals: IOR (I/O Read), IOW (I/O Write)
- Example: OUT 20H (sends data to output port 20H)
- Faster and simpler hardware
- Does not affect memory space
Memory-Mapped I/O vs Peripheral-Mapped I/O
Applications:
- Fast communication with external hardware (LEDs, switches)
- Systems with many I/O ports (up to 256 input and 256 output)
Comparison Table
| Feature | Memory-Mapped I/O | Peripheral-Mapped I/O |
|---------------------|-----------------------|--------------------------|
| Address Space | Shared with memory | Separate 8-bit space |
| Instructions Used | LDA, STA, MOV, etc. | IN, OUT only |
| Speed | Slower | Faster |
| Control Signals | MEMR, MEMW | IOR, IOW |
| Register Usage | All registers | Only Accumulator (A) |
| Port Limit (8085) | Based on address lines| 256 ports (8-bit addr) |