8086 MPU I/O Interfacing
18 Questions
4 Views

Choose a study mode

Play Quiz
Study Flashcards
Spaced Repetition
Chat to lesson

Podcast

Play an AI-generated podcast conversation about this lesson

Questions and Answers

What is the advantage of using I/O instructions over memory read/write instructions?

  • They are slower
  • They are faster (correct)
  • They can only transfer between Accumulator and memory
  • They use more memory address space
  • What is the width of I/O port numbers in the 8086 MPU?

  • 64-bits
  • 8-bits
  • 32-bits
  • 16-bits (correct)
  • How many clock cycles are needed to transfer a word to an I/O port?

  • Two clock cycles (correct)
  • Eight clock cycles
  • One clock cycle
  • Four clock cycles
  • What is the range of port numbers that can be used in Direct I/O?

    <p>00H to FFH</p> Signup and view all the answers

    What is the purpose of the IO/M signal in the 8086 MPU?

    <p>To indicate that the processor is accessing I/O, not memory</p> Signup and view all the answers

    What is the maximum number of byte-sized I/O ports that can be addressed in the 8086 MPU?

    <p>65536</p> Signup and view all the answers

    What is the purpose of the instruction IN AL, 0FEH?

    <p>To transfer data from I/O port 0FEH to AL register</p> Signup and view all the answers

    What type of I/O is used in the instruction MOV DX, 0A00H; IN AL, DX?

    <p>Indirect I/O</p> Signup and view all the answers

    What is the length of a normal bus cycle when the CPU is operating at 8 MHz?

    <p>500 ns</p> Signup and view all the answers

    What is the purpose of the wait state in a bus cycle?

    <p>To wait for very slow devices</p> Signup and view all the answers

    How many clock cycles does an external device have to produce the data and maintain it on the data bus?

    <p>2 clock cycles</p> Signup and view all the answers

    What is the purpose of the idle state in a bus cycle?

    <p>No bus cycles are required</p> Signup and view all the answers

    What is the size of the I/O address space?

    <p>64Kbytes</p> Signup and view all the answers

    How many bits can a port address have?

    <p>8 bits or 16 bits</p> Signup and view all the answers

    What is the purpose of isolated I/O?

    <p>To use special I/O instructions for I/O</p> Signup and view all the answers

    What is memory-mapped I/O?

    <p>Using memory addresses for I/O</p> Signup and view all the answers

    What is the range of addresses assigned for I/O devices in memory-mapped I/O?

    <p>E0000H through E0FFFH</p> Signup and view all the answers

    How are I/O devices treated in memory-mapped I/O?

    <p>As if they are memory locations</p> Signup and view all the answers

    Study Notes

    I/O Interfacing

    • I/O data transfer in the 8088/8086 MPU can be byte-wide or word-wide.
    • I/O port numbers are 16-bits in length.
    • Output over AD0 … AD15, A16, A19 will hold Zero.
    • Data is transferred using AD0 … AD7; if a byte is transferred, one clock cycle is needed; if a word is transferred, two clock cycles are needed.
    • The processor sets IO/M to 0 to indicate that it is accessing I/O not memory.

    I/O Instructions

    • Two types of I/O instructions: Direct I/O and Variable I/O.
    • Direct I/O: The port number is provided in the instruction; port numbers are 8-bits only (00H to FFH); only 256 ports are available.
    • Variable I/O: Uses 16-bit port number that resides in DX; DX is not an offset, but the actual port number; 64KByte I/O address space is available; up to 65536 byte-sized ports.

    Examples

    • Example of Direct I/O: IN AL, 0FEH (data is transferred and takes one cycle).
    • Example of Variable I/O: MOV DX, 0A00H; IN AL, DX (address of I/O).

    Bus Cycle Timing

    • Each bus cycle is 4 clock cycles (4 T-States).
    • If the CPU is operating at 8 MHz, then each clock cycle is 125 ns long; length of a normal bus cycle is 4 x 125 ns = 500 ns.
    • External device connected to the microprocessor can expect the following timing requirements for a READ cycle:
      • CPU produces the address on the address bus and maintains it for 1 clock cycle.
      • External device has 1 clock cycle to decode and locate the location.
      • External device produces the data and maintains it on the data bus for 2 clock cycles.

    Bus Cycle States

    • Idle state: No bus cycles required; the bus remains idle.
    • Wait state: States inserted between T3 and T4 of the current bus cycle; used to wait for very slow devices.

    I/O Address Space

    • The I/O address space is 64Kbytes.
    • Ports can have an address of 8 bits or 16 bits.

    Memory-Mapped I/O

    • Place I/O devices within the memory address space of the processor.
    • Some of the memory space is dedicated to I/Os.
    • Reading from and writing to memory-mapped I/O devices uses the same exact instructions as reading from and writing to memory locations.

    Isolated vs. Memory-Mapped I/O

    • Isolated I/O: Special I/O instruction.
    • Memory-Mapped I/O: Memory Read/Write instruction.

    Studying That Suits You

    Use AI to generate personalized quizzes and flashcards to suit your learning preferences.

    Quiz Team

    Description

    Test your knowledge of I/O data transfer in the 8088/8086 Microprocessor Unit, including memory and I/O interfacing, data types, and more.

    Use Quizgecko on...
    Browser
    Browser