Sei sulla pagina 1di 3



When we discuss interfacing, We are interested in 2 things:
Designing logic circuits (hardware) and writing instructions (software) to enable the
microprocessor to communicate with peripherals (I/O devices).

The logic circuits are called I/O ports or interfacing devices.

ͻ The microprocessor communicates with its peripherals in either of two formats:
ͻ Synchronous:
ʹ At the same time.
ʹ The transmitter and receiver are synchronized with the same clock.
ͻ Asynchronous:
ʹ At irregular intervals.

ͻ The Synchronous format is used in high-speed data transmission.

ͻ The Asynchronous format is used for low speed data transmission.
ͻ Data transfer between the microprocessor and peripherals is primarily synchronous.

ͻ The microprocessor receives (or transmits) binary data in either of two modes:
ͻ Parallel
The entire word (4-bit, 8-bit, 16-bit) is transferred at one time.
ͻ Serial
Data are transferred one bit at a time over a single line.
ͻ Requires parallel-to-serial or serial-to-parallel conversion.

The microprocessor identifies the peripherals based on their interfacing technique either as:
ͻ Memory-mapped
A peripheral is connected as if it were a memory location.
It is identified with a 16-bit address.
Data transfer is implemented using memory-related inst.
ͻ Peripheral-mapped
A peripheral is identified with an 8-bit address.
The microprocessor uses special instructions to implement data transfer.

There are two ways to control the transfer of data between the microprocessor and its
ͻ Microprocessor-controlled:
The microprocessor initiates the communication with the peripheral. (when peripherals
are slow)
ͻ Peripheral-controlled:
The peripheral initiates the communication.


Microprocessor-controlled data transfer can take place under five different conditions:
ͻ Unconditional
ͻ Polling (Status check)
ͻ Interrupt
ͻ With READY signal
ͻ With Handshake signal

The microprocessor assumes that the peripheral is always available.
For example, displaying data at LED port involves simply enabling the port, transfers data, and
going to execute the next inst.

   !   "#
The microprocessor is kept in a loop to check whether data are available. For example, reading
data from the Keyboard.

When a peripheral is ready to transfer data, it sends an interrupt signal to the microprocessor.
The microprocessor stops executing the program, accepts/sends the data from/to the
peripheral, and then return to the program.

    &  '()
Usually happens when the peripheral͛s response time is slower than the execution time of the
The READY signal can be used to extend the execution time (By adding T-states). And is
commonly used in a system with slow memory chips

    &  ,   "   
Signals are exchanged between the microprocessor and a peripheral prior to actual data
This is to ensure the readiness of the peripheral and to synchronize the timing of the data
An Example of that would be, interfacing A/D converter
Handshake signals can be used with status check or interrupts.
This is used when the device is much faster than the microprocessor.
An example would be the DMA.
ʹ The DMA controller sends a HOLD signal to the microprocessor.
ʹ The microprocessor releases the system bus.
ʹ The data are transferred at high speed without the intervention of the microprocessor

(   c