0% found this document useful (0 votes)
8 views11 pages

COA Unit 5

The document discusses peripheral devices used in microcomputers for input and output operations, detailing types of ports and their functions. It explains the concepts of interrupts, including software and hardware interrupts, and introduces Direct Memory Access (DMA) and I/O channels to enhance data transfer efficiency. Additionally, it covers synchronous and asynchronous transmission methods for data communication.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
8 views11 pages

COA Unit 5

The document discusses peripheral devices used in microcomputers for input and output operations, detailing types of ports and their functions. It explains the concepts of interrupts, including software and hardware interrupts, and introduces Direct Memory Access (DMA) and I/O channels to enhance data transfer efficiency. Additionally, it covers synchronous and asynchronous transmission methods for data communication.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 11

Unit 5

Peripheral Devices
To communicate with the outside world microcomputers use peripherals (I/O devices).
Commonly used peripherals are: A/D converter, D/A converter, CRT, printers, Hard disks,
floppy disks, magnetic tapes etc.

Peripherals are connected to the microcomputer through electronic circuits known as


interfacing circuits

Input-Output Interface
Input-Output Interface is used as a method which helps in transferring of
information between the internal storage devices i.e. memory and the
external peripheral device . A peripheral device is that which provide input
and output for the computer, it is also called Input-Output devices. For
Example: A keyboard and mouse provide Input to the computer are called
input devices while a monitor and printer that provide output to the
computer are called output devices. Just like the external hard-drives, there
is also availability of some peripheral devices which are able to provide both
input and output.

In micro-computer base system, the only purpose of peripheral devices is


just to provide special communication links for the interfacing them with
the CPU. To resolve the differences between peripheral devices and CPU,
there is a special need for communication links.

Input Output Ports


Ports: The connection point acts as an interface between the computer and
external devices like printers, modems, etc.

There are two types of ports :


1.Internal Port: It connects the system’s motherboard to internal devices

like hard disk, CD drive, internal Bluetooth, etc.

2.External Port: It connects the system’s motherboard to external devices

like a mouse, printer, USB, etc.


Some important types of ports are as per follows:
1. Serial Port :

•Used for external modems and older computer mouse

•Two versions-9pin,25pin

•Data travels at 115 kilobits per second

2. Parallel Port :
Aiming for a top All India Rank in GATE CS/IT or GATE DA 2026? Our
courses, led by experts like Khaleel Sir, Chandan Jha Sir, and Vijay Agarwal
Sir, offer live classes, practice problems, doubt support, quizzes, and All
India Mock Tests—all in one place.
•Used for scanners and printers

•25 pin model

3. Universal Serial Bus (or USB) Port :


•It can connect all kinds of external USB devices such as external hard

disks, printers, scanners, mouse, keyboards, etc.

•Data travels at 12 megabits per second.

4. Firewire Port :
•Transfers large amounts of data at a very fast speed.

•Connects camcorders and video equipment to the computer.

•Data travels at 400 to 800 megabits per second.

5. Ethernet Port :
•Connects to a network and high-speed Internet.

•Data travels at 10 megabits to 1000 megabits per second depending

upon the network bandwidth.


What is an Interrupt?
The interrupt is a signal emitted by hardware or software when a process or
an event needs immediate attention. It alerts the processor to a high-
priority process requiring interruption of the current working process. In
I/O devices one of the bus control lines is dedicated for this purpose and is
called the Interrupt Service Routine (ISR).

Types of Interrupt
Event-related software or hardware can trigger the issuance of interrupt
signals. These fall into one of two categories: software interrupts or
hardware interrupts.

1. Software Interrupts
A sort of interrupt called a software interrupt is one that is produced by
software or a system as opposed to hardware. Traps and exceptions are
other names for software interruptions. They serve as a signal for the
operating system or a system service to carry out a certain function or
respond to an error condition. Generally, software interrupts occur as a
result of specific instructions being used or exceptions in the operation. In
our system, software interrupts often occur when system calls are made. In
contrast to the fork() system call, which also generates a software
interrupt, division by zero throws an exception that results in the software
interrupt.
2. Hardware Interrupts
In a hardware interrupt, all the devices are connected to the Interrupt
Request Line. A single request line is used for all the n devices. To request
an interrupt, a device closes its associated switch. When a device requests
an interrupt, the value of INTR is the logical OR of the requests from
individual devices.

Hardware interrupts are further divided into two types of interrupt

Maskable Interrupt: Hardware interrupts can be selectively enabled and


disabled thanks to an inbuilt interrupt mask register that is commonly
found in processors. A bit in the mask register corresponds to each
interrupt signal; on some systems, the interrupt is enabled when the bit is
set and disabled when the bit is clear, but on other systems, the interrupt is
deactivated when the bit is set.

•Spurious Interrupt: A hardware interrupt for which there is no source is

known as a spurious interrupt. This phenomenon might also be referred to

as phantom or ghost interrupts. When a wired-OR interrupt circuit is

connected to a level-sensitive processor input, spurious interruptions are

typically an issue. When a system performs badly, it could be challenging to

locate these interruptions.

Model of Data Transfer

What is Programmed I/O?


In this mode the data transfer is initiated by the instructions written in a
computer program. An input instruction is required to store the data from
the device to the CPU and a store instruction is required to transfer the data
from the CPU to the device. Data transfer through this mode requires
constant monitoring of the peripheral device by the CPU and also monitor
the possibility of new transfer once the transfer has been initiated. Thus
CPU stays in a loop until the I/O device indicates that it is ready for data
transfer. Thus programmed I/O is a time consuming process that keeps
the processor busy needlessly and leads to wastage of the CPU cycles. This
can be overcome by the use of an interrupt facility. This forms the basis for
the Interrupt Initiated I/O.
Advantages of Programmed I/O
•Provides simple and easy interfaces to programs.

•Direct access to interact with the CPU without involving any peripheral

devices in the process.

Disadvantages of Programmed I/O


•Synchronization is not efficient in terms of the CPU time as it will need to

loop waiting for the device to be ready.

•The CPU is idle and cannot handle any other task at the time it waits for the

I/O device to complete processing.

What is Interrupt Initiated I/O?


This mode uses an interrupt facility and special commands to inform the
interface to issue the interrupt command when data becomes available and
interface is ready for the data transfer. In the meantime CPU keeps on
executing other tasks and need not check for the flag. When the flag is set,
the interface is informed and an interrupt is initiated. This interrupt causes
the CPU to deviate from what it is doing to respond to the I/O transfer. The
CPU responds to the signal by storing the return address from the program
counter (PC) into the memory stack and then branches to service that
processes the I/O request. After the transfer is complete, CPU returns to the
previous task it was executing. The branch address of the service can be
chosen in two ways known as vectored and non-vectored interrupt. In
vectored interrupt, the source that interrupts, supplies the branch
information to the CPU while in case of non-vectored interrupt the branch
address is assigned to a fixed location in memory.
What is DMA?
Direct Memory Access (DMA) is a feature or method used in computer
systems that allows certain hardware components to access the system's
main memory (RAM) without requiring the central processing unit (CPU) for
each data transfer. DMA is generally used to improve data transfer
efficiency between peripheral devices and memory.

Direct Memory Access (DMA)

1.Data Transfer Management: DMA controllers govern data transfers


between peripheral devices (such as hard drives, network cards, or
GPUs) and system memory. They can read data from or write data to
memory on these devices' behalf.

2.Data Direction Control: DMA controllers can be designed to


regulate the direction of data transfers from a peripheral device to
memory (read) or from memory to a peripheral device (write).

3.Address Generation: DMA controllers produce memory addresses


for data transfer activities. They may be set to automatically increase
or decrease memory addresses, making them appropriate for block
transfers.

4.Data Block Management: DMA controllers can transmit data in


blocks rather than sending each individual byte or word
independently. This increases efficiency since fewer control signals are
required for greater transfers.

5.Prioritization: Some DMA controllers enable prioritization, which


allows particular devices or channels to take precedence over others
when the DMA controller's resources are in competition.

6.Error Handling: To preserve data integrity during transfers, DMA


controllers may include error detection and handling techniques. They
can notify faults to the CPU so that necessary action can be taken.

7.Channel Management: DMA controllers may contain numerous


channels or request lines, each of which is linked with a different
peripheral device. They are in charge of allocating these channels to
devices that require DMA transfers.

8.Interrupt Generation: When a data transfer is completed, DMA


controllers can produce an interruption to inform the CPU, letting it
perform any post-transfer activities or error circumstances.

9.Bus Arbitration: In systems with several DMA-capable devices, the


DMA controller may execute bus arbitration to ensure that competing
devices have equal access to the system bus.

10.Buffering: Some DMA controllers may incorporate buffers to hold


data temporarily during transfers, which can assist smooth out
fluctuations in data transfer speeds between peripherals and memory.

11.Cycle Stealing: In systems with limited DMA capabilities, the DMA


controller may operate in cycle-stealing mode, taking control of the
bus for brief periods of time and transferring tiny quantities of data
between peripheral and memory.

DMA's primary purpose is to increase overall system speed and efficiency by


offloading data transfer responsibilities off the CPU. DMA saves CPU
overhead by allowing peripheral devices to directly access memory,
ensuring that data transfers occur at the fastest feasible speed enabled by
the hardware. This is especially true for operations involving huge amounts
of data, such as disc I/O, network connectivity, and multimedia processing.

What is I/O Channels?


I/O Channels is an extension of the DMA concept. It has ability to execute
I/O instructions using special-purpose processor on I/O channel and
complete control over I/O operations. Processor does not execute I/O
instructions itself. Processor initiates I/O transfer by instructing the I/O
channel to execute a program in memory.

Advantages of I/O Channels


•I/O channels use their own processors for their I/O tasks and operation.

•It reduces the CPU workload for I/O operations because it directly connects

to the main memory.

•It is responsible for handling errors that arises from I/O operations and

tasks.

Disadvantages of I/O Channels

•Multiple tasks run simultaneously which is complex when there is a large

amount of data.

•Multiple I/O processors causes a Synchronization issues.

•Hardware components present in I/O channels are costly.

Serial Communication

What is Synchronous Transmission?


In Synchronous Transmission, data is sent in the form of blocks or frames.
This transmission is the full-duplex type. Between sender and receiver,
synchronization is compulsory. In Synchronous transmission, There is no
time gap present between data. It is more efficient and more reliable than
asynchronous transmission to transfer a large amount of data.

Both the sender and receiver are synchronized with a common clock signal.
This means they operate at the same speed and know exactly when to send
and receive data. Data is sent in a continuous stream, with each byte or
chunk of data following the previous one without any gaps. It’s efficient for
sending large amounts of data quickly because there’s less overhead (extra
bits) needed to start and stop the transmission.

Example:
• Chat Rooms

• Telephonic Conversations

• Video Conferencing

What is Asynchronous Transmission?


In Asynchronous Transmission, data is sent in form of byte or character. This
transmission is the half-duplex type transmission. In this transmission start
bits and stop bits are added with data. It does not require
synchronization. Asynchronous transmission is like sending individual text
messages without knowing exactly when the other person will read them.
The sender and receiver do not share a common clock signal. Instead, data
is sent one byte or character at a time, with start and stop bits indicating
the beginning and end of each byte. Each piece of data is sent
independently, with gaps in between, allowing the receiver to process each
byte as it arrives. It’s flexible and simpler to implement, especially useful for
communications where data is sent intermittently.
Example:
• Email

• Forums

• Letters

You might also like