Chapter_Three
Chapter_Three
1
Outline
Memory Classifications
Input & Output Devices: I/O with 8-Bit Addresses, I/O with 16-Bit Addresses
11
Interface
Interface is the path for communication between two
components.
Interfacing is two types,
1. memory interfacing and
2. 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.
12
Cntd…
13
Cntd..
Accessing memory can be summarized into the following
three steps:
Select the chip.
Identify the memory register.
Enable the appropriate buffer.
15
Cntd…
Overall Interface
16
Memory Interfacing and Address
Memory Interfacing : Decoding:
An address decoding circuit is employed to select the
required I/O device or a memory chip.
When IO/M……. is high, decoder is to active and the require IO
device is selected.
If IO/M….. is low, the decoder 1 is activated the required
memory chip is selected.
A few MSB(most significant bit) of address line is applied to the
decoder to select the memory chip or an I/O device.
17
Cntd…
A13 A14 A15 OUTPUT
0 0 0
Y0
0 0 1 Y1
0 1 0 Y2
0 1 1 Y3
1 0 0 Y4
1 0 1 Y5
1 1 0 Y6
1 1 1 Y7
18
II. 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.
In memory interfacing: 8 bit data line, 16 bit address line ,
control signals are connected to corresponding lines of memory IC.
In I/O device interfacing: 8 bit data line, only 8 bit address
line , control signals are connected to corresponding lines of I/O
devices.
19
8085 I/O addressing
I/O devices can be interfaced using addresses from memory space
8085 treats such an I/O device as a memory location
This is called Memory-mapped I/O
8085 has a separate 8-bit addressing scheme for I/O devices
I/O address space: 00H to FFH
This is called Peripheral-mapped I/O or I/O-mapped I/O
24
25
The interfacing of Output Devices
Output devices are usually slow. Also, the output is
usually expected to continue appearing on the output device
for a long period of time.
Given that the data will only be present on the data lines for a
very short period (microseconds), it has to be latched
externally.
To do this the external latch should be enabled when the
port’s address is present on the address bus, the IO/M signal
is set high and WR is set low.
The resulting signal would be active when the output device is
being accessed by the microprocessor.
Decoding the address bus (for memory-mapped devices)
follows the same techniques discussed in interfacing memory.
7
The interfacing of Input Devices
The basic concepts are similar to interfacing of output
devices.
The address lines are decoded to generate a signal that is
active when the particular port is being accessed.
An IORD signal is generated by combining the IO/M and the
RD signals from the microprocessor.
A tri-state buffer is used to connect the input device to the
data bus.
The control (Enable) for these buffers is connected to the
result of combining the address signal and the signal IOR.D.
7
End of chapter Three
Any Question???
28