Chapter 8
Chapter 8
Code: SEng3022
Set by :
Molla K.
1
Chapter Eight
Input-Output Organization
2
Out Lines
Peripheral Devices
Input-Output Interface
Mode of Transfers
Priority Interrupts
Input-Output Processor(IOC)
Serial Communication
3
Peripheral Devices
Input or output devices attached to the computer is know as peripherals. Example:
keyboard display unit and printers.
A Peripherals device is a device that is connected to computer system but is not part
of the core computer system architecture.
E.G. Keyboard, video monitor, display units and printers are common peripheral devices.
The IO subsystem of a computer, provides an efficient mode of communication
between the central system and outside environment.
Allows both input(from outside world to computer) as well as, output(from
computer to the outside world). Example: Touch screen
4
Cont’d
An external device connected to an IO unit also called Interface is referred to as
peripheral devices or simply a peripheral.
External devices can classified into three categories
5
Cont’d
6
Cont’d
9
Input-Output Interface…..cont.
10
Asynchronous Data Transfer
Asynchronous data transfer is a method of data transmission where data is sent in a non-continuous, non-
synchronous manner.
This type of transfer is commonly used in computer networks and communication systems where data is
transferred between two or more devices. Two units are independent and each has its own private clock.
If the registers in the interface share a common clock with the CPU registers, the transfer between the two
units is said to be synchronous and which means at the same time and has common clock.
Asynchronous data transfer between two independent units requires that control signal be transmitted between
the communicating units to indicate the time at which data is being transmitted.
Two methods can achieve asynchronous data transfer :
The strobe control: A strobe pulse is supplied by one unit to indicate to the other unit when the transfer is
occurred.
Handshaking: this method is commonly used to attend each data item being transferred with a control signal that
indicates data in the bus. This unit receiving the data item responds with another signal to acknowledge receipt
11
of data.
Asynchronous Data Transfer
Two methods can achieve asynchronous data
transfer :
The strobe control: A strobe pulse is supplied by
one unit to indicate to the other unit when the
transfer is occurred
Handshaking: this method is commonly used to
attend each data item being transferred with a
control signal that indicates data in the bus. This
unit receiving the data item responds with
another signal to acknowledge receipt of data.
The strobe pulse and handshaking method of
asynchronous data transfer is not restricted to
I/O transfer.
12
Mode of Transfers
Modes of data transfer in COA refer to the different methods by which data can be
exchanged between the central processing unit (CPU) and peripheral devices.
The binary information that is received from an external device is usually stored in the
memory unit.
Mode of transfers is the way of transferring information from and to internal and
external storage.
Three methods are possible for I/O operations or data transfer mode. They are:-
o Programmed I/O
16
Interrupt
An interrupt is an event that alters the sequence in which the processor executes instructions.
Interrupt is the method of creating a temporary halt during program execution and allows peripheral
devices to access the microprocessor.
The process of interrupting the normal execution of the program to carry out the specific task is called
as an Interrupt.
An interrupt is either a hardware generated CALL (externally derived from a hardware signal) or a
software generated CALL (internally derived from the execution of an instruction or by some other
internal event).
Any type interrupts the program by calling an interrupt service procedure (ISP) or interrupt handler.
The interrupts of the entire Intel family of microprocessors include two hardware pins that request
interrupts (INTR and NMI), and one hardware pin ( ) that acknowledges the interrupt requested
through INTR. 17
Cont’d
Data transfer between CPU and IO device is initiated by the CPU. How ever the CPU cannot start the transfer
unless the device is ready to communicate with the CPU.
When two devices interrupt the computer at the same time, the computer services the devices with the higher
priority first.
20
Interrupt Driven I/O
With interrupt driven IO, the CPU issue a command to IO module and it does not wait
until IO operation is complete but instead continues to execute other instructions.
When IO module has completed its work it interrupt s the CPU
Using Interrupt Driven IO method CPU issues read command.
An interrupt is an exception condtion in a computer system caused by an event external
to the CPU.
Interrupts enable transfer of control from one program to another to be initiated by an
event that is external to a computer.
Execution of the interrupt program resumes after completion of execution of the
Interrupt Service Routine.
19
Interrupt Driven I/O
An interrupt is an exception condition in a computer system caused by an event external to the
CPU.
Interrupts are commonly used in IO operations by a device interface (or controller) to notify the
CPU that it has completed an IO operation.
An interrupt is indicated by a signal sent by the device interface to the CPU via an interrupt
request line (on an external bus).
In Interrupt-Driven I/O, the CPU initiates the I/O operation and then continues with
other tasks.
When the I/O operation is complete, the I/O device generates an interrupt, causing the
CPU to suspend its current task and handle the interrupt by servicing the I/O operation.
20
Direct Memory Access[DMA]
DMA allows peripheral devices to transfer data directly from and to memory without the intervention of the
CPU .
The data transfer performs without intervention of CPU.
The DMA controller is a piece of hardware that controls one or more peripheral devices.
DMA controller allows devices to transfer data to or from the system's memory without the help of the
processor.
The DMA IO technique provides direct access to the memory while the CPU is temporarily disabled.
A DMA controller temporarily borrows the address bus, data bus, and control bus from the CPU and transfers the
data bytes directly between an IO port and a series of memory locations.
Two control signals are used to request and acknowledge a DMA transfer in the CPU based system.
The HOLD signal is a bus request signal which asks the CPU to release control of the buses after the current
bus cycle.
The HLDA signal is a bus grant signal which indicates that the CPU has certainly released control of its buses by
placing the buses at their high-impedance states. 23
Cont’d
The DMA controller takes over the buses to manage the transfer directly between the I/O devices and
the memory unit.
Input-Output Processor(IOC)
An Input Output Processor is a hardware
component of a computer system responsible for
controlling the flow of data between the CPU and
peripheral devices such as keyboards, mice,
printers, scanners, and storage devices.
The IOP is just like a CPU that handles the
details of I/O operations
27
Asynchronous or Synchronous
Synchronous Transmission
o In synchronous Transmission , the data will be created with the
help of combining the groups of bits. That data will be
continuously sent in time with a master clock.
o It uses a synchronized clock frequency to operate the data of
sender or receiver.
o In synchronous communication, there is no need to use the gaps,
start bits and stop bits.
o On the basis of the timing being synced correctly between the
sender and receiver devices, the data accuracy is totally dependent.
o The synchronous serial transmission is more expensive as
compared to asynchronous serial transmission.
o data is sent in form of blocks or frames. This transmission is the
full-duplex type. 28
Asynchronous Communication
o Asynchronous Transmission
In asynchronous Transmission , the groups of bits will be treated as
an independent unit, and these data bits will be sent at any point in
time.
In order to make synchronization between sender and receiver, the
stop bits and start bits are used between the data bytes.
These bits are useful to ensure that the data is correctly sent.
The time taken by data bits of sender and receiver is not constant,
and the time between transmissions will be provided by the gaps.
Data is sent in form of byte or character. This transmission is the
half-duplex type transmission.
In asynchronous communication, we don't require harmonization between the sender and receiver devices,
which is the main advantage of asynchronous communication. 29
Serial Communication: Type of Transmission Mode
On the basis of the data transfer rate and the type of transmission mode, serial communication
will take many forms.
The transmission mode can be classified into simplex, half-duplex, and full-duplex.
Each transmission mode contains the source, also known as sender or transmitter, and
destination, also known as the receiver.
Simplex transmission Mode
A simplex line carries information in one direction only.
This mode is rarely used in data communication because
the receiver cannot communicate to the transmitter with
indicate the occurrence of error.
Examples of simplex transmission are radio and television
broadcasting .
30
Serial Communication: Type of Transmission Mode
II. Half Duplex Mode
Half duplex transmission system is one that have capable of
transmitting in both direction but, data can transmitted in
only one direction at a time.
A pair of wire is needed for mode
III. Full Duplex Mode
A full duplex transmission can send and receive data in both directions
simultaneously.
This can be achieved by means of a four wire link, with a different
pair of wires dedicated to each direction of transmission.
The communication lines, modems and other equipment used in the
transmission of information between two more stations is called data
31
link .
Cont’d
32
Reading ASS.
Types of DMA transfer using DMA controller
Parallel communication