0% found this document useful (0 votes)
5 views

Module 4 DCO

The document provides an overview of peripheral devices, categorizing them into input, output, storage, and communication devices, and explains the importance of Input/Output (I/O) interfaces for communication between the CPU and peripherals. It discusses various I/O communication techniques, including programmed I/O, interrupt-driven I/O, and Direct Memory Access (DMA), detailing how DMA allows data transfer with minimal CPU intervention. Additionally, it outlines the operation of DMA controllers and their role in managing data transfers efficiently.

Uploaded by

amitkhpd
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
5 views

Module 4 DCO

The document provides an overview of peripheral devices, categorizing them into input, output, storage, and communication devices, and explains the importance of Input/Output (I/O) interfaces for communication between the CPU and peripherals. It discusses various I/O communication techniques, including programmed I/O, interrupt-driven I/O, and Direct Memory Access (DMA), detailing how DMA allows data transfer with minimal CPU intervention. Additionally, it outlines the operation of DMA controllers and their role in managing data transfers efficiently.

Uploaded by

amitkhpd
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 20

+ Module 4

Input/Output
2
Peripheral devices
A peripheral device is an external or internal hardware component that
connects to a computer or other digital system to provide additional
functionality. These devices are not a core part of the computing system
but extend its capabilities for input, output, storage, or communication.
Types of Peripheral devices
1. Input Devices
Used to provide data or commands to the computer.
Examples:
Keyboard: For typing text or commands.
Mouse: For pointing and selecting.
al Devices
2. Output Devices
Display or transmit the results of processed data.
Examples:
Monitor/Display: Displays visual output.
Printer: Produces hard copies of documents or images.

Wednesday, February 5, 20
25
3. Storage Devices
Store data either temporarily or permanently.
Examples:
External Hard Drives: Store large amounts of data.
USB Flash Drives: Portable data storage.
SD Cards: Compact storage for cameras and portable devices.
Optical Drives: Read/write CDs, DVDs, or Blu-ray discs.

4. Communication Devices (Optional Fourth Category)


Facilitate communication between systems.
Examples:
Modem: Connects to the internet via telephone lines.
Network Interface Card (NIC): Connects to a network.
External Wi-Fi Adapters: Provides wireless internet connectivity.
IO Interface
An Input/Output (I/O) Interface is a hardware or software mechanism that
facilitates the communication between a computer's central processing unit
(CPU) and its peripheral devices. It ensures that input devices can send data to
the system and output devices can receive processed data.
Why do systems need IO
Interface
1. Peripherals are electromechanical and electromagnetic devices and their
manner of operation is different from the operation of the CPU and memory,
which are electronic devices. Therefore, a conversion of signal values may be
required.
2. The data transfer rate of peripherals is usually slower than the transfer rate of
the CPU, and consequently, a synchronization mechanism may be needed.
3. Data codes and formats in peripherals (ASCII, BCD etc.) differ from the word
format in the CPU and memory.
4. The operating modes of peripherals are different from each other and each
must be controlled so as not to disturb the operation of other peripherals
connected to the CPU.
To resolve these differences, computer systems include special hardware
components between the CPU and peripherals to supervise and synchronize all
input and output transfers. These components are called interface units because
they interface between the processor bus and the peripheral device.
6

Wednesday, February 5, 20
25
+ I/O Interface For Input Device
7

 The figure shows the hardware required to connect an I/O device


to the bus.

Address decoder:

The address decoder enables the device to recognize its address on


the address lines.

Data and Status registers:


 The data register holds the data being transferred to or from the
processor
 The status register contains information relevant to the operation
of the I/O device (Device Readiness, Error Reporting, Interrupt
Status, Data Availability, Operation Progress etc).
Control Circuits:

Control circuitry required to coordinate I/O transfers.

Wednesday, February 5, 20
25
+ Different IO Interfaces
 PCI
 SCSI
 USB

Note: Given as assignment


+ I/O COMMUNICATION TECHNIQUES

 Three techniques are possible for I/O


operations
 Programmed I/O
 Interrupt-driven I/O
 Direct memory access (DMA)

9
+ Programmed I/O
• CPU while executing a
program encounters an I/O
instruction
• CPU issues I/O command to
I/ O module
• I/O module performs the
requested action & set
status registers

CPU is responsible to check


status registers periodically
to see if I/O operation is
complete. SO
No Interrupt to alert the
processor

10
+Interrupt-Driven
I/O
 Similar to direct I/O but
processor not required
to poll device.

 I/O module will interrupt


CPU for data exchange
when ready.

11
+ Direct Memory Access (DMA)
I/O exchanges occur directly with memory

• Requires DMA module on system


bus
• Capable of mimicking CPU and
taking over control of system from
CPU
-
• DMA will use bus when Processor
does not require it OR
• Must force processor to suspend
• Anoperation
interrupttemporarily– called
is sent when cycle
the task
isstealing
complete
• The processor is only involved at
the beginning and end of the
transfer

12
+ DMA Contd..
• Direct Memory Access (DMA) is a method of allowing data
to be moved from one location to another in a computer
without intervention from the central processor (CPU).

• It is also a fast way of transferring data within (and


sometimes between) computer.
 A DMA read transfers data from the
memory
to the I/O device.
 A DMA write transfers data from an I/O
device
to memory.

• The DMA controller temporarily borrows the address bus,


data bus and control bus from the microprocessor and
transfers the data directly from the external devices to a
series of memory locations (and vice versa).
+ DMA Controller (DMAC)
 DMA controller is part of the I/O interface that performs as the
master in a DMA transfer. For each word transferred, it
provides the memory address and all the bus signals that
control data transfer.
 Although DMAC can transfer data without intervention by the
processor, it’s operation must be under the control of a
program executed by the processor.
 Processor sends the starting address, the number of data, and
the direction of transfer to DMA controller.
 Processor suspends the application program requesting DMA,
starts DMA transfer, and starts another program.
 After the DMA transfer is done, DMA controller sends an
interrupt signal to the processor.
 The processor puts the suspended program in the Runnable
state.
+ Basic DMA Operation:
 Two control signals are used to request and acknowledge a
direct memory access (DMA) transfer in the microprocessor-
based system.
 Peripheral sends a DREQ (DMA request) to DMAC,
requesting a
 DMA operation,
 DMAC sends a HOLD signal as an input(to the processor)
requesting to get hold of it’s Data, Mem and Address buses.
 When the processor recognizes the hold, it stops its
execution and enters hold cycles. The processor sends a
HLDA ( HOLD ACK) signal to the DMAC acknowledging
relinquishing control of the buses by placing them at high-
impedance state.
 The DMAC send a DACK signal to the peripheral device
acknowledging the DMA action..
+ Use of DMA Controllers in a 16

Computer System
+ CPU having the control over the bus:
+ When DMA operates:
+ DMA Modes: Cycle Stealing & Burst
mode
 Requests by DMA devices for using the bus are always given
higher priority than processor requests (HOLD input has
higher priority than INTR).
 Among different DMA devices, top priority is given to high-
speed peripherals (disks, high-speed network interface,
graphics display device)
 Since the processor originates most memory access cycles,
it is often stated that DMA steals memory cycles from the
processor (cycle stealing).
 If DMA controller is given exclusive access to the main
memory to transfer a block of data without interruption, this
is called block or burst mode..
+ 20

Remember…
 Data transfer speed is determined by speed of the memory
device or a DMA controller.
 In many cases, the DMA controller slows the speed of the
system when transfers occur.
 The serial PCI (Peripheral Component Interface) Express bus
transfers data at rates exceeding DMA transfers.
 This in modern systems has made DMA is less important.

You might also like