Dr A Sahu Dept of Computer Science & Engineering IIT Guwahati.

Slides:



Advertisements
Similar presentations
I/O Organization popo.
Advertisements

INPUT-OUTPUT ORGANIZATION
Parul Polytechnic Institute
DMA Controller (8237 Programming Examples)
Dr A Sahu Dept of Comp Sc & Engg. IIT Guwahati I/O + Timer 8155 I/O + Timer 8255 I/O 8255 I/O 8253/54 Timer 8253/54 Timer 2 Port (A,B), No Bidirectional.
Dr A Sahu Dept of Computer Science & Engineering IIT Guwahati.
Dr A Sahu Dept of Computer Science & Engineering IIT Guwahati.
Dr A Sahu Dept of Computer Science & Engineering IIT Guwahati.
TK2633 Introduction to Parallel Data Interfacing DR MASRI AYOB.
Microprocessor and Microcontroller
CS-334: Computer Architecture
Hierarchy of I/O Control Devices
1 TK2633TK Microprocessor Architecture DR MASRI AYOB.
Midterm Tuesday October 23 Covers Chapters 3 through 6 - Buses, Clocks, Timing, Edge Triggering, Level Triggering - Cache Memory Systems - Internal Memory.
GURSHARAN SINGH TATLA PIN DIAGRAM OF 8085 GURSHARAN SINGH TATLA
EC238 MICROPROCESSORS AND APPLICATIONS
Unit-5 CO-MPI autonomous
INPUT-OUTPUT ORGANIZATION
DEEPAK.P MICROPROCESSORS AND APPLICATIONS Mr. DEEPAK P. Associate Professor ECE Department SNGCE 1.
Input/Output. Input/Output Problems Wide variety of peripherals —Delivering different amounts of data —At different speeds —In different formats All slower.
created by :Gaurav Shrivastava
Dr. Rabie A. Ramadan Al-Azhar University Lecture 6
MICROPROCESSOR INPUT/OUTPUT
Computer Architecture Lecture 8 by Engineer A. Lecturer Aymen Hasan AlAwady 30/12/2013 University of Kufa - Informatics Center for Research and Rehabilitation.
1 Input-Output Organization Computer Organization Computer Architectures Lab Peripheral Devices Input-Output Interface Asynchronous Data Transfer Modes.
2007 Oct 18SYSC2001* - Dept. Systems and Computer Engineering, Carleton University Fall SYSC2001-Ch7.ppt 1 Chapter 7 Input/Output 7.1 External Devices.
Computer Architecture Lecture10: Input/output devices Piotr Bilski.
Computer Architecture Lecture 9 by Engineer A. Lecturer Aymen Hasan AlAwady 10/2/2014 University of Kufa - Information Technology Research and Development.
(More) Interfacing concepts. Introduction Overview of I/O operations Programmed I/O – Standard I/O – Memory Mapped I/O Device synchronization Readings:
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.
Dr Mohamed Menacer College of Computer Science and Engineering Taibah University CE-321: Computer.
 8251A is a USART (Universal Synchronous Asynchronous Receiver Transmitter) for serial data communication.  Programmable peripheral designed for synchronous.
Accessing I/O Devices Processor Memory BUS I/O Device 1 I/O Device 2.
CSNB374: Microprocessor Systems Chapter 5: Procedures and Interrupts.
Microprocessor. Interrupts The processor has 5 interrupts. CALL instruction (3 byte instruction). The processor calls the subroutine, address of which.
CH10 Input/Output DDDData Transfer EEEExternal Devices IIII/O Modules PPPProgrammed I/O IIIInterrupt-Driven I/O DDDDirect Memory.
Computer Architecture Lecture 6 by Engineer A. Lecturer Aymen Hasan AlAwady 1/12/2013 University of Kufa - Informatics Center for Research and Rehabilitation.
MICROPROCESSORS AND APPLICATIONS
Interfacing Data Converters. D/A converters Design an O/P port with the address FFh to interface the 1408 D/A converter that is calibrated for 0 to 10V.
بسم الله الرحمن الرحيم MEMORY AND I/O.
The 8085 Microprocessor Architecture. What 8085 meant for? 80 - year of invention bit processor 5 - uses +5V for power.
8085 Microprocessor: Architecture & Support Components.
1 Device Controller I/O units typically consist of A mechanical component: the device itself An electronic component: the device controller or adapter.
Gandhinagar Institute of Technology
8 085Microprocessor Temp Reg (8) Accumulator (A reg) Flag flip flops(8) Instruction Register (8) Arithmetic Logic Unit ALU Instruction Decoder and Machine.
Architecture of 8085 Nitin Mishra. Registers Microprocessor Instruction Cache Arithmetic & Logic Unit Control Unit Bus Interface Unit Data Cache Instruction.
AMITY UNIVERSITY RAJASTHAN Present By M.Sc Applied Chemistry.
Unit Microprocessor.
Types of format of data transfer
Seminar On 8085 microprocessor
COURSE OUTCOMES OF Microprocessor and programming
Microprocessor Systems Design I
The process starts from the I/O device
Diagram of microprocessor interface with IO devices
I/O Memory Interface Topics:
Interrupts In 8085 and 8086.
8085 Interrupts.
The 8085 Microprocessor Architecture
E3165 DIGITAL ELECTRONIC SYSTEM
Interrupt.
An Introduction to Microprocessor Architecture using intel 8085 as a classic processor
Interrupts Interrupt is a process where an external device can get the attention of the microprocessor. The process starts from the I/O device The process.
X1 & X2 These are also called Crystal Input Pins.
Interrupts.
Md. Mojahidul Islam Lecturer Dept. of Computer Science & Engineering
Md. Mojahidul Islam Lecturer Dept. of Computer Science & Engineering
Compiled by Dr. N.Shanmugasundaram, HOD, ECE Dept, SECE.
Presentation transcript:

Dr A Sahu Dept of Computer Science & Engineering IIT Guwahati

Introduction to peripheral Non peripheral but outside MPU – Memory (RAM) Type of peripheral (I/O) Characteristics of peripheral (I/O) Method of getting/sending data from/to I/O Interrupt & ISR Peripheral controller (DMA/8255A)

Computer Systems – Internal (processor + memory (RAM) ) – Peripheral (Disk, Display, Audio, Eth,..) Processor RAMRAM RAMRAM

Peripherals : HD monitor, 5.1 speaker Interfaces : Intermediate Hardware – Nvidia GPU card, Creative Sound Blaster card Interfaces : Intermediate Software/Program – Nvidia GPU driver, Sound Blaster Driver software Processor RAMRAM RAMRAM

RAM Memory is integral part of MP System – MPU fetch instruction from RAM – MPU RD and WR data to RAM (same speed as MPU) How Ram is interfaced 8085 MPU 8085 MPU A 15 A0A0 D0 D7 Address Bus (16bit) Memory I/P Data Bus (8bit) O/P Control Bus (8bit)

8085 MPU 8085 MPU A 15 A0A0 Address Bus (16bit) Memory I/P Data Bus (8bit) O/P Control Bus (8bit) latch ALE

WR enable memory input buffer RD enable memory output buffer R/W Memory R/W Memory Address line CSWRRD Data lines Input buffer Out put Buffer Register3 Register2 Register1 Register0 DeCoderDeCoder DeCoderDeCoder WR RD A1A1 A0A0

MPU R/W Memory R/W Memory Address line CSWRRD Data lines latch ALE IO/M RD WR 0 HA LA A0A0 A7A7 A8A8 A 15

Read Instruction from memory Execute instruction Read/Write data to memory Some time send result to output device – LEDs, Monitor, Printer Interfacing a peripheral – Why: To enable MPU to communicate with I/O – Designing logic circuit H/W for a I/O – Writing instruction (S/W)

Synchronous : At the same time, high speed I/O – Transmitter & Receiver Synchronized with same clock – 7 Segment LEDs can work same/higher speed then MPU – RAM (may be I/O) can work at same speed as MPU (Not the current Processor & DRAM) Asynchronous : Irregular interval, low speed I/O – I/O are slower – Keyboard, ADC/DAC, Disk

Peripheral I/O – IN port (Instruction), OUT port (instruction) – Identified with 8 bit address (Immediate) – Example: IN 01H ; Receive data from port 1 Memory mapped I/O – A peripheral is connected as if it were a memory location – Identified with 16 bit address – Data transfer by : LDA, STA, MOV M R, MOV R M

Parallel – Entire 8bit or 16 bit transfer at one time – In 8085 entire 8 bit transferred simultaneous using 8 data lines – Seven Segment LEDs, Data converter (ASCIItoHEX), Memory Serial – Data transferred one bit at a time – Parallel to serial conversion (parallel 8 bit to stream of serial 8 bit) – Serial to Parallel conversion – Modem, USB, SATA, and (sometimes monitor/printer) UART: Universal Asynchronous Receiver & Transmitter

MPU control – You will pick up and drop friend from Station (I/O) to Home (Memory) – When ever you will get a call (interrupt you) from him, you have do that work of pickup (Execute ISR) Device Control (DMA) – You hire a Taxi wala, he will pick up and drop friend from Station to Home – Give mobile number of taxi driver to your friend, your friend will to the taxi driver (coordinate) and Taxi wala drop your friend in your home

Unconditional – Assume I/O is always available (Ex LED port) – MPU simply enable port, transfer data & execute Next Instruction Polling (Status check of device) – You will call to your friend how much distance he have come (check whether he have landed at Airport) Interrupt (Let me work, when you are ready INTR me ) With READY Signal (Mix of both approach) – Status Check, Interrupt With handshake signal (Mutual Understanding) – A/D converter, When ready send a signal to MPU, MPU keep check the DR signal – MPU check it own DR signal pin

Design a song changer using a Bed lamp switch You don’t want to go near to computer and change the song Press the button (on-off) of the switch and let the computer change to song Design Hardware & Software for this – Take USB cable, dismantle it, connect two port to switch – Write to C program to handle Interrupt & song chage

Set EI Check INTR line during execution of each instruction If INTR is high & EI=1 then set DI and put INTA bar low INTA bar is used to insert a RST instruction, it transfer the program control to specific location (ISR) Perform the task using ISR At end of ISR it enable interrupt (EI) After RETurn form ISR it continue to execute the normal execution

Assume you are the MPU What is your priority to different person – Unknown (Some INTR), Friends (RST5), Boss (RST 6), Parents (RST7), Medical/Accident case (TRAP) – Higher priority make other Disable – TRAP (1), RST7 (2), RST6 (3), RST5 (4), INT (5) When you don’t want any interrupt – When I am serving to my Boss at company – When I am sleeping – DI instruction (Disable Interrupt) When I want interrupt (EI= Enable Interrupt) – I am free – I am not doing any valuable thing

Design a 1-minute timer using a 60Hz Power line interrupt source Out put port should display minute and Seconds in Hex/BCD At the end port should continue displaying 1 minute and zero seconds

60 Hz= 16.6ms pulse, of 8.3ms width Too long for interrupt Make it 6micro second using a constable vibrator in 16 ms 240 V RMS 6.2V RMS 5.6K Monostable Vibrator Monostable Vibrator 8085 MPU 8085 MPU RST6.5

34JMP RWM : RST 6.5 goes to 0034 location and Jump to ISR Main:LXI SP, STACK RIM ; Read Mask ORI 08H ; bit pattern to enable 6.5 SIM; Enable RST 6.5 LXI B,0000H; Set up B for minute & C for Sec MVI D, 3C; Set up register D to count interrupt EI; Allow system to interrupt Display: MOV A,B OUT PORT1 ; Display on port Minute LEDs MOV A,C OUT PORT2; Display on port Second LEDs JMP DELAY RWM:JMP TIMER

TIMER: DCR D ; one interrupt occur reduce count by 1 EI; Enable Intr RNZ; Has 1 Sec elapsed ? If not return DI; No other interrupt allowed MVI D, 3CH; 1 sec is complete, load D with intr count INR C; Increment second register MOV C,A CPI 3CH; compare with 60 EI RNZ; Is time=60 second? Is not return DI; Disable interrupt MVI C,00H; 60 second complete, clear “Second” reg INR B; Increment Minute RET; Return

Used for play sound in speaker Used by AC97 (Audio codec) MP3 Sound store digital format in HDD Slow as compared to processor/MPU Parameters Resolution (8 bit/16 bit) Settling time (1micro sec)

FullScaleOutput=(FullScaleValue – 1LSBValue) 1MSB Value=1/2 * FSV Digital to Analog Converter Digital to Analog Converter D0D0 D1D1 D2D2 Analog Output VoVo Digital Inputs Analog output LSB FS

4K2.5K 5K 10K 20K D 3 =8 D 2 =4 D 1 =2 D 0 =1 V out Vo= Vref/R * ( A 1 /2+ A 2 /4+…A n /2 n ) Vo is proportional to values of Data Bits Value

R S Gaonkar, “Microprocessor Architecture”, Unit II preface, Chapter 12,13,14