Professional Documents
Culture Documents
Chapter 5A
Chapter 5A
Interfacing and
Communications
-HANDSHAKING, BUFFERING,
PROGRAMMED I/O, INTERRUPT
Introduction
Is necessary because:
•Different formats required by the devices
•Incompatibilities in speed between the devices
and the CPU make synchronization difficult
•Burst of data vs streaming data
•Device control requirements that would tie up
too much CPU time
Simple I/O Configuration
More Complex I/O Module
I/O Module Functions
• Recognizes messages from device(s) addressed to it
and accepts commands from the CPU
• Provides a buffer where the data from memory can be
held until it can be transferred to the device
• Provides the necessary registers and controls to
perform a direct memory transfer
• Physically controls the device
• Copies data from its buffer to the device/from the
CPU to its buffer
• Communicates with CPU
I/O Techniques
• Buffering
• Handshaking
• Programmed I/O
– CPU controlled I/O
• Interrupt Driven I/O
– External input controls
• Direct Memory Access Controllers
– Method for transferring data between main
memory and a device that bypasses the CPU
Buffering
• A method where a buffer holds the data and
release a part of it at particular times.
• A region of memory used to temporarily hold
data while it is being moved from one place to
another.
• Buffers can be implemented in either hardware
or software, but majority of buffers are
implemented in software
Handshaking
• A brief back-and-forth series of requests and
acknowledgements to request a connection.
• If the negotiation is successful, a connection is
opened.
• This connection is logically a full-duplex
connection.
• A web browser application use this technique
to establish connection in the Internet
Programmed I/O
• I/O data and address registers in CPU (CPU
controlled I/O).
• One word transfer per I/O instruction
• Address information for each I/O device included (for
multiple devices).
• Full instruction fetch/execute cycle (slow).
• Primary use:
– keyboards
– communication with I/O modules (i.e.. the transmission
of commands through a network I/O module or modem)
Programmed I/O Example
Interrupt Driven I/O
• Peripheral devices may demand the attention of the
microprocessor during normal program execution
• What is an interrupt?