Lecture11 Thirdmicroprocessorc
Lecture11 Thirdmicroprocessorc
net/publication/340163935
CITATIONS READS
0 35,536
1 author:
Hadeel N Abdullah
University of Technology, Iraq
75 PUBLICATIONS 253 CITATIONS
SEE PROFILE
All content following this page was uploaded by Hadeel N Abdullah on 25 March 2020.
LECTURE NINE
8086 MICROPROCESSOR
MEMORY AND I/O INTERFACING
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.
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.
LECTURE 9/8086 MEMORY AND I/O INTERFACING ASSIST. PROF. DR. HADEEL N.
ABDULLAH
MEMORY DEVICES
Simple or complex, every microprocessor based system has a
Memory system.
Almost all systems contain four common types of memory:
Read only memory (ROM)
Flash memory (EEPROM)
Static Random access memory (SARAM)
Dynamic Random access memory (DRAM).
Control connections:
The control input most
often found on the
ROM is the output
enable (OE) or gate (G)
this allows data to flow
out of the output data
pins of the ROM.
Memory
and
I/O
Interfaci
ng
(a) Logical memory organization, and (b) Physical memory organization (high and low
memory banks) of the 8086 microprocessor.
8086 Memory Organization
To distinguish between odd and even bytes, the CPU provides a signal called
BHE (bus high enable).
BHE and A0 are used to select the odd and even byte, as shown in the table
below.
BHE A0 Function
0 0 Choose both odd and even memory bank
0 1 Choose only odd memory bank
1 0 Choose only even memory bank
1 1 None is chosen
Homework:
Why 8086 can read 16-bit data from an even address and 8-bit
from odd address? Explain with a block diagram and table.
Q2: Design 8086’s memory system consisting of 64K bytes of ROM memory,
make use of the devices in figure below. The memory is to reside over the
address range 60000H through 6FFFFH
Isolated I/O uses separate memory Memory mapped I/O uses memory
01
space. from the main memory.
The memory address space is not Part of the memory address space is
04
affected lost
The addresses for Isolated I/O devices Memory mapped I/O devices are
are called ports. 05 treated as memory locations on the
memory map
Example:
IN AL,0C8H ;Input a byte from port 0C8H to AL
IN AX, 34H ;Input a word (two byte) from port 34H, 35H to AX
OUT 3BH, AL ;Copy the contents of the AL to port 3Bh
OUT 2CH,AX ;Copy the contents of the AX to port 2CH, 2DH
MOV DX, 0FF78H ;Initialize DX point to port
IN AL, DX ;Input a byte from a 8 bit port 0FF78H to AL
IN AX, DX ;Input a word from 16 bit port to 0FF78H,0FF79H to AX.
LECTURE 9/8086 MEMORY AND I/O INTERFACING ASSIST. PROF. DR. HADEEL N.
ABDULLAH
Demultiplexing Address/Data Lines
Two 74F373 octal latches are used to form a 16-bit address latch. These devices
latch the address A0 through A15 synchronously with the ALE pulse. The latched
address outputs are labeled AoL through A15L.
Remember that address lines A16 through A19 are not involved in the I/O interface.
Data bus transceiver buffer in 8086 system is implemented using 74F245 octal
bus IC’s, where the control inputs DIR and G is used to control the data flow (An
Bn) or (Bn An).
LECTURE 9/8086 MEMORY AND I/O INTERFACING ASSIST. PROF. DR. HADEEL N.
ABDULLAH
View publication stats
Homework
Q1: Draw a circuit to show how a common cathode 7-segment display can be
connected on an output port and four switches on an input port both occupying the
address range 860H to 86FH.
Q2: What do you mean by Demultiplexing? How it is done in 8086 microprocessor for
address and data bus? Explain with neat diagram.
Q3: Explain how 8086 microprocessor uses a single bus for both data and address?
Q4: Design the hardware required to interface 8 bit LED at port address 5AH
Q5: What are the two types of input/output address spaces that can be take place for
an 8086 microcomputer system, what are the advantages and disadvantages of each
type?