Sns College of Technology, Coimbatore - 35 (An Autonomous Institution)
Sns College of Technology, Coimbatore - 35 (An Autonomous Institution)
Sns College of Technology, Coimbatore - 35 (An Autonomous Institution)
Peripheral devices
In addition to the processor and a set of memory modules, the third key element of
a computer system is a set of input-output subsystem referred to as I/O, provides
an efficient mode of communication between the central system and the outside
environment.
Programs and data must be entered into computer memory for processing and
results obtained from computations must be recorded or displayed for the user.
Devices that are under the direct control of the computer are said to be connected
on- line. These devices are designed to read information into or out of the memory
unit upon command from CPU.
Input or output devices attached to the computer are also called peripherals.
Among the most common peripherals are keyboards, display units, and printers.
Perhaps those provide auxiliary storage for the systems are magnetic disks and tapes.
Peripherals are electromechanical and electromagnetic devices of some complexity.
We can broadly classify peripheral devices into three categories:
o Human Readable: Communicating with the computer users, e.g. video
display terminal, printers etc.
o Machine Readable: Communicating with equipments, e.g. magnetic disk,
magnetic tape, sensor, actuators used in robotics etc.
o Communication: Communicating with remote devices means exchanging
data with that, e.g. modem, NIC (network interface Card) etc.
Control logic associated with the device controls the device's operation in
response to direction from the I/O module.
The transducer converts data from electrical to other forms of energy during
output and from other forms to electrical during input.
Buffer is associated with the transducer to temporarily hold data being
transferredbetween the I/O module and external devices i.e. peripheral
environment.
Input Device
Keyboard
Optical input devices
o Card Reader
o Paper Tape Reader
o Optical Character Recognition (OCR)
o Optical Bar code reader (OBR)
o Digitizer
o Optical Mark Reader
Magnetic Input Devices
o Magnetic Stripe Reader
o Magnetic Ink Character Recognition (MICR)
Screen Input Devices
o Touch Screen
o Light Pen
o Mouse
Analog Input Devices
Output Device
Card Puncher, Paper Tape Puncher
Monitor (CRT, LCD, LED)
Printer (Impact, Ink Jet, Laser, Dot Matrix)
Plotter
Analog
Voice
I/O modules
I/O modules interface to the system bus or central switch (CPU and Memory), interfaces
and controls to one or more peripheral devices. I/O operations are accomplished
through a wide assortment of external devices that provide a means of exchanging data
between external environment and computer by a link to an I/O module. The link is
used to exchange control status and data between I/O module and the external devices.
S.VASUKI
SNS COLLEGE OF TECHNOLOGY, COIMBATORE –35
(An Autonomous Institution)
DEPARTMENT OF COMPUTER SCIENCE AND ENGINEERING
S.VASUKI
SNS COLLEGE OF TECHNOLOGY, COIMBATORE –35
(An Autonomous Institution)
DEPARTMENT OF COMPUTER SCIENCE AND ENGINEERING
At the same time that the address is made available in the address line, the processor
provides a function code in the control way includes control command, output data and
input data.
I/O Module Decisions
Hide or reveal device properties to CPU
Support multiple or single device
S.VASUKI
SNS COLLEGE OF TECHNOLOGY, COIMBATORE –35
(An Autonomous Institution)
DEPARTMENT OF COMPUTER SCIENCE AND ENGINEERING
Control device functions or leave for CPU
Also O/S decisions
o e.g. Unix treats everything it can as a file
Input-Output interface
Input-Output interface provides a method for transferring information between
internalstorage (such as memory and CPU registers) and external I/O devices.
Peripherals connected to a computer need special communication links for
interfacingthem with the central processing unit.
The communication link resolves the following differences between the computer
andperipheral devices.
o Devices and signals
Peripherals - Electromechanical DevicesCPU or
Memory - Electronic Device
o Data Transfer Rate
Peripherals - Usually slower
CPU or Memory - Usually faster than peripherals
Some kinds of Synchronization mechanism may be needed
o Unit of Information
Peripherals - Byte
CPU or Memory - Word
o Operating Modes
Peripherals - Autonomous, Asynchronous CPU or
Memory – Synchronous
To resolve these differences, computer systems include special hardware components
(Interfaces) between the CPU and peripherals to supervise and synchronize all input and
output interfaces.
S.VASUKI
SNS COLLEGE OF TECHNOLOGY, COIMBATORE –35
(An Autonomous Institution)
DEPARTMENT OF COMPUTER SCIENCE AND ENGINEERING
Interface performs the following:
o Decodes the device address (device code)
o Decodes the commands (operation)
o Provides signals for the peripheral controller
o Synchronizes the data flow and supervises the transfer rate between
peripheraland CPU or Memory
I/O commands that the interface may receive:
o Control command: issued to activate the peripheral and to inform it what to do.
o Status command: used to test various status conditions in the interface and
theperipheral.
o Output data: causes the interface to respond by transferring data from the bus
intoone of its registers.
o Input data: is the opposite of the data output.
Memory-mapped I/O
o A single set of read/write control lines (no distinction between memory and
I/Otransfer)
o Memory and I/O addresses share the common address space which reduces
memoryaddress range available
o No specific input or output instruction so the same memory reference instructions
canbe used for I/O transfers
o Considerable flexibility in handling I/O operation
S.VASUKI
SNS COLLEGE OF TECHNOLOGY, COIMBATORE –35
(An Autonomous Institution)
DEPARTMENT OF COMPUTER SCIENCE AND ENGINEERING
Example of I/O Interface
Modes of transfer
Data Transfer between the central computer and I/O devices may be handled in a variety
ofmodes.
Some modes use CPU as an intermediate path, others transfer the data directly to and
fromthe memory unit.
Data transfer to and from peripherals may be handled in one of three possible modes.
o Programmed I/O
o Interrupt Driven I/O
o Direct Memory Access (DMA)
o
Programmed I/O
Programmed I/O operations are the result of I/O instructions written in the
computer program.
In programmed I/O, each data transfer in initiated by the instructions in the CPU
and hence the CPU is in the continuous monitoring of the interface.
Input instruction is used to transfer data from I/O device to CPU, store
instruction is used to transfer data from CPU to memory and output instruction
is used to transfer data from CPU to I/O device.
This technique is generally used in very slow speed computer and is not a
S.VASUKI
SNS COLLEGE OF TECHNOLOGY, COIMBATORE –35
(An Autonomous Institution)
DEPARTMENT OF COMPUTER SCIENCE AND ENGINEERING
efficient method if the speed of the CPU and I/O is different.
I/O device places the data on the I/O bus and enables its data valid signal
The interface accepts the data in the data register and sets the F bit of
statusregister and also enables the data accepted signal.
Data valid line is disables by I/O device.
CPU is in a continuous monitoring of the interface in which it checks the F bit of
the status register.
o If it is set i.e. 1, then the CPU reads the data from data register and sets
Fbit to zero
o If it is reset i.e. 0, then the CPU remains monitoring the interface.
Interface disables the data accepted signal and the system goes to initial
statewhere next item of data is placed on the data bus.
S.VASUKI
SNS COLLEGE OF TECHNOLOGY, COIMBATORE –35
(An Autonomous Institution)
DEPARTMENT OF COMPUTER SCIENCE AND ENGINEERING
Characteristics:
Continuous CPU involvement
CPU slowed down to I/O speed
Simple
Least hardware
Polling, or polled operation, in computer science, refers to actively sampling the status of an
external device by a client program as a synchronous activity. Polling is most often used in
terms of input/output (I/O), and is also referred to as polled I/O or software driven I/O.
S.VASUKI
1
1
1
2
COMPUTER ORGANIZATION AND ARCHITECTURE / SELVAKUMAR N/ CSE / SNSCT