MIT Unit 4 Notes
MIT Unit 4 Notes
INTERFACE is the path for communication between two components. Interfacing is of two
types, memory interfacing and I/O interfacing.
MEMORY INTERFACING :
When we are executing any instruction, we need the microprocessor to access the memory for
reading instruction codes and the data stored in the memory. For this, both the memory and the
microprocessor requires some signals to read from and write to registers. The interfacing process
includes some key factors to match with the memory requirements and microprocessor signals.
The interfacing circuit therefore should be designed in such a way that it matches the memory
signal requirements with the signals of the microprocessor.
I/O INTERFACING
There are various communication devices like the keyboard, mouse, printer, etc. So, we need to
interface the keyboard and other devices with the microprocessor by using latches and buffers.
This type of interfacing is known as I/O interfacing.
Following is the list of 8085 pins used for interfacing with other devices –
A15 - A8 (Higher Address Bus)
AD7 - AD0(Lower Address/Data Bus)
ALE
RD
WR
READY
(Note: Explanation of all the above pins are available in Unit-1 notes)
There are two ways of communication in which the microprocessor can connect with the outside
world.
Serial Communication Interface
DMA stands for Direct Memory Access. It is designed by Intel to transfer data at the fastest rate.
It allows the device to transfer the data directly to/from memory without any interference of the
CPU. Using a DMA controller, the device requests the CPU to hold its data, address and control
bus, so the device is free to transfer data directly to/from the memory. The DMA data transfer is
initiated only after receiving HLDA signal from the CPU.
Features of 8257
The 8255A is a general purpose programmable I/O device designed to transfer the data from I/O to
interrupt I/O under certain conditions as required. It can be used with almost any microprocessor.
It consists of three 8-bit bidirectional I/O ports (24I/O lines) which can be configured as per the
requirement.
Ports of 8255A
8255 Architecture:
It is a tri-state 8-bit buffer, which is used to interface the microprocessor to the system data bus.
Data is transmitted or received by the buffer as per the instructions by the CPU. Control words and
status information is also transferred using this bus.
Read/Write Control Logic:
This block is responsible for controlling the internal/external transfer of data/control/status word.
It accepts the input from the CPU address and control buses, and in turn issues command to both
the control groups.
CS:
It stands for Chip Select. A LOW on this input selects the chip and enables the communication
between the 8255A and the CPU. It is connected to the decoded address, and A0 & A1 are
connected to the microprocessor address lines.
Their result depends on the following conditions –
CS A1 A0 Result
0 0 0 PORT A
0 0 1 PORT B
0 1 0 PORT C
0 1 1 Control Register
1 X X No Selection
WR:
It stands for write. This control signal enables the write operation. When this signal goeslow, the
microprocessor writes into a selected I/O port or control register.
RESET
This is an active high signal. It clears the control register and sets all ports in the input mode.
RD
It stands for Read. This control signal enables the Read operation. When the signal is low,the
microprocessor reads the data from the selected I/O port of the 8255.
A0 and A1
A1 A0 RD WR CS Result
Input Operation
0 0 0 1 0
PORT A → Data Bus
Output Operation
0 0 1 0 0
Data Bus → PORT A
The Intel 8253 and 8254 are Programmable Interval Timers (PTIs) designed for microprocessors
to perform timing and counting functions using three 16-bit registers. Each counter has 2 input
pins, i.e. Clock & Gate, and 1 pin for “OUT” output. To operate a counter, a 16-bit count is loaded
in its register. On command, it begins to decrement the count until it reaches 0, then it generates a
pulse that can be used to interrupt the CPU.
8253 8254
Reads and writes of the same counter cannot Reads and writes of the same counter can
be interleaved. be interleaved.
Features of 8253 / 54
8254 has a powerful command called READ BACK command, which allows the user to check the
count value, the programmed mode, the current mode, and the status of the count
INTEL 8259A Programmable Interrupt Controller
The 8259A is a programmable interrupt controller designed to work with Intelmicroprocessor 8080
A, 8085, 8086, 8088. The 8259 A interrupt controller can
Handle eight interrupt inputs. This is equivalent to providing eight interruptpins on the
processor in place of one INTR/INT pin.
Vector an interrupt request anywhere in the memory map. However, all theeight
interrupts are spaced at the interval of either four or eight location.
This eliminates the major drawback, 8085 interrupts, in which all interrupts are vectored to
memory location on page 00H.
Resolve eight levels of interrupt priorities in a variety of modes
Mask each interrupt request individually.
Read the status of pending interrupts, in service interrupts, and maskedinterrupts.
Be set up to accept either the level triggered or edge triggered interruptrequest.
Mine 8259 as can be cascade in a master slave configuration to handle 64interrupt
inputs.
The 8259 A is contained in a 28-element in line package that requires only acompatible with 8259. The
main difference between the two is that the 8259 A can be used with Intel 8086/8088 processor.