Microprocessor IO Interfacing Lecture Notes
Introduction to IO Interfacing
- Last topic in microprocessor philosophy: IO Interpretation.
- Two types of IO interfacing:
- Isolated IO (IO Mapped IO)
- Memory Mapped IO
Isolated IO (IO Mapped IO)
- Microprocessor directly connects to IO through an IO channel.
- Address Space:
- Memory address space differs from IO address space.
- Signals:
- Microprocessor uses signals to differentiate between memory and IO operations.
IO Read and IO Write signals are used.
- Memory/IO bar: Used to select either memory or IO device.
- When signal is zero, IO devices are selected.
- When signal is one, memory is selected.
Memory Mapped IO
- Involves using memory to interface with IO devices.
- Memory and IO devices are interconnected.
- No direct use of
IN and OUT instructions.
- Memory locations reserved for IO data exchange.
- Microprocessor uses memory read/write operations instead of direct IO operations.
Differences between Isolated IO and Memory Mapped IO
- Isolated IO: Direct connection, uses
IN and OUT instructions.
- Memory Mapped IO: Uses memory as a medium, no
IN and OUT instructions needed.
Instructions for IO Operations
IN Instruction
- Syntax:
IN accumulator, port
- Purpose: Reads data from IO port into the accumulator.
- Port address can be 8 or 16 bit.
OUT Instruction
- Syntax:
OUT port, accumulator
- Purpose: Writes data from accumulator to the IO port.
Even and Odd Addressing in IO
- Purpose: Allows handling of 16-bit data using 8-bit IO devices.
- Even Address: Used for lower byte.
- Odd Address: Used for higher byte.
Practical Examples
- Switch: Determines input as 0 or 1.
- LED: Controlled by writing 0 (OFF) or 1 (ON) to data line.
Programming Considerations
- Use of
8255 Programmable Peripheral Interface for connections.
- Port Addressing: Important for defining connections in programs.
- Address Decoder: Used to locate specific IO device or memory.
IO Interfacing Summary
- Two methods: Isolated and Memory Mapped.
- Important to understand signal usage and memory reservation for effective interfacing.
Please review these notes to ensure understanding of microprocessor IO interfacing concepts covered in the lecture.