CH 8

Download as pptx, pdf, or txt
Download as pptx, pdf, or txt
You are on page 1of 25

Admas University

Department of Computer Science


Computer Organization and Architecture

Chapter-8
1

Input/Output Organization
 Peripheral devices
 Input-output interface
 Asynchronous data transfer
 Mode of transfer
 Priority interrupts
 Direct memory access (DMA)
Outlines  Input-Output Controller (IOC)
2  Serial communication
Peripheral devices
3
 Peripheral devices, also known as peripherals, are external devices that connect to a
computer or other electronic device to provide additional functionality or input/output
capabilities.
 They extend the capabilities of the main computer system and allow users to interact with
and control the computer.
 Peripheral devices can be categorized into several types based on their function and purpose.

 Peripheral devices play a crucial role in enhancing the functionality and usability of
computer systems.
 They enable users to interact with the computer, store and retrieve data, communicate with
other devices or networks, and perform specific tasks based on their intended purpose.
Here are some common types of peripheral devices:
4 1. Input Devices: These devices allow users to input data or commands into the
computer system. Examples include:
1. Keyboard: Used for typing text and entering commands.
2. Mouse: Used for pointing, clicking, and selecting objects on the screen.
3. Scanner: Used to convert physical documents or images into digital format.
4. Webcam: Used for capturing video and images.
5. Microphone: Used for recording audio or providing voice input.
2. Output Devices: These devices provide visual, audio, or printed output to the user.
Examples include:
1. Monitor or Display: Displays visual output from the computer.
2. Printer: Prints documents or images on paper.
3. Speakers or Headphones: Output audio or sound.
4. Projector: Projects the computer's screen onto a larger surface.
Cont’d…
5 3. Storage Devices: These devices are used to store and retrieve data.
Examples include:
1. Hard Disk Drives (HDDs): Provide long-term storage for files and programs.
2. Solid-State Drives (SSDs): Like HDDs but use flash memory for storage.
3. USB Flash Drives: Portable storage devices that connect via USB ports.
4. Optical Disc Drives: Read and write data on CDs, DVDs, or Blu-ray discs.
4. Communication Devices: These devices enable communication
between the computer and other devices or networks. Examples include:
5. Modem: Connects the computer to the internet or other networks.
6. Network Interface Card (NIC): Allows the computer to connect to a local area
network (LAN) or the internet.
7. Bluetooth Adapters: Enable wireless connectivity with other Bluetooth-enabled
devices.
input-output interface
6  An input-output interface, often referred to as an I/O interface, is a
hardware or software component that enables communication between
a computer or electronic device and external devices or systems.
 It facilitates the transfer of data and control signals between the
computer and peripherals, allowing for input and output operations.
 The purpose of an I/O interface is to provide a standardized and
efficient means of exchanging information between the computer and
peripheral devices.
Cont’d…
7
 Hardware I/O interfaces typically involve physical connectors or
ports on the computer system and the peripheral devices.
 These connectors may take different forms, such as USB ports,
Ethernet ports, audio jacks, HDMI ports, serial ports, parallel ports,
etc.

 Software I/O interfaces, on the other hand, involve protocols and


software drivers that facilitate communication between the computer's
operating system and the peripheral devices.
Cont’d…
 I/O interfaces enable various types of data transfer, including:
8
1. Input Operations: These involve receiving data or commands from
external devices or sources. Examples include reading data from a
keyboard, receiving signals from a mouse or touchscreen, or receiving
sensor data from environmental monitoring devices.
2. Output Operations: These involve sending data or signals to external
devices for display, or control purposes. Examples include sending
video output to a monitor, printing documents on a printer, or
controlling actuators in industrial systems.
3. Bidirectional Operations: Some interfaces support both input and
output operations simultaneously. For instance, a network interface
allows a computer to send and receive data over a network.
Asynchronous data transfer
9
 Asynchronous data transfer is a method of data transmission between
devices where the data is sent in individual, self-contained units without a
fixed timing or synchronization mechanism.
 In asynchronous communication, each data unit, often called a character or
byte, is preceded by start and stop bits to set the boundaries of the data.
 Here's a basic overview of how asynchronous data transfer works:

1. Start Bit: The sending device initiates the data transfer by transmitting a
start bit, which is always a specific value (usually logic low or 0). The start
bit indicates the beginning of a data unit.
Cont’d…
10
2. Data Bits: The actual data bits are then transmitted one by one, typically least
significant bit (LSB) first.

 Each data bit represents a binary value (0 or 1) to convey the information being
transmitted.

3. Stop Bit(s): After the data bits, one or more stop bits are sent. The stop bit(s)
signal the end of the data unit and provide a period for the receiving device to prepare
for the next character.

 Like the start bit, the stop bit(s) are usually a specific value (commonly logic high
or 1).
Cont’d…
11
 The use of start and stop bits in asynchronous communication allows devices to
transmit data without requiring a shared clock signal or strict synchronization
between the sending and receiving devices.

 Instead, both devices rely on the start and stop bits to identify and interpret the
transmitted data.
Some key characteristics and considerations of asynchronous data transfer include:
• Variable Timing: Asynchronous transmission does not require a fixed timing or
regular data rate. Each character can be transmitted at its own pace and does not
rely on a continuous clock signal.
• Flexibility: The sender and receiver devices do not need to operate at the same
clock speed or have synchronized clocks. This allows devices with different
capabilities or clock rates to communicate with each other.
Mode of Transfer
12
 the mode of transfer refers to how data is transferred between the input/
output devices and the computer system.

 The mode of transfer can vary based on the specific I/O organization
used.

 The choice of mode of transfer in I/O organization depends on factors


such as the speed requirements of the I/O devices, the processing
capabilities of the CPU, and the overall system design.

 Here are some common modes of transfer in I/O organization:


Cont’d…
13
1. Programmed I/O (PIO): It also known as polling, the transfer of data
between the I/O devices and the computer system is controlled by the CPU
through program instructions.
 The CPU continuously checks the status of the I/O devices to determine
if they are ready to send or receive data.
 Once the device is ready, the CPU issues commands to transfer the data
between the device and the memory.
 This mode requires the CPU to actively manage and control the data
transfer process.
Cont’d…
2. Interrupt-Driven I/O: In interrupt-driven I/O, the I/O devices are equipped with
14
hardware interrupt lines that are connected to the CPU.

 When an I/O device is ready to send or receive data, it sends an interrupt signal to
the CPU to request attention.

 Upon receiving the interrupt, the CPU suspends its current task and services the I/O
request.

 The data transfer occurs between the device and memory without direct involvement
of the CPU.

 This mode reduces the CPU's involvement in managing the data transfer process and
allows it to perform other tasks while waiting for I/O operations to complete.
Cont’d…
15
3. Direct Memory Access (DMA): DMA is a mode of transfer that allows data to be
transferred directly between the I/O devices and memory without CPU intervention.

 A dedicated DMA controller takes control of the data transfer process, accessing
the data from the I/O device and directly writing it to or reading it from memory.

 The CPU initiates the DMA transfer by setting up the DMA controller with the
necessary parameters and then continues with other tasks while the data transfer
occurs independently.

 DMA is particularly useful for high-speed data transfers, as it offloads the CPU
from handling every individual data transfer.
Priority interrupts
16  Priority interrupts, also known as prioritized interrupts, are a mechanism
used in computer systems to handle multiple interrupt requests from
various devices or sources based on their assigned priority levels.

 The priority scheme allows the system to determine the order in which
interrupts are serviced when multiple interrupt requests occur
simultaneously.

 In a system with priority interrupts, each interrupt source is assigned a


priority value or code, usually represented by a numerical value.
Cont’d…
17
 The system's interrupt controller or interrupt handling mechanism uses these
priority levels to determine which interrupt should be serviced first when multiple
interrupts are pending.

 When an interrupt request occurs, the system checks the priority level of the
interrupt and compares it with the priorities of any other pending interrupts.

 The highest priority interrupt is then serviced first, and the system executes the
corresponding interrupt service routine (ISR) associated with that interrupt source.
Input-Output Controller (IOC)
18
 An Input-Output Controller (IOC) is a hardware component or module that
manages the input and output operations of a computer system.
 The IOC acts as an intermediary or interface between the central processing
unit (CPU) and the input/output (I/O) devices connected to the system.
 The primary functions of an IOC include:

1. I/O Device Communication: The IOC facilitates communication between


the CPU and the I/O devices.
 It manages the data transfers between the CPU and the devices, ensuring
proper synchronization and coordination.
Cont’d…
19
2. Address Decoding: The IOC decodes the I/O device addresses and
translates them into appropriate memory addresses that the CPU can
access.
 It enables the CPU to identify and communicate with specific I/O
devices.

3. Data Buffering: The IOC often includes data buffers or registers to


temporarily store data during input or output operations.
 These buffers help to smooth out the different data transfer rates
between the CPU and the I/O devices, ensuring efficient data flow.
Cont’d…
20
4. Interrupt Handling: The IOC manages interrupt signals from the
I/O devices. It receives and prioritizes interrupt requests, generates
interrupt signals for the CPU, and coordinates the interrupt handling
process.

5. Device Status Monitoring: The IOC monitors the status of the I/O
devices, such as their readiness, availability, and error conditions.
 It communicates this information to the CPU, allowing the system
to respond appropriately.
Cont’d…

21
6. DMA Control (in some cases): Some IOCs include Direct

Memory Access (DMA) controllers that enable high-speed data


transfers between the I/O devices and the system memory without
CPU intervention.
 The DMA controller within the IOC takes control of the data
transfer process, improving overall system performance.
 Overall, the IOC plays a crucial role in managing the flow of data
between the CPU and the I/O devices, ensuring efficient and
reliable input and output operations.
Serial communication
 Serial communication is a method of transmitting data one bit at a time sequentially over a single
22
channel or wire.

 It is widely used for communication between computers and peripherals, embedded systems, and

various electronic devices.

 In serial communication, data is sent as a stream of bits, typically using two signal lines: one for

transmitting (TX) and one for receiving (RX).

 Here's an overview of how serial communication works:

 Start Bit: The transmission of each data byte typically starts with a start bit, which is a low-level

signal.

 The start bit indicates the beginning of the data byte and prepares the receiving device to start

reading the incoming bits.


Cont’d…
23  Data Bits: After the start bit, the actual data bits are transmitted one by one. The number
of data bits per byte can vary, commonly ranging from 7 to 9 bits. The data bits represent
the actual information being transmitted.

 Parity Bit (optional): In some cases, a parity bit is included after the data bits. The
parity bit is used for error detection and can be set to odd parity, even parity, or no parity.
The receiving device checks the received data and parity bit to detect and possibly
correct errors.

 Stop Bit(s): After the data bits (and parity bit, if present), one or more stop bits are

transmitted. The stop bit(s) are high-level signals that indicate the end of the data byte.

 The stop bit(s) provide a small delay before the next start bit to allow for

synchronization.
Cont’d…
24
The timing and synchronization
 Both the transmitting and receiving devices must be configured with the same baud rate, which specifies
the number of bits transmitted per second.

 The baud rate determines the speed of data transfer and ensures that the sender and receiver are
synchronized.

 Serial communication is often preferred in situations where simplicity, low cost, and ease of implementation
are important.

 It allows for communication over longer distances compared to parallel communication, which requires
multiple wires for data transmission.

 However, serial communication generally has a slower data transfer rate compared to parallel
communication.

 The choice of serial communication protocol and interface depends on the specific requirements of the
!!
25

You
h a n k
T A
Q &

You might also like