Podcast
Questions and Answers
What is the advantage of using I/O instructions over memory read/write instructions?
What is the advantage of using I/O instructions over memory read/write instructions?
What is the width of I/O port numbers in the 8086 MPU?
What is the width of I/O port numbers in the 8086 MPU?
How many clock cycles are needed to transfer a word to an I/O port?
How many clock cycles are needed to transfer a word to an I/O port?
What is the range of port numbers that can be used in Direct I/O?
What is the range of port numbers that can be used in Direct I/O?
Signup and view all the answers
What is the purpose of the IO/M signal in the 8086 MPU?
What is the purpose of the IO/M signal in the 8086 MPU?
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?
What is the maximum number of byte-sized I/O ports that can be addressed in the 8086 MPU?
Signup and view all the answers
What is the purpose of the instruction IN AL, 0FEH?
What is the purpose of the instruction IN AL, 0FEH?
Signup and view all the answers
What type of I/O is used in the instruction MOV DX, 0A00H; IN AL, DX?
What type of I/O is used in the instruction MOV DX, 0A00H; IN AL, DX?
Signup and view all the answers
What is the length of a normal bus cycle when the CPU is operating at 8 MHz?
What is the length of a normal bus cycle when the CPU is operating at 8 MHz?
Signup and view all the answers
What is the purpose of the wait state in a bus cycle?
What is the purpose of the wait state in a bus cycle?
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?
How many clock cycles does an external device have to produce the data and maintain it on the data bus?
Signup and view all the answers
What is the purpose of the idle state in a bus cycle?
What is the purpose of the idle state in a bus cycle?
Signup and view all the answers
What is the size of the I/O address space?
What is the size of the I/O address space?
Signup and view all the answers
How many bits can a port address have?
How many bits can a port address have?
Signup and view all the answers
What is the purpose of isolated I/O?
What is the purpose of isolated I/O?
Signup and view all the answers
What is memory-mapped I/O?
What is memory-mapped I/O?
Signup and view all the answers
What is the range of addresses assigned for I/O devices in memory-mapped I/O?
What is the range of addresses assigned for I/O devices in memory-mapped I/O?
Signup and view all the answers
How are I/O devices treated in memory-mapped I/O?
How are I/O devices treated in memory-mapped I/O?
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.
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.