بسم الله الرحمن الرحيم MEMORY AND I/O.

Slides:



Advertisements
Similar presentations
Computer Architecture
Advertisements

I/O Organization popo.
Accessing I/O Devices Processor Memory BUS I/O Device 1 I/O Device 2.
Parul Polytechnic Institute
Chapter 10 Input/Output Organization. Connections between a CPU and an I/O device Types of bus (Figure 10.1) –Address bus –Data bus –Control bus.
1/1/ / faculty of Electrical Engineering eindhoven university of technology Architectures of Digital Information Systems Part 1: Interrupts and DMA dr.ir.
8086.  The 8086 is Intel’s first 16-bit microprocessor  The 8086 can run at different clock speeds  Standard 8086 – 5 MHz  –10 MHz 
I/O Unit.
CS-334: Computer Architecture
FIU Chapter 7: Input/Output Jerome Crooks Panyawat Chiamprasert
Avishai Wool lecture Introduction to Systems Programming Lecture 8 Input-Output.
Interrupts (contd..) Multiple I/O devices may be connected to the processor and the memory via a bus. Some or all of these devices may be capable of generating.
COMP3221: Microprocessors and Embedded Systems Lecture 15: Interrupts I Lecturer: Hui Wu Session 1, 2005.
6-1 I/O Methods I/O – Transfer of data between memory of the system and the I/O device Most devices operate asynchronously from the CPU Most methods involve.
Chapter 7 Interupts DMA Channels Context Switching.
Basic Input/Output Operations
Midterm Tuesday October 23 Covers Chapters 3 through 6 - Buses, Clocks, Timing, Edge Triggering, Level Triggering - Cache Memory Systems - Internal Memory.
1 Interrupts INPUT/OUTPUT ORGANIZATION: Interrupts CS 147 JOKO SUTOMO.
1 COSC 3P92 Cosc 3P92 Week 11 Lecture slides Violence is the last refuge of the incompetent. Isaac Asimov, Salvor Hardin in "Foundation"
1 Computer System Overview Chapter 1 Review of basic hardware concepts.
Input/Output. Input/Output Problems Wide variety of peripherals —Delivering different amounts of data —At different speeds —In different formats All slower.
The computer system’s I/O architecture is its interface to the outside world. This architecture provides a systematic means of controlling interaction.
Chapter 7 Input/Output Luisa Botero Santiago Del Portillo Ivan Vega.
Chapter 8 Input/Output. Busses l Group of electrical conductors suitable for carrying computer signals from one location to another l Each conductor in.
Interrupts. What Are Interrupts? Interrupts alter a program’s flow of control  Behavior is similar to a procedure call »Some significant differences.
Chapter 10: Input / Output Devices Dr Mohamed Menacer Taibah University
1 Computer System Overview Chapter 1. 2 n An Operating System makes the computing power available to users by controlling the hardware n Let us review.
Input and Output Computer Organization and Assembly Language: Module 9.
MICROPROCESSOR INPUT/OUTPUT
1. Introduction 2. Methods for I/O Operations 3. Buses 4. Liquid Crystal Displays 5. Other Types of Displays 6. Graphics Adapters 7. Optical Discs 10/01/20151Input/Output.
© Janice Regan, CMPT 300, May CMPT 300 Introduction to Operating Systems Principles of I/0 hardware.
CHAPTER 3 TOP LEVEL VIEW OF COMPUTER FUNCTION AND INTERCONNECTION
I/O Example: Disk Drives To access data: — seek: position head over the proper track (8 to 20 ms. avg.) — rotational latency: wait for desired sector (.5.
Computer Architecture Lecture10: Input/output devices Piotr Bilski.
(More) Interfacing concepts. Introduction Overview of I/O operations Programmed I/O – Standard I/O – Memory Mapped I/O Device synchronization Readings:
I/O management is a major component of operating system design and operation Important aspect of computer operation I/O devices vary greatly Various methods.
2009 Sep 10SYSC Dept. Systems and Computer Engineering, Carleton University F09. SYSC2001-Ch7.ppt 1 Chapter 7 Input/Output 7.1 External Devices 7.2.
I/O Interfacing A lot of handshaking is required between the CPU and most I/O devices. All I/O devices operate asynchronously with respect to the CPU.
Dr Mohamed Menacer College of Computer Science and Engineering Taibah University CE-321: Computer.
COMPUTER ORGANIZATIONS CSNB123 NSMS2013 Ver.1Systems and Networking1.
Accessing I/O Devices Processor Memory BUS I/O Device 1 I/O Device 2.
13-Nov-15 (1) CSC Computer Organization Lecture 7: Input/Output Organization.
L/O/G/O Input Output Chapter 4 CS.216 Computer Architecture and Organization.
Computer Hardware A computer is made of internal components Central Processor Unit Internal External and external components.
The computer system’s I/O architecture is its interface to the outside world. This architecture provides a systematic means of controlling interaction.
Input/Output Problems Wide variety of peripherals —Delivering different amounts of data —At different speeds —In different formats All slower than CPU.
IT3002 Computer Architecture
I/O Interface. INTRO TO I/O INTERFACE I/O instructions (IN, INS, OUT, and OUTS) are explained. Also isolated (direct or I/O mapped I/O) and memory-mapped.
Processor Memory Processor-memory bus I/O Device Bus Adapter I/O Device I/O Device Bus Adapter I/O Device I/O Device Expansion bus I/O Bus.
Input Output Techniques Programmed Interrupt driven Direct Memory Access (DMA)
I/O Organization Competency – C6. Important facts to remember when I/O devices are to be connected to CPU There is a vast variety of I/O devices. Some.
9/20/6Lecture 3 - Instruction Set - Al1 Exception Handling.
1 Device Controller I/O units typically consist of A mechanical component: the device itself An electronic component: the device controller or adapter.
Interrupts and Exception Handling. Execution We are quite aware of the Fetch, Execute process of the control unit of the CPU –Fetch and instruction as.
1 بسم الله الرحمن الرحيم MEMORY AND I/O. Introduction to 8086 Microprocessor 8086 Pin Configuration Pin Configuration 8086 Architecture & Modes 2.
Architectures of Digital Information Systems Part 1: Interrupts and DMA dr.ir. A.C. Verschueren Eindhoven University of Technology Section of Digital.
COURSE OUTCOMES OF Microprocessor and programming
MICROPROCESSOR BASED SYSTEM DESIGN
Computer Architecture
Interrupts In 8085 and 8086.
Introduction of microprocessor
Md. Mojahidul Islam Lecturer Dept. of Computer Science & Engineering
Md. Mojahidul Islam Lecturer Dept. of Computer Science & Engineering
Chapter 13: I/O Systems.
Presentation transcript:

بسم الله الرحمن الرحيم MEMORY AND I/O

Video Tutorials 8086 Pin Configuration 8086 Architecture & Modes I/O Ports 8255 Parallel Interfacing

Agenda Microprocessor Input/ Output Programmed Input/ Output Interrupt Input/ Output Direct Memory Access

Input/ Output These I/O devices are commonly called “peripherals” and include keyboards, CRT displays, printers, and disks The characteristics of the I/O devices are normally different from those of the microcomputer

Input/ Output The speed of operation of the peripherals is usually slower than that of the microcomputer, and the word length of the microcomputer may be different from the data format of the peripheral devices

Input/ Output To make the characteristics of the I/O devices compatible with those of the microcomputer, interface hardware circuitry between the microcomputer and I/O devices is necessary

Input/ Output In a typical microcomputer system, the user gets involved with two types of I/O devices: Physical I/O and Virtual I/O When the computer has no operating system, the user must work directly with physical I/O devices and perform detailed I/O design

Input/ Output In a microcomputer with an operating system, the user works with virtual I/O devices The user does not have to be familiar with the characteristics of the physical I/O devices. (by calling the I/O routines provided by the operating system)

Input/ Output For example, a user program may write its output to a virtual printer. In reality, a virtual printer may refer to a block of disk space The operating system may assign one of the available physical printers to this virtual printer and monitor the entire operation

Input/ Output This concept is known as “spooling” and improves the system throughput by isolating the fast processor from direct contact with a slow printing device

Input/ Output There are three ways of transferring data between the microcomputer and physical I/O device: Programmed I/O Interrupt I/O Direct memory access (DMA)

Input/ Output The microcomputer executes a program to communicate with an external device via a register called the “I/O port” for programmed I/O An external device requests the microcomputer to transfer data by activating a signal on the microcomputer’s interrupt line during interrupt I/O

Input/ Output In response, the microcomputer executes a program called the interrupt-service routine to carry out the function desired by the external device Data transfer between the microcomputer’s memory and an external device occurs without microprocessor involvement with direct memory access

Programmed I/O I/O ports are usually of two types: For one type, each bit in the port can be individually configured as either input or output For the other type, all bits in the port can be set up as all parallel input or output bits Each port can be configured as an input or output port by another register

Programmed I/O .

Programmed I/O The microcomputer can then send output to external devices, such as LEDs, connected to bits 2, 4, and 5 The microcomputer can input the status of external devices, such as switches, through bits 0, 1, 3, 6, and 7

Programmed I/O For parallel I/O, there is only one data-direction register, usually known as the “command register” for all ports A particular bit in the command register configures all bits in the port as either inputs or outputs

Programmed I/O .

I/O Port Addressing Data transfer occurs via I/O ports through exchanging of control signals between the microcomputer and an external device I/O ports are addressed using either standard I/O, or memory-mapped I/O techniques The “standard I/O” (also called “isolated I/O”) uses an output pin such as M/IO’ pin

Programmed I/O Execution of IN or OUT instruction makes the M / IO’ LOW, whereas memory-oriented instructions, such as MOVE, drive the M/IO’ to HIGH For typical processors, an 8-bit address is commonly used for each I/O port In addition, some processors can also use 16-bit I/O ports

Programmed I/O With “memory-mapped I/O”, the processor, on the other hand, does not differentiate between I/O and memory (does not use the M/IO’ control pin) The processor uses a portion of the memory addresses to represent I/O ports

Programmed I/O Motorola microprocessors do not have the control pin such as M/IO’ pin and use only memory-mapped I/O, while Intel microprocessors can use both types When standard I/O is used, typical processors normally use 2-byte IN or OUT instruction as follows:

Programmed I/O .

Programmed I/O With memory-mapped I/O, the processor normally uses MOVE instructions

Programmed I/O There are typically two ways via which programmed I/O can be utilized These are: Unconditional I/O Conditional I/O

Programmed I/O The processor can send data to an external device at any time using unconditional I/O The external device must always be ready for data transfer In conditional I/O, the processor outputs data to an external device via handshaking

Programmed I/O .

Programmed I/O Example .

Programmed I/O Example .

Programmed I/O A disadvantage of conditional programmed I/O is that the microcomputer needs to check the status bit by waiting in a loop For a slow I/O device, this waiting may slow down the microcomputer’s ability to process other data

Interrupt I/O The interrupt I/O technique is efficient in this type of situation Interrupt I/O is a device-initiated I/O transfer The external device is connected to a pin called the interrupt (INT) pin on the microprocessor chip

Interrupt I/O The microcomputer usually completes the current instruction and saves the contents of the current program counter and the status register in the stack

Interrupt I/O The microcomputer then loads an address automatically into the program counter to branch to a subroutine-like program called the interrupt service routine The external device wants the microcomputer to execute this program to transfer data

Interrupt I/O Example .

Interrupt Types There are typically three types of interrupts External interrupts, Traps, or internal interrupts, and Software interrupts External interrupts are initiated through a microprocessor’s interrupt pins by external devices such as A/D converters

External Interrupts Maskable interrupts, and Non-maskable interrupts Non-maskable interrupt cannot be enabled or disabled by instructions, whereas a microprocessor’s instruction set contains instructions to enable or disable maskable interrupt

External Interrupts Some microprocessors, such as the Pentium, are provided with a maskable handshake interrupt This interrupt is usually implemented by using two pins: INTR and INTA

Internal Interrupts [ Traps ] Are activated internally by exceptional conditions such as overflow, division by zero, or execution of an illegal op-code The user writes a service routine to take corrective measures and provide an indication to inform the user that an exceptional condition has occurred

Software Interrupts Software interrupt instructions are normally used to call the operating system These instructions are shorter than subroutine calls Software interrupt instructions allow the user to switch from user to supervisor mode

Interrupt Address Vector With some microprocessors, the manufacturers define the fixed starting address (the interrupt address vector) for each interrupt Other manufacturers use an indirect approach by defining fixed locations where the interrupt address vector is stored

Saving Registers When a microprocessor is interrupted, it normally saves the program counter (PC) and the status register (SR) onto the stack so that the microprocessor can return to the main program with the original values of PC and SR after executing the service routine

Interrupt Switching Mechanism .

Interrupt .

Interrupt Instructions .

Interrupt Priorities A microprocessor is typically provided with one or more interrupt pins on the chip A special mechanism is necessary to handle interrupts from several devices that share one of these interrupt lines Ways of servicing multiple interrupts: Polled techniques Daisy chain techniques

Polled Interrupts .

Polled Interrupts .

Daisy Chain Interrupts .

Daisy Chain Interrupts .

Direct Memory Access [ DMA ] Direct memory access (DMA) is a technique that transfers data between a microcomputer’s memory and an I/O device without involving the microprocessor DMA is widely used in transferring large blocks of data between a peripheral device such as a hard disk and the microcomputer’s memory

Direct Memory Access [ DMA ] The DMA technique uses a DMA controller chip for the data transfer operations The DMA controller chip implements various components, such as a counter containing the length of data to be transferred in hardware in order to speed up data transfer

DMA Controller Block Diagram .

DMA Controller Block Diagram .

Types of DMA There are three basic types of DMA: block transfer cycle stealing Interleaved DMA For Block Transfer DMA, the DMA controller chip takes over the bus from the microcomputer to transfer data between the microcomputer memory and the I/O device

Direct Memory Access [ DMA ] The microprocessor has no access to the bus until the transfer is completed During this time, the microprocessor can perform internal operations that do not need the bus This method is popular with microprocessors. Using this technique, blocks of data can be transferred

Types of DMA With Cycle Stealing, data transfer between the microcomputer memory and an I/O device occurs on a word-by-word basis Typically, the microprocessor clock is generated by ANDing an INHIBIT signal with the system clock

Types of DMA With Interleaved DMA, the DMA controller chip takes over the system bus when the microprocessor is not using it For example, the microprocessor does not use the bus while performing an ALU operation The DMA controller chip identifies these cycles and allows transfer of data between memory and the I/O device

I/O structure .