SlideShare a Scribd company logo
1 of 26
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
R
A
M
• 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
R
A
M
• 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
A15
A0
D0
D7
Address Bus (16bit)
Memory I/P
Data Bus (8bit)
O/P
Control Bus (8bit)
8085
MPU
A15
A0
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
Address
line
CS WR RD
Data
lines
Input buffer
Out put Buffer
Register3
Register2
Register1
Register0
D
e
C
o
d
e
r
WR
RD
A1
A0
MPU
R/W
Memory
Address
line
CS WR RD
Data
lines
latch
ALE
IO/M
RD
WR
0
HA
LA
A0
A7
A8
A15
• 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 INTAbar low
• INTAbar 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
5.6K
Monostable
Vibrator
8085
MPU
RST6.5
34 JMP 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 6010 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 6010 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
D0
D1
D2
Analog
Output
Vo
Digital Inputs
Analogoutput
000 001 011010 100 101 111110
LSB
FS
0
1
2
3
4
5
6
7
4K2.5K
5K
10K
20K
D3=8
D2=4
D1=2
D0=1
Vout
• Vo= Vref/R * ( A1/2+ A2/4+…An/2n)
• Vo is proportional to values of Data Bits Value
• R S Gaonkar, “Microprocessor Architecture”, Unit II preface,
Chapter 12,13,14
Lec07

More Related Content

What's hot

What's hot (20)

Uart
UartUart
Uart
 
Design and implementation of uart on soc
Design and implementation of uart on socDesign and implementation of uart on soc
Design and implementation of uart on soc
 
FPGA IMPLIMENTATION OF UART CONTTROLLER
FPGA IMPLIMENTATION OF UART CONTTROLLERFPGA IMPLIMENTATION OF UART CONTTROLLER
FPGA IMPLIMENTATION OF UART CONTTROLLER
 
NAVEEN UART BATCH 43
NAVEEN UART BATCH 43NAVEEN UART BATCH 43
NAVEEN UART BATCH 43
 
Uart
UartUart
Uart
 
Naveen UART BATCH 43
Naveen UART BATCH 43Naveen UART BATCH 43
Naveen UART BATCH 43
 
Microcontroller
MicrocontrollerMicrocontroller
Microcontroller
 
Uart
UartUart
Uart
 
Serial Communication In Atmega 16
Serial Communication In Atmega 16Serial Communication In Atmega 16
Serial Communication In Atmega 16
 
Verification of uart ip core using uvm
Verification of uart ip core using uvmVerification of uart ip core using uvm
Verification of uart ip core using uvm
 
Interrupt 8085
Interrupt 8085Interrupt 8085
Interrupt 8085
 
PIC CONTROLLERS
PIC CONTROLLERSPIC CONTROLLERS
PIC CONTROLLERS
 
Serial communication
Serial communicationSerial communication
Serial communication
 
Interrupt11
Interrupt11Interrupt11
Interrupt11
 
UART
UARTUART
UART
 
8051
80518051
8051
 
Interrupt
InterruptInterrupt
Interrupt
 
Unit II Study of Onchip Peripherals
Unit II Study of Onchip PeripheralsUnit II Study of Onchip Peripherals
Unit II Study of Onchip Peripherals
 
PIC16F877A interfacing with LCD
PIC16F877A interfacing with LCDPIC16F877A interfacing with LCD
PIC16F877A interfacing with LCD
 
Overview of LPC213x MCUs
Overview of LPC213x MCUsOverview of LPC213x MCUs
Overview of LPC213x MCUs
 

Viewers also liked (14)

Lec03
Lec03Lec03
Lec03
 
Lec05
Lec05Lec05
Lec05
 
Chp10 sw constr
Chp10 sw constrChp10 sw constr
Chp10 sw constr
 
Lec11
Lec11Lec11
Lec11
 
Malp edusat
Malp edusatMalp edusat
Malp edusat
 
Lec06
Lec06Lec06
Lec06
 
Lec08
Lec08Lec08
Lec08
 
Lec12
Lec12Lec12
Lec12
 
Lec13
Lec13Lec13
Lec13
 
Lec04
Lec04Lec04
Lec04
 
Lec14
Lec14Lec14
Lec14
 
Lec10
Lec10Lec10
Lec10
 
Lec09
Lec09Lec09
Lec09
 
8085 microprocessor ramesh gaonkar
8085 microprocessor   ramesh gaonkar8085 microprocessor   ramesh gaonkar
8085 microprocessor ramesh gaonkar
 

Similar to Lec07

MICROPROCESSORS AND MICROCONTROLLERS
MICROPROCESSORS AND MICROCONTROLLERSMICROPROCESSORS AND MICROCONTROLLERS
MICROPROCESSORS AND MICROCONTROLLERSselvakumar948
 
UNIT II MICROPROCESSOR AND MICROCONTROLLER
UNIT II MICROPROCESSOR AND MICROCONTROLLER UNIT II MICROPROCESSOR AND MICROCONTROLLER
UNIT II MICROPROCESSOR AND MICROCONTROLLER ravis205084
 
Week 1.3 architecture
Week 1.3   architectureWeek 1.3   architecture
Week 1.3 architecturebaraniselva
 
Introduction to 8085 Microprocessor
Introduction to 8085 MicroprocessorIntroduction to 8085 Microprocessor
Introduction to 8085 MicroprocessorRavi Anand
 
Input output accessing
Input output accessingInput output accessing
Input output accessingankitraosingh
 
Unit 2 - Microprocessor & Microcontroller.pptx
Unit 2 -  Microprocessor & Microcontroller.pptxUnit 2 -  Microprocessor & Microcontroller.pptx
Unit 2 - Microprocessor & Microcontroller.pptxCharunnath S V
 
B sc e5.2 mp unit 3 interfacing
B sc e5.2 mp unit 3 interfacingB sc e5.2 mp unit 3 interfacing
B sc e5.2 mp unit 3 interfacingMahiboobAliMulla
 
INTRODUCTION TO MICROCONTROLLER
INTRODUCTION TO MICROCONTROLLERINTRODUCTION TO MICROCONTROLLER
INTRODUCTION TO MICROCONTROLLERAnkita Jaiswal
 
20ME702– MECHATRONICS -UNIT-2.pptx
20ME702– MECHATRONICS -UNIT-2.pptx20ME702– MECHATRONICS -UNIT-2.pptx
20ME702– MECHATRONICS -UNIT-2.pptxMohanumar S
 
UNIT II –8085 MICROPROCESSOR AND 8051 MICROCONTROLLER---ME6702– MECHATRONICS
UNIT II –8085 MICROPROCESSOR AND 8051 MICROCONTROLLER---ME6702– MECHATRONICS UNIT II –8085 MICROPROCESSOR AND 8051 MICROCONTROLLER---ME6702– MECHATRONICS
UNIT II –8085 MICROPROCESSOR AND 8051 MICROCONTROLLER---ME6702– MECHATRONICS Mohanumar S
 
8085 MICROPROCESSOR.pptx
8085 MICROPROCESSOR.pptx8085 MICROPROCESSOR.pptx
8085 MICROPROCESSOR.pptxkarthik R
 
Presentation On: "Micro-controller 8051 & Embedded System"
Presentation On: "Micro-controller 8051 & Embedded System"Presentation On: "Micro-controller 8051 & Embedded System"
Presentation On: "Micro-controller 8051 & Embedded System"surabhii007
 
Embedded systems, 8051 microcontroller
Embedded systems, 8051 microcontrollerEmbedded systems, 8051 microcontroller
Embedded systems, 8051 microcontrollerAmandeep Alag
 

Similar to Lec07 (20)

12 mt06ped001
12 mt06ped001 12 mt06ped001
12 mt06ped001
 
Topic 1
Topic 1Topic 1
Topic 1
 
MICROPROCESSORS AND MICROCONTROLLERS
MICROPROCESSORS AND MICROCONTROLLERSMICROPROCESSORS AND MICROCONTROLLERS
MICROPROCESSORS AND MICROCONTROLLERS
 
UNIT II MICROPROCESSOR AND MICROCONTROLLER
UNIT II MICROPROCESSOR AND MICROCONTROLLER UNIT II MICROPROCESSOR AND MICROCONTROLLER
UNIT II MICROPROCESSOR AND MICROCONTROLLER
 
Week 1.3 architecture
Week 1.3   architectureWeek 1.3   architecture
Week 1.3 architecture
 
Introduction to 8085svv
Introduction to 8085svvIntroduction to 8085svv
Introduction to 8085svv
 
Introduction to 8085 Microprocessor
Introduction to 8085 MicroprocessorIntroduction to 8085 Microprocessor
Introduction to 8085 Microprocessor
 
Input output accessing
Input output accessingInput output accessing
Input output accessing
 
Unit 2 - Microprocessor & Microcontroller.pptx
Unit 2 -  Microprocessor & Microcontroller.pptxUnit 2 -  Microprocessor & Microcontroller.pptx
Unit 2 - Microprocessor & Microcontroller.pptx
 
B sc e5.2 mp unit 3 interfacing
B sc e5.2 mp unit 3 interfacingB sc e5.2 mp unit 3 interfacing
B sc e5.2 mp unit 3 interfacing
 
PPT-1.pptx
PPT-1.pptxPPT-1.pptx
PPT-1.pptx
 
PPT-1.pptx
PPT-1.pptxPPT-1.pptx
PPT-1.pptx
 
INTRODUCTION TO MICROCONTROLLER
INTRODUCTION TO MICROCONTROLLERINTRODUCTION TO MICROCONTROLLER
INTRODUCTION TO MICROCONTROLLER
 
Uc1(vii sem)
Uc1(vii sem)Uc1(vii sem)
Uc1(vii sem)
 
20ME702– MECHATRONICS -UNIT-2.pptx
20ME702– MECHATRONICS -UNIT-2.pptx20ME702– MECHATRONICS -UNIT-2.pptx
20ME702– MECHATRONICS -UNIT-2.pptx
 
UNIT II –8085 MICROPROCESSOR AND 8051 MICROCONTROLLER---ME6702– MECHATRONICS
UNIT II –8085 MICROPROCESSOR AND 8051 MICROCONTROLLER---ME6702– MECHATRONICS UNIT II –8085 MICROPROCESSOR AND 8051 MICROCONTROLLER---ME6702– MECHATRONICS
UNIT II –8085 MICROPROCESSOR AND 8051 MICROCONTROLLER---ME6702– MECHATRONICS
 
8085 MICROPROCESSOR.pptx
8085 MICROPROCESSOR.pptx8085 MICROPROCESSOR.pptx
8085 MICROPROCESSOR.pptx
 
MP_MC.pdf
MP_MC.pdfMP_MC.pdf
MP_MC.pdf
 
Presentation On: "Micro-controller 8051 & Embedded System"
Presentation On: "Micro-controller 8051 & Embedded System"Presentation On: "Micro-controller 8051 & Embedded System"
Presentation On: "Micro-controller 8051 & Embedded System"
 
Embedded systems, 8051 microcontroller
Embedded systems, 8051 microcontrollerEmbedded systems, 8051 microcontroller
Embedded systems, 8051 microcontroller
 

Recently uploaded

SPICE PARK APR2024 ( 6,793 SPICE Models )
SPICE PARK APR2024 ( 6,793 SPICE Models )SPICE PARK APR2024 ( 6,793 SPICE Models )
SPICE PARK APR2024 ( 6,793 SPICE Models )Tsuyoshi Horigome
 
Oxy acetylene welding presentation note.
Oxy acetylene welding presentation note.Oxy acetylene welding presentation note.
Oxy acetylene welding presentation note.eptoze12
 
Sachpazis Costas: Geotechnical Engineering: A student's Perspective Introduction
Sachpazis Costas: Geotechnical Engineering: A student's Perspective IntroductionSachpazis Costas: Geotechnical Engineering: A student's Perspective Introduction
Sachpazis Costas: Geotechnical Engineering: A student's Perspective IntroductionDr.Costas Sachpazis
 
GDSC ASEB Gen AI study jams presentation
GDSC ASEB Gen AI study jams presentationGDSC ASEB Gen AI study jams presentation
GDSC ASEB Gen AI study jams presentationGDSCAESB
 
Decoding Kotlin - Your guide to solving the mysterious in Kotlin.pptx
Decoding Kotlin - Your guide to solving the mysterious in Kotlin.pptxDecoding Kotlin - Your guide to solving the mysterious in Kotlin.pptx
Decoding Kotlin - Your guide to solving the mysterious in Kotlin.pptxJoão Esperancinha
 
Call Girls Delhi {Jodhpur} 9711199012 high profile service
Call Girls Delhi {Jodhpur} 9711199012 high profile serviceCall Girls Delhi {Jodhpur} 9711199012 high profile service
Call Girls Delhi {Jodhpur} 9711199012 high profile servicerehmti665
 
INFLUENCE OF NANOSILICA ON THE PROPERTIES OF CONCRETE
INFLUENCE OF NANOSILICA ON THE PROPERTIES OF CONCRETEINFLUENCE OF NANOSILICA ON THE PROPERTIES OF CONCRETE
INFLUENCE OF NANOSILICA ON THE PROPERTIES OF CONCRETEroselinkalist12
 
Call Us ≽ 8377877756 ≼ Call Girls In Shastri Nagar (Delhi)
Call Us ≽ 8377877756 ≼ Call Girls In Shastri Nagar (Delhi)Call Us ≽ 8377877756 ≼ Call Girls In Shastri Nagar (Delhi)
Call Us ≽ 8377877756 ≼ Call Girls In Shastri Nagar (Delhi)dollysharma2066
 
Concrete Mix Design - IS 10262-2019 - .pptx
Concrete Mix Design - IS 10262-2019 - .pptxConcrete Mix Design - IS 10262-2019 - .pptx
Concrete Mix Design - IS 10262-2019 - .pptxKartikeyaDwivedi3
 
Gurgaon ✡️9711147426✨Call In girls Gurgaon Sector 51 escort service
Gurgaon ✡️9711147426✨Call In girls Gurgaon Sector 51 escort serviceGurgaon ✡️9711147426✨Call In girls Gurgaon Sector 51 escort service
Gurgaon ✡️9711147426✨Call In girls Gurgaon Sector 51 escort servicejennyeacort
 
Past, Present and Future of Generative AI
Past, Present and Future of Generative AIPast, Present and Future of Generative AI
Past, Present and Future of Generative AIabhishek36461
 
Introduction-To-Agricultural-Surveillance-Rover.pptx
Introduction-To-Agricultural-Surveillance-Rover.pptxIntroduction-To-Agricultural-Surveillance-Rover.pptx
Introduction-To-Agricultural-Surveillance-Rover.pptxk795866
 
Study on Air-Water & Water-Water Heat Exchange in a Finned Tube Exchanger
Study on Air-Water & Water-Water Heat Exchange in a Finned Tube ExchangerStudy on Air-Water & Water-Water Heat Exchange in a Finned Tube Exchanger
Study on Air-Water & Water-Water Heat Exchange in a Finned Tube ExchangerAnamika Sarkar
 
IVE Industry Focused Event - Defence Sector 2024
IVE Industry Focused Event - Defence Sector 2024IVE Industry Focused Event - Defence Sector 2024
IVE Industry Focused Event - Defence Sector 2024Mark Billinghurst
 
complete construction, environmental and economics information of biomass com...
complete construction, environmental and economics information of biomass com...complete construction, environmental and economics information of biomass com...
complete construction, environmental and economics information of biomass com...asadnawaz62
 
Heart Disease Prediction using machine learning.pptx
Heart Disease Prediction using machine learning.pptxHeart Disease Prediction using machine learning.pptx
Heart Disease Prediction using machine learning.pptxPoojaBan
 

Recently uploaded (20)

SPICE PARK APR2024 ( 6,793 SPICE Models )
SPICE PARK APR2024 ( 6,793 SPICE Models )SPICE PARK APR2024 ( 6,793 SPICE Models )
SPICE PARK APR2024 ( 6,793 SPICE Models )
 
Oxy acetylene welding presentation note.
Oxy acetylene welding presentation note.Oxy acetylene welding presentation note.
Oxy acetylene welding presentation note.
 
Design and analysis of solar grass cutter.pdf
Design and analysis of solar grass cutter.pdfDesign and analysis of solar grass cutter.pdf
Design and analysis of solar grass cutter.pdf
 
Sachpazis Costas: Geotechnical Engineering: A student's Perspective Introduction
Sachpazis Costas: Geotechnical Engineering: A student's Perspective IntroductionSachpazis Costas: Geotechnical Engineering: A student's Perspective Introduction
Sachpazis Costas: Geotechnical Engineering: A student's Perspective Introduction
 
GDSC ASEB Gen AI study jams presentation
GDSC ASEB Gen AI study jams presentationGDSC ASEB Gen AI study jams presentation
GDSC ASEB Gen AI study jams presentation
 
Decoding Kotlin - Your guide to solving the mysterious in Kotlin.pptx
Decoding Kotlin - Your guide to solving the mysterious in Kotlin.pptxDecoding Kotlin - Your guide to solving the mysterious in Kotlin.pptx
Decoding Kotlin - Your guide to solving the mysterious in Kotlin.pptx
 
Call Girls Delhi {Jodhpur} 9711199012 high profile service
Call Girls Delhi {Jodhpur} 9711199012 high profile serviceCall Girls Delhi {Jodhpur} 9711199012 high profile service
Call Girls Delhi {Jodhpur} 9711199012 high profile service
 
INFLUENCE OF NANOSILICA ON THE PROPERTIES OF CONCRETE
INFLUENCE OF NANOSILICA ON THE PROPERTIES OF CONCRETEINFLUENCE OF NANOSILICA ON THE PROPERTIES OF CONCRETE
INFLUENCE OF NANOSILICA ON THE PROPERTIES OF CONCRETE
 
Call Us ≽ 8377877756 ≼ Call Girls In Shastri Nagar (Delhi)
Call Us ≽ 8377877756 ≼ Call Girls In Shastri Nagar (Delhi)Call Us ≽ 8377877756 ≼ Call Girls In Shastri Nagar (Delhi)
Call Us ≽ 8377877756 ≼ Call Girls In Shastri Nagar (Delhi)
 
Concrete Mix Design - IS 10262-2019 - .pptx
Concrete Mix Design - IS 10262-2019 - .pptxConcrete Mix Design - IS 10262-2019 - .pptx
Concrete Mix Design - IS 10262-2019 - .pptx
 
Gurgaon ✡️9711147426✨Call In girls Gurgaon Sector 51 escort service
Gurgaon ✡️9711147426✨Call In girls Gurgaon Sector 51 escort serviceGurgaon ✡️9711147426✨Call In girls Gurgaon Sector 51 escort service
Gurgaon ✡️9711147426✨Call In girls Gurgaon Sector 51 escort service
 
Past, Present and Future of Generative AI
Past, Present and Future of Generative AIPast, Present and Future of Generative AI
Past, Present and Future of Generative AI
 
Exploring_Network_Security_with_JA3_by_Rakesh Seal.pptx
Exploring_Network_Security_with_JA3_by_Rakesh Seal.pptxExploring_Network_Security_with_JA3_by_Rakesh Seal.pptx
Exploring_Network_Security_with_JA3_by_Rakesh Seal.pptx
 
Introduction-To-Agricultural-Surveillance-Rover.pptx
Introduction-To-Agricultural-Surveillance-Rover.pptxIntroduction-To-Agricultural-Surveillance-Rover.pptx
Introduction-To-Agricultural-Surveillance-Rover.pptx
 
🔝9953056974🔝!!-YOUNG call girls in Rajendra Nagar Escort rvice Shot 2000 nigh...
🔝9953056974🔝!!-YOUNG call girls in Rajendra Nagar Escort rvice Shot 2000 nigh...🔝9953056974🔝!!-YOUNG call girls in Rajendra Nagar Escort rvice Shot 2000 nigh...
🔝9953056974🔝!!-YOUNG call girls in Rajendra Nagar Escort rvice Shot 2000 nigh...
 
Study on Air-Water & Water-Water Heat Exchange in a Finned Tube Exchanger
Study on Air-Water & Water-Water Heat Exchange in a Finned Tube ExchangerStudy on Air-Water & Water-Water Heat Exchange in a Finned Tube Exchanger
Study on Air-Water & Water-Water Heat Exchange in a Finned Tube Exchanger
 
IVE Industry Focused Event - Defence Sector 2024
IVE Industry Focused Event - Defence Sector 2024IVE Industry Focused Event - Defence Sector 2024
IVE Industry Focused Event - Defence Sector 2024
 
young call girls in Rajiv Chowk🔝 9953056974 🔝 Delhi escort Service
young call girls in Rajiv Chowk🔝 9953056974 🔝 Delhi escort Serviceyoung call girls in Rajiv Chowk🔝 9953056974 🔝 Delhi escort Service
young call girls in Rajiv Chowk🔝 9953056974 🔝 Delhi escort Service
 
complete construction, environmental and economics information of biomass com...
complete construction, environmental and economics information of biomass com...complete construction, environmental and economics information of biomass com...
complete construction, environmental and economics information of biomass com...
 
Heart Disease Prediction using machine learning.pptx
Heart Disease Prediction using machine learning.pptxHeart Disease Prediction using machine learning.pptx
Heart Disease Prediction using machine learning.pptx
 

Lec07

  • 1. Dr A Sahu Dept of Computer Science & Engineering IIT Guwahati
  • 2. • 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)
  • 3. • Computer Systems – Internal (processor + memory (RAM) ) – Peripheral (Disk, Display, Audio, Eth,..) Processor R A M
  • 4. • 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 R A M
  • 5. • 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 A15 A0 D0 D7 Address Bus (16bit) Memory I/P Data Bus (8bit) O/P Control Bus (8bit)
  • 6. 8085 MPU A15 A0 Address Bus (16bit) Memory I/P Data Bus (8bit) O/P Control Bus (8bit) latch ALE
  • 7. • WR enable memory input buffer • RD enable memory output buffer R/W Memory Address line CS WR RD Data lines Input buffer Out put Buffer Register3 Register2 Register1 Register0 D e C o d e r WR RD A1 A0
  • 9. • 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)
  • 10. • 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
  • 11. • 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
  • 12. • 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
  • 13. • 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
  • 14. • 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
  • 15. • 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
  • 16. • Set EI • Check INTR line during execution of each instruction • If INTR is high & EI=1 then set DI and put INTAbar low • INTAbar 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
  • 17. • 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
  • 18. • 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
  • 19. • 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 5.6K Monostable Vibrator 8085 MPU RST6.5
  • 20. 34 JMP 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 6010 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
  • 21. 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 6010 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
  • 22. • 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)
  • 23. • FullScaleOutput=(FullScaleValue – 1LSBValue) • 1MSB Value=1/2 * FSV Digital to Analog Converter D0 D1 D2 Analog Output Vo Digital Inputs Analogoutput 000 001 011010 100 101 111110 LSB FS 0 1 2 3 4 5 6 7
  • 24. 4K2.5K 5K 10K 20K D3=8 D2=4 D1=2 D0=1 Vout • Vo= Vref/R * ( A1/2+ A2/4+…An/2n) • Vo is proportional to values of Data Bits Value
  • 25. • R S Gaonkar, “Microprocessor Architecture”, Unit II preface, Chapter 12,13,14