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

Data Transfer

1. Synchronous : All devices derive the timing information from common clock line.
2. Asynchronous: No common clock
Require control signals
1. Strobe Pulse
2. Handshaking

4/20/22 1
Strobe Control

4/20/22 2
Handshaking
Source initiated transfer using handshake

Block Diagram

Timing Diagram

Sequence of events

4/20/22 3
Handshaking
Destination initiated transfer using handshake

Block Diagram

Timing Diagram

Sequence of events

4/20/22 4
Asynchronous data transmission
A transmitted character can be detected by the receiver from knowledge of the
transmission rules:
1. When a character is not being sent, the line is kept in the 1-state.
2. The initiation of a character transmission is detected from the start bit, which
is always 0.
3. The character bits always follow the start bit.
4. After the last bit of the character is transmitted, a stop bit is detected when
the line returns to the 1-state for at least one bit time.
4/20/22 5
Input / Output Subsystem
There are three basic forms of input and output systems

Programmed I/O

Interrupt driven I/O

Direct Memory Access(DMA)

4/20/22 6
Input / Output Subsystem
Programmed I/O: With programmed I/O, the processor executes a program that
gives its direct control of the I/O operation, including sensing device status,
sending a read or write command, and transferring the data.
Interrupt driven I/O: With interrupt driven I/O, the processor issues an I/O
command, continues to execute other instructions, and is interrupted by the I/O
module when the I/O module completes its work.
DMA: In Direct Memory Access (DMA), the I/O module and main memory
exchange data directly without processor involvement.
4/20/22 7
I/O Commands
There are four types of I/O commands that an I/O module will receive when it is
addressed by a processor
Control : Used to activate a peripheral device and instruct it what to do. These
commands are specific to a particular type of peripheral device.                      
Test : Used to test various status conditions associated with an I/O module and
its peripherals. The processor will want to know if the most recent I/O operation
is completed, or any error has occurred. 
                            
4/20/22 8
I/O Commands
                   
Read : Causes the I/O module to obtain an item of data from the peripheral and
place it in the internal buffer. 
                                 
Write : Causes the I/O module to take an item of data ( byte or word ) from the
data bus and subsequently transmit the data item to the peripheral.

4/20/22 9
Programmed I/O
With programmed I/O, the processor
executes a program that gives its
direct control of the I/O operation,
including sensing device status,
sending a read or write command,
and transferring the data.

4/20/22 10
Example

4/20/22 11
Example
The transfer of each byte requires three
instructions:
1. Read the status register.
2. Check the status of the flag bit and branch
to step 1 if not set or to step 3 if set.
3. Read the data register.

Flow chart for CPU program to input data

4/20/22 12
Interrupt driven I/O
With interrupt driven I/O, the processor issues an
I/O command, continues to execute other
instructions, and is interrupted by the I/O module
when the I/O module completes its work.

4/20/22 13
Direct Memory Access (DMA)

4/20/22 14
DMA Transfer

4/20/22 15
Direct Memory Access

4/20/22 16
DMA Modes of Operation
DMA performs data transfer operation. The different DMA transfer modes are as

follows:-

1. Burst or block transfer DMA

2. Cycle steal or single byte transfer DMA.

3. Transparent or hidden DMA.

4/20/22 17
1.
Burst or block transfer DMA
It is the fastest DMA mode. In this two or more data bytes are transferred continuously.

2. Processor is disconnected from system bus during DMA transfer. N number of machine
cycles are adopted into the machine cycles of the processor where N is the number of
bytes to be transferred.

3. DMA sends HOLD signal to processor to request for system bus and waits for HLDA signal.

4. After receiving HLDA signal, DMA gains control of system bus and transfers one byte. After
transferring one byte, it increments memory address, decrements counter and transfers
next byte.
5. In this way, it transfer all data bytes between memory and I/O devices. After transferring
all data bytes, the DMA controller disables HOLD signal & enters into slave mode.

4/20/22 18
Cycle steal or single byte transfer DMA
1. In this mode only one byte is transferred at a time. This is slower than burst
DMA.

2. DMA sends HOLD signal to processor and waits for HLDA signal on receiving
HLDA signal, it gains control of system bus and executes only one DMA cycle.

3. After transfer one byte, it disables HOLD signal and enters into slave mode.

4. Processor gains control of system bus and executes next machine cycle. If
count is not zero and data is available then the DMA controller sends HOLD
signal to the processor and transfer next byte of data block.
4/20/22 19
Transparent or Hidden DMA transfer
1. Processor executes some states during which is floats the address and data
buses. During this process, processor is isolated from the system bus.
2. DMA transfers data between memory and I/O devices during these states.
This operation is transparent to the processor.
3. This is slowest DMA transfer. In this mode, the instruction execution speed of
processor is not reduced. But, the transparent DMA requires logic to detect
the states when the processor is floating the buses.

4/20/22 20
Introduction to secondary memory devices
To store large amount of data or programs permanently, we need a cheaper and
permanent memory. Such memory is called secondary memory.
Depending on whether secondary memory device is part of CPU or not, there are two
types of secondary memory – fixed and removable.
Hard Disk Drive:Hard disk drive is made up of a series of circular disks called
platters arranged one over the other. Disks are made of non-magnetic material
like aluminum alloy and coated with 10-20 nm of magnetic material.
CD Drive:CDs are circular disks that use optical rays, usually lasers, to read and
write data.
CD-ROM (Compact Disk – Read Only Memory) − The data on these CDs are
recorded by the manufacturer. Proprietary Software, audio or video are released
on CD-ROMs.
CD-R (Compact Disk – Recordable) − Data can be written by the user once on the
CD-R. It cannot be deleted or modified later.
CD-RW (Compact Disk – Rewritable) − Data can be written and deleted on these
optical disks again and again.
DVD Drive:DVD stands for Digital Video Display. DVD are optical devices that can
store 15 times the data held by CDs. They are usually used to store rich
multimedia files that need high storage capacity. DVDs also come in three
varieties – read only, recordable and rewritable.
Pen Drive:Pen drive is a portable memory device that uses solid state memory rather
than magnetic fields or lasers to record data. It uses a technology similar to RAM, except
that it is nonvolatile. It is also called USB drive, key drive or flash memory.
Blu Ray Disk:Blu Ray Disk (BD) is an optical storage media used to store high definition
(HD) video and other multimedia filed. BD uses shorter wavelength laser as compared to
CD/DVD. This enables writing arm to focus more tightly on the disk and hence pack in
more data. BDs can store up to 128 GB data.
Characteristics of Secondary Memory
•It is non-volatile, i.e. it retains data when power is switched off
•It is large capacities to the tune of terabytes
•It is cheaper as compared to primary memory
• Connected to main memory through a bus and a device controller.
• Only occasionally interacts with CPU
• Contents are easily changed, but access is very slow compared to main
memory.
END
OF
CO - 3

4/20/22 24

You might also like