SlideShare una empresa de Scribd logo
1 de 21
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.

Más contenido relacionado

La actualidad más candente

General register organization (computer organization)
General register organization  (computer organization)General register organization  (computer organization)
General register organization (computer organization)rishi ram khanal
 
Computer Organization and Architecture.
Computer Organization and Architecture.Computer Organization and Architecture.
Computer Organization and Architecture.CS_GDRCST
 
Multiple Access Protocal
Multiple Access ProtocalMultiple Access Protocal
Multiple Access Protocaltes31
 
Direct memory access (dma)
Direct memory access (dma)Direct memory access (dma)
Direct memory access (dma)Zubair Khalid
 
TCP/IP Network ppt
TCP/IP Network pptTCP/IP Network ppt
TCP/IP Network pptextraganesh
 
Input Output Organization
Input Output OrganizationInput Output Organization
Input Output OrganizationKamal Acharya
 
Control Unit Design
Control Unit DesignControl Unit Design
Control Unit DesignVinit Raut
 
Synchronous and-asynchronous-data-transfer
Synchronous and-asynchronous-data-transferSynchronous and-asynchronous-data-transfer
Synchronous and-asynchronous-data-transferAnuj Modi
 
Types of Addressing modes- COA
Types of Addressing modes- COATypes of Addressing modes- COA
Types of Addressing modes- COARuchi Maurya
 
Computer Network - Network Layer
Computer Network - Network LayerComputer Network - Network Layer
Computer Network - Network LayerManoj Kumar
 

La actualidad más candente (20)

General register organization (computer organization)
General register organization  (computer organization)General register organization  (computer organization)
General register organization (computer organization)
 
Computer Organization and Architecture.
Computer Organization and Architecture.Computer Organization and Architecture.
Computer Organization and Architecture.
 
Interrupts and types of interrupts
Interrupts and types of interruptsInterrupts and types of interrupts
Interrupts and types of interrupts
 
Interface
InterfaceInterface
Interface
 
Instruction format
Instruction formatInstruction format
Instruction format
 
Interrupts
InterruptsInterrupts
Interrupts
 
Multiple Access Protocal
Multiple Access ProtocalMultiple Access Protocal
Multiple Access Protocal
 
Disk structure
Disk structureDisk structure
Disk structure
 
Direct memory access (dma)
Direct memory access (dma)Direct memory access (dma)
Direct memory access (dma)
 
TCP/IP Network ppt
TCP/IP Network pptTCP/IP Network ppt
TCP/IP Network ppt
 
Input Output Organization
Input Output OrganizationInput Output Organization
Input Output Organization
 
Control Unit Design
Control Unit DesignControl Unit Design
Control Unit Design
 
Microprogrammed Control Unit
Microprogrammed Control UnitMicroprogrammed Control Unit
Microprogrammed Control Unit
 
Interrupts
InterruptsInterrupts
Interrupts
 
ADDRESSING MODES
ADDRESSING MODESADDRESSING MODES
ADDRESSING MODES
 
Modes of data transfer
Modes of data transferModes of data transfer
Modes of data transfer
 
Synchronous and-asynchronous-data-transfer
Synchronous and-asynchronous-data-transferSynchronous and-asynchronous-data-transfer
Synchronous and-asynchronous-data-transfer
 
Lecture 3 instruction set
Lecture 3  instruction setLecture 3  instruction set
Lecture 3 instruction set
 
Types of Addressing modes- COA
Types of Addressing modes- COATypes of Addressing modes- COA
Types of Addressing modes- COA
 
Computer Network - Network Layer
Computer Network - Network LayerComputer Network - Network Layer
Computer Network - Network Layer
 

Similar a Accessing I/O Devices

20ME702– MECHATRONICS -UNIT-3.ppt
20ME702– MECHATRONICS -UNIT-3.ppt20ME702– MECHATRONICS -UNIT-3.ppt
20ME702– MECHATRONICS -UNIT-3.pptMohanumar S
 
Unit 3-PROGRAMMABLE PERIPHERAL INTERFACE-ME6702– MECHATRONICS
Unit 3-PROGRAMMABLE PERIPHERAL INTERFACE-ME6702– MECHATRONICS Unit 3-PROGRAMMABLE PERIPHERAL INTERFACE-ME6702– MECHATRONICS
Unit 3-PROGRAMMABLE PERIPHERAL INTERFACE-ME6702– MECHATRONICS Mohanumar S
 
PROGRAMMABLE PERIPHERAL INTERFCAE.ppt
PROGRAMMABLE PERIPHERAL INTERFCAE.pptPROGRAMMABLE PERIPHERAL INTERFCAE.ppt
PROGRAMMABLE PERIPHERAL INTERFCAE.pptkarthik R
 
Unit2 p1 io organization-97-2003
Unit2 p1 io organization-97-2003Unit2 p1 io organization-97-2003
Unit2 p1 io organization-97-2003Swathi Veeradhi
 
MECHATRONICS-Unit 3-PROGRAMMABLE PERIPERAL INTERFACE.ppt
MECHATRONICS-Unit 3-PROGRAMMABLE PERIPERAL INTERFACE.pptMECHATRONICS-Unit 3-PROGRAMMABLE PERIPERAL INTERFACE.ppt
MECHATRONICS-Unit 3-PROGRAMMABLE PERIPERAL INTERFACE.pptCHANDRA KUMAR S
 
UNIT- 3.pptx
UNIT- 3.pptxUNIT- 3.pptx
UNIT- 3.pptxBASKARS53
 
Unit 4-l ecture3-io interface
Unit 4-l ecture3-io interfaceUnit 4-l ecture3-io interface
Unit 4-l ecture3-io interfacevishal choudhary
 
Unit 4-lecte3-io interface
Unit 4-lecte3-io interfaceUnit 4-lecte3-io interface
Unit 4-lecte3-io interfacevishal choudhary
 
Unit 4-lecte3-io interface
Unit 4-lecte3-io interfaceUnit 4-lecte3-io interface
Unit 4-lecte3-io interfacevishal choudhary
 
Unit 4 ca-input-output
Unit 4 ca-input-outputUnit 4 ca-input-output
Unit 4 ca-input-outputBBDITM LUCKNOW
 
UNIT 3 Peripheral Interfacing.pptx
UNIT 3 Peripheral Interfacing.pptxUNIT 3 Peripheral Interfacing.pptx
UNIT 3 Peripheral Interfacing.pptxGowrishankar C
 
Iosystemspre final-160922112930
Iosystemspre final-160922112930Iosystemspre final-160922112930
Iosystemspre final-160922112930marangburu42
 
Interfacing ics for microprocessor
Interfacing ics for microprocessorInterfacing ics for microprocessor
Interfacing ics for microprocessorTHANDAIAH PRABU
 

Similar a Accessing I/O Devices (20)

Io devies
Io deviesIo devies
Io devies
 
20ME702– MECHATRONICS -UNIT-3.ppt
20ME702– MECHATRONICS -UNIT-3.ppt20ME702– MECHATRONICS -UNIT-3.ppt
20ME702– MECHATRONICS -UNIT-3.ppt
 
Unit 3-PROGRAMMABLE PERIPHERAL INTERFACE-ME6702– MECHATRONICS
Unit 3-PROGRAMMABLE PERIPHERAL INTERFACE-ME6702– MECHATRONICS Unit 3-PROGRAMMABLE PERIPHERAL INTERFACE-ME6702– MECHATRONICS
Unit 3-PROGRAMMABLE PERIPHERAL INTERFACE-ME6702– MECHATRONICS
 
PROGRAMMABLE PERIPHERAL INTERFCAE.ppt
PROGRAMMABLE PERIPHERAL INTERFCAE.pptPROGRAMMABLE PERIPHERAL INTERFCAE.ppt
PROGRAMMABLE PERIPHERAL INTERFCAE.ppt
 
Unit2 p1 io organization-97-2003
Unit2 p1 io organization-97-2003Unit2 p1 io organization-97-2003
Unit2 p1 io organization-97-2003
 
PPI-MECHATRONICS
PPI-MECHATRONICSPPI-MECHATRONICS
PPI-MECHATRONICS
 
MECHATRONICS-Unit 3-PROGRAMMABLE PERIPERAL INTERFACE.ppt
MECHATRONICS-Unit 3-PROGRAMMABLE PERIPERAL INTERFACE.pptMECHATRONICS-Unit 3-PROGRAMMABLE PERIPERAL INTERFACE.ppt
MECHATRONICS-Unit 3-PROGRAMMABLE PERIPERAL INTERFACE.ppt
 
UNIT- 3.pptx
UNIT- 3.pptxUNIT- 3.pptx
UNIT- 3.pptx
 
Unit4_IO_13623_AnilRawat.ppt
Unit4_IO_13623_AnilRawat.pptUnit4_IO_13623_AnilRawat.ppt
Unit4_IO_13623_AnilRawat.ppt
 
Unit 4-l ecture3-io interface
Unit 4-l ecture3-io interfaceUnit 4-l ecture3-io interface
Unit 4-l ecture3-io interface
 
Unit 4-lecte3-io interface
Unit 4-lecte3-io interfaceUnit 4-lecte3-io interface
Unit 4-lecte3-io interface
 
Unit 4-lecte3-io interface
Unit 4-lecte3-io interfaceUnit 4-lecte3-io interface
Unit 4-lecte3-io interface
 
Unit 4 ca-input-output
Unit 4 ca-input-outputUnit 4 ca-input-output
Unit 4 ca-input-output
 
UNIT 3 Peripheral Interfacing.pptx
UNIT 3 Peripheral Interfacing.pptxUNIT 3 Peripheral Interfacing.pptx
UNIT 3 Peripheral Interfacing.pptx
 
Interfacingiodevice
InterfacingiodeviceInterfacingiodevice
Interfacingiodevice
 
Iosystemspre final-160922112930
Iosystemspre final-160922112930Iosystemspre final-160922112930
Iosystemspre final-160922112930
 
Io organization
Io organizationIo organization
Io organization
 
Ch11.ppt
Ch11.pptCh11.ppt
Ch11.ppt
 
Interfacing ics for microprocessor
Interfacing ics for microprocessorInterfacing ics for microprocessor
Interfacing ics for microprocessor
 
Peripheral devices
Peripheral devicesPeripheral devices
Peripheral devices
 

Más de Slideshare

Crystal report generation in visual studio 2010
Crystal report generation in visual studio 2010Crystal report generation in visual studio 2010
Crystal report generation in visual studio 2010Slideshare
 
Report generation
Report generationReport generation
Report generationSlideshare
 
Security in Relational model
Security in Relational modelSecurity in Relational model
Security in Relational modelSlideshare
 
Entity Relationship Model
Entity Relationship ModelEntity Relationship Model
Entity Relationship ModelSlideshare
 
Major issues in data mining
Major issues in data miningMajor issues in data mining
Major issues in data miningSlideshare
 
Data preprocessing
Data preprocessingData preprocessing
Data preprocessingSlideshare
 
What is in you
What is in youWhat is in you
What is in youSlideshare
 
Propositional logic & inference
Propositional logic & inferencePropositional logic & inference
Propositional logic & inferenceSlideshare
 
Logical reasoning 21.1.13
Logical reasoning 21.1.13Logical reasoning 21.1.13
Logical reasoning 21.1.13Slideshare
 
Statistical learning
Statistical learningStatistical learning
Statistical learningSlideshare
 
Resolution(decision)
Resolution(decision)Resolution(decision)
Resolution(decision)Slideshare
 
Reinforcement learning 7313
Reinforcement learning 7313Reinforcement learning 7313
Reinforcement learning 7313Slideshare
 
Neural networks
Neural networksNeural networks
Neural networksSlideshare
 
Instance based learning
Instance based learningInstance based learning
Instance based learningSlideshare
 
Statistical learning
Statistical learningStatistical learning
Statistical learningSlideshare
 
Neural networks
Neural networksNeural networks
Neural networksSlideshare
 
Logical reasoning
Logical reasoning Logical reasoning
Logical reasoning Slideshare
 

Más de Slideshare (20)

Crystal report generation in visual studio 2010
Crystal report generation in visual studio 2010Crystal report generation in visual studio 2010
Crystal report generation in visual studio 2010
 
Report generation
Report generationReport generation
Report generation
 
Trigger
TriggerTrigger
Trigger
 
Security in Relational model
Security in Relational modelSecurity in Relational model
Security in Relational model
 
Entity Relationship Model
Entity Relationship ModelEntity Relationship Model
Entity Relationship Model
 
OLAP
OLAPOLAP
OLAP
 
Major issues in data mining
Major issues in data miningMajor issues in data mining
Major issues in data mining
 
Data preprocessing
Data preprocessingData preprocessing
Data preprocessing
 
What is in you
What is in youWhat is in you
What is in you
 
Propositional logic & inference
Propositional logic & inferencePropositional logic & inference
Propositional logic & inference
 
Logical reasoning 21.1.13
Logical reasoning 21.1.13Logical reasoning 21.1.13
Logical reasoning 21.1.13
 
Logic agent
Logic agentLogic agent
Logic agent
 
Statistical learning
Statistical learningStatistical learning
Statistical learning
 
Resolution(decision)
Resolution(decision)Resolution(decision)
Resolution(decision)
 
Reinforcement learning 7313
Reinforcement learning 7313Reinforcement learning 7313
Reinforcement learning 7313
 
Neural networks
Neural networksNeural networks
Neural networks
 
Instance based learning
Instance based learningInstance based learning
Instance based learning
 
Statistical learning
Statistical learningStatistical learning
Statistical learning
 
Neural networks
Neural networksNeural networks
Neural networks
 
Logical reasoning
Logical reasoning Logical reasoning
Logical reasoning
 

Último

SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptxSOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptxiammrhaywood
 
Arihant handbook biology for class 11 .pdf
Arihant handbook biology for class 11 .pdfArihant handbook biology for class 11 .pdf
Arihant handbook biology for class 11 .pdfchloefrazer622
 
Web & Social Media Analytics Previous Year Question Paper.pdf
Web & Social Media Analytics Previous Year Question Paper.pdfWeb & Social Media Analytics Previous Year Question Paper.pdf
Web & Social Media Analytics Previous Year Question Paper.pdfJayanti Pande
 
9548086042 for call girls in Indira Nagar with room service
9548086042  for call girls in Indira Nagar  with room service9548086042  for call girls in Indira Nagar  with room service
9548086042 for call girls in Indira Nagar with room servicediscovermytutordmt
 
microwave assisted reaction. General introduction
microwave assisted reaction. General introductionmicrowave assisted reaction. General introduction
microwave assisted reaction. General introductionMaksud Ahmed
 
The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13Steve Thomason
 
Interactive Powerpoint_How to Master effective communication
Interactive Powerpoint_How to Master effective communicationInteractive Powerpoint_How to Master effective communication
Interactive Powerpoint_How to Master effective communicationnomboosow
 
social pharmacy d-pharm 1st year by Pragati K. Mahajan
social pharmacy d-pharm 1st year by Pragati K. Mahajansocial pharmacy d-pharm 1st year by Pragati K. Mahajan
social pharmacy d-pharm 1st year by Pragati K. Mahajanpragatimahajan3
 
Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111Sapana Sha
 
A Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy ReformA Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy ReformChameera Dedduwage
 
1029-Danh muc Sach Giao Khoa khoi 6.pdf
1029-Danh muc Sach Giao Khoa khoi  6.pdf1029-Danh muc Sach Giao Khoa khoi  6.pdf
1029-Danh muc Sach Giao Khoa khoi 6.pdfQucHHunhnh
 
Nutritional Needs Presentation - HLTH 104
Nutritional Needs Presentation - HLTH 104Nutritional Needs Presentation - HLTH 104
Nutritional Needs Presentation - HLTH 104misteraugie
 
IGNOU MSCCFT and PGDCFT Exam Question Pattern: MCFT003 Counselling and Family...
IGNOU MSCCFT and PGDCFT Exam Question Pattern: MCFT003 Counselling and Family...IGNOU MSCCFT and PGDCFT Exam Question Pattern: MCFT003 Counselling and Family...
IGNOU MSCCFT and PGDCFT Exam Question Pattern: MCFT003 Counselling and Family...PsychoTech Services
 
BAG TECHNIQUE Bag technique-a tool making use of public health bag through wh...
BAG TECHNIQUE Bag technique-a tool making use of public health bag through wh...BAG TECHNIQUE Bag technique-a tool making use of public health bag through wh...
BAG TECHNIQUE Bag technique-a tool making use of public health bag through wh...Sapna Thakur
 
Paris 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activityParis 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activityGeoBlogs
 
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...EduSkills OECD
 
Sanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdfSanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdfsanyamsingh5019
 
fourth grading exam for kindergarten in writing
fourth grading exam for kindergarten in writingfourth grading exam for kindergarten in writing
fourth grading exam for kindergarten in writingTeacherCyreneCayanan
 
Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)eniolaolutunde
 
Z Score,T Score, Percential Rank and Box Plot Graph
Z Score,T Score, Percential Rank and Box Plot GraphZ Score,T Score, Percential Rank and Box Plot Graph
Z Score,T Score, Percential Rank and Box Plot GraphThiyagu K
 

Último (20)

SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptxSOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
 
Arihant handbook biology for class 11 .pdf
Arihant handbook biology for class 11 .pdfArihant handbook biology for class 11 .pdf
Arihant handbook biology for class 11 .pdf
 
Web & Social Media Analytics Previous Year Question Paper.pdf
Web & Social Media Analytics Previous Year Question Paper.pdfWeb & Social Media Analytics Previous Year Question Paper.pdf
Web & Social Media Analytics Previous Year Question Paper.pdf
 
9548086042 for call girls in Indira Nagar with room service
9548086042  for call girls in Indira Nagar  with room service9548086042  for call girls in Indira Nagar  with room service
9548086042 for call girls in Indira Nagar with room service
 
microwave assisted reaction. General introduction
microwave assisted reaction. General introductionmicrowave assisted reaction. General introduction
microwave assisted reaction. General introduction
 
The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13
 
Interactive Powerpoint_How to Master effective communication
Interactive Powerpoint_How to Master effective communicationInteractive Powerpoint_How to Master effective communication
Interactive Powerpoint_How to Master effective communication
 
social pharmacy d-pharm 1st year by Pragati K. Mahajan
social pharmacy d-pharm 1st year by Pragati K. Mahajansocial pharmacy d-pharm 1st year by Pragati K. Mahajan
social pharmacy d-pharm 1st year by Pragati K. Mahajan
 
Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111
 
A Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy ReformA Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy Reform
 
1029-Danh muc Sach Giao Khoa khoi 6.pdf
1029-Danh muc Sach Giao Khoa khoi  6.pdf1029-Danh muc Sach Giao Khoa khoi  6.pdf
1029-Danh muc Sach Giao Khoa khoi 6.pdf
 
Nutritional Needs Presentation - HLTH 104
Nutritional Needs Presentation - HLTH 104Nutritional Needs Presentation - HLTH 104
Nutritional Needs Presentation - HLTH 104
 
IGNOU MSCCFT and PGDCFT Exam Question Pattern: MCFT003 Counselling and Family...
IGNOU MSCCFT and PGDCFT Exam Question Pattern: MCFT003 Counselling and Family...IGNOU MSCCFT and PGDCFT Exam Question Pattern: MCFT003 Counselling and Family...
IGNOU MSCCFT and PGDCFT Exam Question Pattern: MCFT003 Counselling and Family...
 
BAG TECHNIQUE Bag technique-a tool making use of public health bag through wh...
BAG TECHNIQUE Bag technique-a tool making use of public health bag through wh...BAG TECHNIQUE Bag technique-a tool making use of public health bag through wh...
BAG TECHNIQUE Bag technique-a tool making use of public health bag through wh...
 
Paris 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activityParis 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activity
 
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
 
Sanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdfSanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdf
 
fourth grading exam for kindergarten in writing
fourth grading exam for kindergarten in writingfourth grading exam for kindergarten in writing
fourth grading exam for kindergarten in writing
 
Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)
 
Z Score,T Score, Percential Rank and Box Plot Graph
Z Score,T Score, Percential Rank and Box Plot GraphZ Score,T Score, Percential Rank and Box Plot Graph
Z Score,T Score, Percential Rank and Box Plot Graph
 

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.