Asynchronous Data Transfer
Asynchronous Data Transfer
Introduction
• The I/O subsystem provides an efficient mode of
communication between CPU and outside
environment
• Devices that are under the direct control of
computer are said to be connected on-line
• Input or output devices attached to the computer
are also referred as peripherals.
• I/O interface provides a method for transferring
information between internal storage and
external i/o devices.
I/O interface
Resolves the differences between the computer and peripheral devices
• Peripherals - Electromechanical Devices
• CPU or Memory - Electronic Device
• - Unit of Information
• Peripherals - Byte
• CPU or Memory - Word
• - Operating Modes
• Peripherals - Autonomous, Asynchronous
• CPU or Memory - Synchronous
I/O Bus and Memory Bus
Functions of Buses
Bus
•Multiple I/O devices may be connected to the processor and the memory via a bus.
•Bus consists of three sets of lines to carry address, data and control signals.
•Each I/O device is assigned an unique address.
•To access an I/O device, the processor places the address on the address lines.
•The device recognizes the address, and responds to the control signals.
Accessing I/O devices (contd..)
I/O devices and the memory may share the same
address space:
Memory-mapped I/O.
Any machine instruction that can access memory can be used to transfer
data to or from an I/O device.
Simpler software.
Input device
•I/O device is connected to the bus using an I/O interface circuit which has:
- Address decoder, control circuit, and data and status registers.
•Address decoder decodes the address placed on the address lines thus enabling the
device to recognize its address.
•Data register holds the data being transferred to or from the processor.
•Status register holds information necessary for the operation of the I/O device.
•Data and status registers are connected to the data lines, and have unique addresses.
•I/O interface circuit coordinates I/O transfers.
Peripheral Devices
PERIPHERAL DEVICES
Input Devices Output Devices
• Keyboard • Card Puncher, Paper Tape Puncher
• Optical input devices • CRT
- Card Reader • Printer (Impact, Ink Jet,
- Paper Tape Reader Laser, Dot Matrix)
- Bar code reader • Plotter
- Digitizer • Analog
- Optical Mark Reader • Voice
• Magnetic Input Devices
- Magnetic Stripe Reader
• Screen Input Devices
- Touch Screen
- Light Pen
- Mouse
• Analog Input Devices
Bar Code Reader
A barcode reader (or barcode
scanner) is an electronic device
for reading printed barcodes.
Like a flatbed scanner, it consists
of a light source, a lens and a light
sensor translating optical
impulses into electrical ones.
Additionally, nearly all barcode
readers contain decoder circuitry
analyzing the barcode's image
data provided by the sensor and
sending the barcode's content to
the scanner's output port.
Digitizer
Punched tape :
• form of data storage, consisting of a
long strip of paper in which holes are
punched to store data.
• Now effectively obsolete,
• it was widely used during much of the
Paper tape twentieth century for teleprinter
communication, for input to computers
of the 1950s and 1960s, and later as a
storage medium for minicomputers and
CNC machine tools.
Paper tape Puncher
With paper tape, the
characters are punched
into a long tape in
sequence. This has also
provided the model for
the simple file formats
used by the Unix
operating system, the
Internet and
microprocessors
Punched Cards
Another storage medium, developed by IBM at the beginning
of the century, was standard-sized punchcards, which were
used in mainframe computers.
There was room for 80 characters on each card, and this line-
length was later adopted by many file formats used in data
communication in mainframes, and later in terminals.
I/O BUS AND INTERFACE MODULES
I/O bus
Data
Processor Address
Control
Keyboard
and Printer Magnetic Magnetic
display disk tape
terminal
Interface
- Decodes the device address (device code)
- Decodes the commands (operation)
- Provides signals for the peripheral controller
- Synchronizes the data flow and supervises
the transfer rate between peripheral and CPU or Memory
Typical I/O instruction
Op. code Device address Function code
(Command)
CONNECTION OF I/O BUS
Connection of I/O Bus to CPU
Op. Device Function Accumulator Computer
code address code register I/O
control
CPU
Sense lines
Data lines
Function code lines
I/O
bus
Device address lines
I/O BUS AND MEMORY BUS
Functions of Buses
* MEMORY BUS is for information transfers between CPU and the MM
* I/O BUS is for information transfers between CPU
and I/O devices through their I/O interface
Physical Organizations
* Many computers use a common single bus system
for both memory and I/O interface units
- Use one common bus but separate control lines for each function
- Use one common bus with common control lines for both functions
* Some computer systems use two separate buses,
one to communicate with memory and the other with I/O interfaces
I/O Bus
- Communication between CPU and all interface units is via a common
I/O Bus
- An interface connected to a peripheral device may have a number of
data registers , a control register, and a status register
- A command is passed to the peripheral by sending
to the appropriate interface register
- Function code and sense lines are not needed (Transfer of data, control,
and status information is always via the common I/O Bus)
Input/Output Interfaces
Memory-mapped I/O
- A single set of read/write control lines
(no distinction between memory and I/O transfer)
- Memory and I/O addresses share the common address space
-> reduces memory address range available
- No specific input or output instruction
-> The same memory reference instructions can be used for I/O
transfers
- Considerable flexibility in handling I/O operations
I/O INTERFACE
Port A I/O data
register
Bidirectional Bus
data bus buffers
Port B I/O data
register
Handshaking
- A control signal is accompanied with each data being transmitted to
indicate the presence of data
- The receiving unit responds with another control signal to acknowledge
receipt of the data
STROBE CONTROL
* Employs a single control line to time each transfer
* The strobe may be activated by either the source or
the destination unit
Strobe Strobe
HANDSHAKING
Strobe Methods
Source-Initiated
Destination-Initiated
Valid data
Data bus
Timing Diagram
Data valid
Data accepted
Data valid
Valid data
Data bus