SlideShare a Scribd company logo
2
Most read
3
Most read
5
Most read
Accessing I/O devices

           V. Saranya
             AP/CSE
Sri vidya College of Engg & Tech
• I/O devices accessed through I/O interface.
• Requirements for I/O interface:
  – CPU communication
  – Device communication
  – Data buffering
  – Control and timing
  – Error detection.
CPU Communication:
• Processor sends commands to the I/O system
  which are generally the control signals on the
  control bus.
• Exchange of data between the processor and
  the I/O interface over the data bus.
• Check whether the devices are ready or not.
Data Buffering:
• Data transfer rate is too high .
• Data from processor and memory are sent to
  an I/O interface, buffered and then sent to the
  peripheral device at its data rate.
Error Detection:
• I/O interface is responsible for error detection
• Used to report errors to the processor.
• Types of errors:
  – Mechanical, electrical malfunctions, bad disk
    track, unintentional changes.
I/O interface Block diagram
                           Data Register
   Data                                                   Data
   Lines
                    Status/Control Register




Address Lines                                                Status
                 Address
                 Decoder                       External
                                                Device
                                              Interface          Control
 Control Lines                                   Logic
• Data Register: holds the data being
  transferred to or from the processor.
• Status/Control        Register:       contains
  information relevant to the operation.
• Data and status/control registers: are
  connected to the data bus.
• Address decoder: enables the device to
  recognize its address.
I/O interface for Input Device
                                                               Address Lines
BUS
                                                                   Data Lines


                                                                    Control lines




                                                          Data & Status
      Address Decoder   Control Circuits
                                                            Registers


                                                                          I/O
                                                                          interface
                                           Input Device
I/O interface for Output Device
                                                         Address Lines

BUS
                                                             Data Lines


                                                              Control lines




                                                    Data & Status
       Address Decoder   Control Circuits
                                                      Registers


                                                                    I/O
                                                                    interface
                                        Output Device
I/O interface Techniques
I/O Ports
• 4 registers - status, control, data-in, data-out
   – Status - states whether the current command is
     completed, byte is available, device has an error, etc
   – Control - host determines to start a command or
     change the mode of a device
   – Data-in - host reads to get input
   – Data-out - host writes to send output
• Size of registers - 1 to 4 bytes

                                                        10
I/O devices can be interfaced to a computer
  system I/O in 2 ways:

• Memory Mapped I/O

• I/O mapped I/O
Memory-Mapped I/O (1)
                           Memory Address Space




                  I/O Address Space

  (a) Separate I/O and memory space
  (b) Memory-mapped I/O
  (c) Hybrid                                  12
Memory Mapped I/O
• No need of special I/O instructions.
• Memory related instructions are used for I/O
  related operations.
I/O Mapped I/O



  Memory Address
     Space                 I/O address Space




Total Address Space
I/O Mapped I/O
• If we want to reduce the memory address
  space, we allot a different I/O address space,
  apart from total memory space.

Memory related instructions do not work here
Processor use these mode only for I/O Read, I/O
Write.
Difference between Memory Mapped
        I/O & I/O mapped I/O
        Memory Mapped I/O                           I/O Mapped I/O

Memory & I/O share the entire address    Processor provides separate address
        range of processor                    range for memory & I/O
Processor provides more address lines     Less address lines for accessing I/O
       for accessing memory
      More Decoding is required                Less decoding is required

Memory control signals used to control   I/O control signals are used to control
   Read & Write I/O operations                Read & Write I/O operations
Programmed I/O
• I/O operation means
  – A data transfer between an I/O device & memory
    or
  – Between I/O device & Processor.
• If any I/O operations are completely
  controlled by processor, then the system is
  said to be using “ Programmed I/O”
  – Processor has to check I/O system periodically
    until the operation completes  “POLLING”
  – Microprocessor has to check if any device need
    service.
Programmed I/O
                             j
              &     Int A?


                                     Service
              &                      routine A
Address
Decoder
                    Int C?
                             j
              &                      Service
                                     routine C



                    Int Z?
                                 j
                                     Service
                                     routine Z
Priority:
The Routines assigns priority to the different
  I/O devices
Port A is always checked 1st.
Then Port B
Then Port C
Order may change by changing routine.
• When Programmed I/O techniques is used:
  – Processor fetches I/O related instructions from
    memory and Issues I/O commands to I/O system
    to execute the instruction.
  – Memory Mapped I/O & I/O mapped I/O
    technique may apply.
  – Processor has 2 separate instructions IN & OUT
    for data transfer.
  – When the I/O instruction is encountered by the
    processor the I/O port is expected to be ready to
    response.
              Processor is usually programmed to test the I/O
               device status before initiating a data transfer.

More Related Content

PPTX
Memory mapped I/O and Isolated I/O
PPTX
Input & Output
PDF
Bus structure in Computer Organization.pdf
PPTX
Computer architecture instruction formats
PPTX
Unit-4 (IO Interface).pptx
PPT
Types of instructions
PPTX
Modes of data transfer.computer architecture.
PPTX
Lecture 3 instruction set
Memory mapped I/O and Isolated I/O
Input & Output
Bus structure in Computer Organization.pdf
Computer architecture instruction formats
Unit-4 (IO Interface).pptx
Types of instructions
Modes of data transfer.computer architecture.
Lecture 3 instruction set

What's hot (20)

PPTX
8251 USART
PPTX
Interrupts
PPT
Pipelining & All Hazards Solution
PPTX
Register organization, stack
PPTX
8255 PPI
PPTX
Direct memory access (dma)
PPTX
PPTX
Stacks & subroutines 1
PPTX
Modes of transfer - Computer Organization & Architecture - Nithiyapriya Pasav...
PPTX
DMA operation
PPTX
Interfacing memory with 8086 microprocessor
PPTX
Pic microcontroller architecture
PPTX
DMA and DMA controller
PPTX
8257 DMA Controller
PPTX
8237 dma controller
PPTX
Bus aribration
PPT
Computer Organization and Architecture.
PPSX
CISC & RISC ARCHITECTURES
PDF
Assembler directives and basic steps ALP of 8086
PPTX
Combinational circuits
8251 USART
Interrupts
Pipelining & All Hazards Solution
Register organization, stack
8255 PPI
Direct memory access (dma)
Stacks & subroutines 1
Modes of transfer - Computer Organization & Architecture - Nithiyapriya Pasav...
DMA operation
Interfacing memory with 8086 microprocessor
Pic microcontroller architecture
DMA and DMA controller
8257 DMA Controller
8237 dma controller
Bus aribration
Computer Organization and Architecture.
CISC & RISC ARCHITECTURES
Assembler directives and basic steps ALP of 8086
Combinational circuits
Ad

Viewers also liked (6)

PPTX
Input output interface
PPTX
Input output accessing
PPTX
Input Output Organization
PPTX
Input output organisation
PPT
Unit 5 I/O organization
PPT
Input output organization
Input output interface
Input output accessing
Input Output Organization
Input output organisation
Unit 5 I/O organization
Input output organization
Ad

Similar to Accessing I/O Devices (20)

PPTX
Io processing
PPT
Chapter
PPT
Chapter 6 input output
PDF
PPT
Interfacing ics for microprocessor
PPTX
Unit 4 Part2-Input-output Subsystem.pptx
PDF
Input Output
PPTX
Chapter5
PPTX
Microcontroller Basics with all the required parts included
PPT
Computer organisation
PDF
Unit 5
PDF
Unit 6
PPT
Interfacingiodevice
PPTX
CO--MODULE-1 (b) - Input-Output-Organization.pptx
PPT
chapter 4 Device Management systemss.ppt
PPTX
IO INTERFACING in unit 2 8086 Microprocessor
PDF
IOhardware_operting_systems_2022_libya.pdf
PDF
8089 microprocessor with diagram and analytical
PDF
Io sys
PPTX
comporgppt.pptx
Io processing
Chapter
Chapter 6 input output
Interfacing ics for microprocessor
Unit 4 Part2-Input-output Subsystem.pptx
Input Output
Chapter5
Microcontroller Basics with all the required parts included
Computer organisation
Unit 5
Unit 6
Interfacingiodevice
CO--MODULE-1 (b) - Input-Output-Organization.pptx
chapter 4 Device Management systemss.ppt
IO INTERFACING in unit 2 8086 Microprocessor
IOhardware_operting_systems_2022_libya.pdf
8089 microprocessor with diagram and analytical
Io sys
comporgppt.pptx

More from Slideshare (20)

PPTX
Crystal report generation in visual studio 2010
PPTX
Report generation
PPT
Trigger
PPTX
Security in Relational model
PPTX
Entity Relationship Model
PPTX
PPTX
Major issues in data mining
PPTX
Data preprocessing
PPTX
What is in you
PPTX
Propositional logic & inference
PPTX
Logical reasoning 21.1.13
PPT
Logic agent
PPTX
Statistical learning
PPTX
Resolution(decision)
PPT
Reinforcement learning 7313
PPTX
Neural networks
PPTX
Instance based learning
PPTX
Statistical learning
PPTX
Neural networks
PPTX
Logical reasoning
Crystal report generation in visual studio 2010
Report generation
Trigger
Security in Relational model
Entity Relationship Model
Major issues in data mining
Data preprocessing
What is in you
Propositional logic & inference
Logical reasoning 21.1.13
Logic agent
Statistical learning
Resolution(decision)
Reinforcement learning 7313
Neural networks
Instance based learning
Statistical learning
Neural networks
Logical reasoning

Recently uploaded (20)

PDF
Chapter 2 Heredity, Prenatal Development, and Birth.pdf
PDF
Classroom Observation Tools for Teachers
PDF
01-Introduction-to-Information-Management.pdf
PDF
3rd Neelam Sanjeevareddy Memorial Lecture.pdf
PPTX
Final Presentation General Medicine 03-08-2024.pptx
PPTX
The Healthy Child – Unit II | Child Health Nursing I | B.Sc Nursing 5th Semester
PPTX
Introduction to Child Health Nursing – Unit I | Child Health Nursing I | B.Sc...
PDF
VCE English Exam - Section C Student Revision Booklet
PPTX
master seminar digital applications in india
PPTX
Cell Types and Its function , kingdom of life
PPTX
Week 4 Term 3 Study Techniques revisited.pptx
PDF
ANTIBIOTICS.pptx.pdf………………… xxxxxxxxxxxxx
PDF
RMMM.pdf make it easy to upload and study
PPTX
human mycosis Human fungal infections are called human mycosis..pptx
PPTX
Institutional Correction lecture only . . .
PPTX
school management -TNTEU- B.Ed., Semester II Unit 1.pptx
PDF
Basic Mud Logging Guide for educational purpose
PPTX
Pharma ospi slides which help in ospi learning
PDF
grade 11-chemistry_fetena_net_5883.pdf teacher guide for all student
PDF
Saundersa Comprehensive Review for the NCLEX-RN Examination.pdf
Chapter 2 Heredity, Prenatal Development, and Birth.pdf
Classroom Observation Tools for Teachers
01-Introduction-to-Information-Management.pdf
3rd Neelam Sanjeevareddy Memorial Lecture.pdf
Final Presentation General Medicine 03-08-2024.pptx
The Healthy Child – Unit II | Child Health Nursing I | B.Sc Nursing 5th Semester
Introduction to Child Health Nursing – Unit I | Child Health Nursing I | B.Sc...
VCE English Exam - Section C Student Revision Booklet
master seminar digital applications in india
Cell Types and Its function , kingdom of life
Week 4 Term 3 Study Techniques revisited.pptx
ANTIBIOTICS.pptx.pdf………………… xxxxxxxxxxxxx
RMMM.pdf make it easy to upload and study
human mycosis Human fungal infections are called human mycosis..pptx
Institutional Correction lecture only . . .
school management -TNTEU- B.Ed., Semester II Unit 1.pptx
Basic Mud Logging Guide for educational purpose
Pharma ospi slides which help in ospi learning
grade 11-chemistry_fetena_net_5883.pdf teacher guide for all student
Saundersa Comprehensive Review for the NCLEX-RN Examination.pdf

Accessing I/O Devices

  • 1. Accessing I/O devices V. Saranya AP/CSE Sri vidya College of Engg & Tech
  • 2. • I/O devices accessed through I/O interface. • Requirements for I/O interface: – CPU communication – Device communication – Data buffering – Control and timing – Error detection.
  • 3. CPU Communication: • Processor sends commands to the I/O system which are generally the control signals on the control bus. • Exchange of data between the processor and the I/O interface over the data bus. • Check whether the devices are ready or not.
  • 4. Data Buffering: • Data transfer rate is too high . • Data from processor and memory are sent to an I/O interface, buffered and then sent to the peripheral device at its data rate. Error Detection: • I/O interface is responsible for error detection • Used to report errors to the processor. • Types of errors: – Mechanical, electrical malfunctions, bad disk track, unintentional changes.
  • 5. I/O interface Block diagram Data Register Data Data Lines Status/Control Register Address Lines Status Address Decoder External Device Interface Control Control Lines Logic
  • 6. • Data Register: holds the data being transferred to or from the processor. • Status/Control Register: contains information relevant to the operation. • Data and status/control registers: are connected to the data bus. • Address decoder: enables the device to recognize its address.
  • 7. I/O interface for Input Device Address Lines BUS Data Lines Control lines Data & Status Address Decoder Control Circuits Registers I/O interface Input Device
  • 8. I/O interface for Output Device Address Lines BUS Data Lines Control lines Data & Status Address Decoder Control Circuits Registers I/O interface Output Device
  • 10. I/O Ports • 4 registers - status, control, data-in, data-out – Status - states whether the current command is completed, byte is available, device has an error, etc – Control - host determines to start a command or change the mode of a device – Data-in - host reads to get input – Data-out - host writes to send output • Size of registers - 1 to 4 bytes 10
  • 11. I/O devices can be interfaced to a computer system I/O in 2 ways: • Memory Mapped I/O • I/O mapped I/O
  • 12. Memory-Mapped I/O (1) Memory Address Space I/O Address Space (a) Separate I/O and memory space (b) Memory-mapped I/O (c) Hybrid 12
  • 13. Memory Mapped I/O • No need of special I/O instructions. • Memory related instructions are used for I/O related operations.
  • 14. I/O Mapped I/O Memory Address Space I/O address Space Total Address Space
  • 15. I/O Mapped I/O • If we want to reduce the memory address space, we allot a different I/O address space, apart from total memory space. Memory related instructions do not work here Processor use these mode only for I/O Read, I/O Write.
  • 16. Difference between Memory Mapped I/O & I/O mapped I/O Memory Mapped I/O I/O Mapped I/O Memory & I/O share the entire address Processor provides separate address range of processor range for memory & I/O Processor provides more address lines Less address lines for accessing I/O for accessing memory More Decoding is required Less decoding is required Memory control signals used to control I/O control signals are used to control Read & Write I/O operations Read & Write I/O operations
  • 18. • I/O operation means – A data transfer between an I/O device & memory or – Between I/O device & Processor. • If any I/O operations are completely controlled by processor, then the system is said to be using “ Programmed I/O” – Processor has to check I/O system periodically until the operation completes  “POLLING” – Microprocessor has to check if any device need service.
  • 19. Programmed I/O j & Int A? Service & routine A Address Decoder Int C? j & Service routine C Int Z? j Service routine Z
  • 20. Priority: The Routines assigns priority to the different I/O devices Port A is always checked 1st. Then Port B Then Port C Order may change by changing routine.
  • 21. • When Programmed I/O techniques is used: – Processor fetches I/O related instructions from memory and Issues I/O commands to I/O system to execute the instruction. – Memory Mapped I/O & I/O mapped I/O technique may apply. – Processor has 2 separate instructions IN & OUT for data transfer. – When the I/O instruction is encountered by the processor the I/O port is expected to be ready to response. Processor is usually programmed to test the I/O device status before initiating a data transfer.