The 8088/8086 Microprocessors and Their Memory and Input/Output Interface
The 8088/8086 Microprocessors and Their Memory and Input/Output Interface
1
The 8088/8086 Microprocessors and their Memory and Input/Output Interface,
Microprocessor and Microcomputer I, 2nd year, Computer Eng. Dept.
Prepared by: Dr. Mohammed A. Al-Ebadi
Table 1
2
The 8088/8086 Microprocessors and their Memory and Input/Output Interface,
Microprocessor and Microcomputer I, 2nd year, Computer Eng. Dept.
Prepared by: Dr. Mohammed A. Al-Ebadi
Fig. (2) Block diagram of minimum mode of 8088 and 8086 MPUs
The minimum mode signals can be divided into five basic groups: Address/Data bus, status,
control, interrupt, and direct memory access (DMA).
Address/Data Bus: The address bus is 20 bits long and consists of signal lines A0 (LSB) through
A19 (MSB). However, only address lines A0 through A15 are used when accessing I/O. The data
bus lines are multiplexed with address lines. For this reason, they are denoted as AD0 through
AD15. Data line D0 is the LSB.
Status Signals: The four most significant address lines A16 through A19 of the 8086 are
multiplexed with status signals S3 through S6. These status bits are output on the bus at the same
time that data are transferred over the bus lines AD0-AD7. S3 and S4 bits identify which the
internal segment register was used to generate the physical address that was output on the address
bus during the current bus cycle. Table 2 shows the S4S3 code and the corresponding segment
register.
3
The 8088/8086 Microprocessors and their Memory and Input/Output Interface,
Microprocessor and Microcomputer I, 2nd year, Computer Eng. Dept.
Prepared by: Dr. Mohammed A. Al-Ebadi
Table 2
Control Signals: The control signals are provided to support the memory and I/O interface of
8088 MPU. They control functions such as when the bus carries a valid address, which direction
data are transferred over the bus, when valid write data are on the bus, and when to put read data
on the system bus.
• When Address latch enable (ALE) is logic 1 it signals that a valid address is on the bus. This
address can be latched in external circuitry on the 1-to-0 edge of the pulse at ALE.
• IO/M (Input-output/Memory) tells external circuitry whether a memory or I/O transfer is taking
place over the bus. Logic 0 signals a memory operation and logic 1 signals an I/O operation.
• DT/R (data transmit/receive) signals the direction of data transfer over the bus. Logic 1
indicates that the bus is in the transmit mode (i.e., data are either written into memory or to an I/O
device). Logic 0 signals that the bus is in the receive mode (i.e., reading data from memory or
from an input port).
• WR (write) is switched to logic 0 to signal external devices that valid output data are on the bus.
• RD (read) indicates that the MPU is performing a read of data off the bus. During read
operations, one other control signal, DEN (data enable), is also supplied. It enables external
devices to supply data to the microprocessor when it is at logic 0.
• The READY signal can be used to insert wait states into the bus cycle so that it is extended by a
number of clock periods. This signal is supplied by a slow memory or I/O subsystem to signal the
MPU when it is ready to permit the data transfer to be completed.
• SSO is a status signal indicates that either instruction code read (SSO=0), or data access
(SSO=1).
Interrupt Signals:
• Interrupt request (INTR) is an input to the 8086 that can be used by an external device to signal
that it needs to be serviced. Logic 1 at INTR represents an active interrupt request.
• When the MPU recognizes an interrupt request, it indicates this fact to external circuits with
logic 0 at the interrupt acknowledge (INTA) output.
4
The 8088/8086 Microprocessors and their Memory and Input/Output Interface,
Microprocessor and Microcomputer I, 2nd year, Computer Eng. Dept.
Prepared by: Dr. Mohammed A. Al-Ebadi
5
The 8088/8086 Microprocessors and their Memory and Input/Output Interface,
Microprocessor and Microcomputer I, 2nd year, Computer Eng. Dept.
Prepared by: Dr. Mohammed A. Al-Ebadi
6
The 8088/8086 Microprocessors and their Memory and Input/Output Interface,
Microprocessor and Microcomputer I, 2nd year, Computer Eng. Dept.
Prepared by: Dr. Mohammed A. Al-Ebadi
7
The 8088/8086 Microprocessors and their Memory and Input/Output Interface,
Microprocessor and Microcomputer I, 2nd year, Computer Eng. Dept.
Prepared by: Dr. Mohammed A. Al-Ebadi
Looking at the maximum-mode block diagram in Fig. (4), we see that the 8088 does not directly
provide all the signals that are required to control the memory, I/O, and interrupt interfaces.
Specifically, the WR, IO/M, DT/R, DEN, ALE, and INTA signals are no longer produced by the
8088. Instead, it outputs a status code on three signals lines S0, S1, and S2, prior to the initiation of
each bus cycle. This 3 bit bits bus status identifies which type of bus cycle is to follow.
S2S1S0 are input to the external bus controller device, the 8288, which decodes them to identify
the type of MPU bus cycle. The block diagram of the 8288 is shown in Fig. (5).
In response, the bus controller generates the appropriately timed command and control signals.
Table 3 shows the relationship between the status codes and the type of bus cycle.
Table 3
8
The 8088/8086 Microprocessors and their Memory and Input/Output Interface,
Microprocessor and Microcomputer I, 2nd year, Computer Eng. Dept.
Prepared by: Dr. Mohammed A. Al-Ebadi
The output signals generated to tell external circuitry which type of bus cycle is taking place. The
output signals are:
The 8288 produces one or two of these seven command signals for each bus cycle. For
instance, when the 8088 outputs the code = 001, it indicates that an
I/O read cycle is to be performed. In turn, the 8288 makes its IORC output switch to logic 0. On
the other hand, if the code 111 is output by the 8088, it is signalling that no bus activity is to take
place; the 8288 produces no command signals.
The other control outputs produced by the 8288 consist of DEN, DT/R, and ALE. These three
signals provide the same functions as those described for the minimum mode.
To implement a multiprocessor system, a signal called lock (LOCK) is provided on the 8088 and
8086. This signal is meant to be output (logic 0) whenever the processor wants to lock out the
other processors from using the bus. This would be the case when a shared resource is accessed.
The LOCK signal is compatible with the Multibus, an industry standard for interfacing
microprocessor systems in a multiprocessor environment.
9
The 8088/8086 Microprocessors and their Memory and Input/Output Interface,
Microprocessor and Microcomputer I, 2nd year, Computer Eng. Dept.
Prepared by: Dr. Mohammed A. Al-Ebadi
Table 4
10
The 8088/8086 Microprocessors and their Memory and Input/Output Interface,
Microprocessor and Microcomputer I, 2nd year, Computer Eng. Dept.
Prepared by: Dr. Mohammed A. Al-Ebadi
System Clock
The time base for synchronization of the internal and external operations of the microprocessor
in a microcomputer system is provided by the clock (CLK) input signal. The 8284 clock
generator and driver IC generates CLK signal. Figure (7) is a block diagram of this device.
11
The 8088/8086 Microprocessors and their Memory and Input/Output Interface,
Microprocessor and Microcomputer I, 2nd year, Computer Eng. Dept.
Prepared by: Dr. Mohammed A. Al-Ebadi
Because of 8088 are provided with 5 MHz and 8 MHz speeds, the crystal is provided between X1
and X2 inputs of 8284 either with 15 MHz or 24 MHz clock frequency in order to generate 5
MHz or 8 MHz clock frequency, respectively, by divided by 3 within the 8284 IC. Clock signal
will output at CLK pin of 8284 that connected to CLK input pin of 8088 MPU, Fig. (8).
The peripheral clock PCLK output of 8284 is a signal with a half frequency of CLK output.
The oscillator clock OSC output is a signal at the crystal frequency which is three times that of
CLK signal.
Fig. (9) shows the waveforms of OSC, CLK, and PCLK signals generated by 8284 IC.
Fig. (9) OSC, CLK, and PCLK signals produced by 8284 IC.
The 8284 can be also driven from an external clock source applied to the external frequency input
EFI. Input F/C is provided for clock source selection (0 for Crystal and 1 for External frequency).
Clock synchronization CSYNC input can be used for external synchronization in systems that
employ multiple clocks.
The 8086 is manufactured in three speeds: 5 MHz, 8 MHz and 10 MHz. For 8086, we connect
either a 15, 24 or 30 MHz crystal between inputs X1 and X2 inputs of the 8284.
12
The 8088/8086 Microprocessors and their Memory and Input/Output Interface,
Microprocessor and Microcomputer I, 2nd year, Computer Eng. Dept.
Prepared by: Dr. Mohammed A. Al-Ebadi
- Idle state: If MPU does not performed any bus cycle, it will be on idle state which take one
clock period long, and any number of idle states can be inserted between bus cycles. Figure (11)
shows two bus cycles separated by idle states.
- Wait state: wait state can be inserted into a bus cycle. This is done by requesting from an
external hardware. The READY input of the 8088/8086 MPU is provided for this purpose. Figure
(12) shows the wait state generated in response to READY signal.
13
The 8088/8086 Microprocessors and their Memory and Input/Output Interface,
Microprocessor and Microcomputer I, 2nd year, Computer Eng. Dept.
Prepared by: Dr. Mohammed A. Al-Ebadi
In the Figure (12) above, Tw will be inserted between T3 and T4 because READY input becomes
at logic 0 (when the memory or I/O device is not able to respond in the duration of a bus cycle),
and still at this level until it returns to logic 1 to complete the current bus cycle with T4. That is
mean, the data will be maintained on bus during T3 and Tw until T4 was complete.
If there are two wait states during 8MHz bus cycle, the total time of complete bus cycle will be
equal 750ns (500 ns + 2*(125 ns)).
2– 8086 Microprocessor
• 8086 memory hardware is organized as a two byte-wide memory banks.
• Bank size is 512K X 8 bits
• Low-bank holds even addressed bytes
00000H through FFFFEH.
• High-bank holds odd addressed bytes
00001H through FFFFFH.
• Address/data bus demultiplexed in external hardware.
• Input: 20-bit address bus A19 through A0, and BHE.
A1-A19 = selects storage location.
A0 = 0 enables low bank.
BHE = 0 enables high bank.
• Input/Output: 16-bit data bus D15 Through D0.
D7-D0 - even addressed byte accesses.
D15-D8 - odd addressed byte accesses.
D15-D0 - word accesses.
- 8086 Aligned Memory Accesses
Low bank byte access bus cycle:
• MPU applies even address X to both banks over address lines A19-A0.
• MPU enables just the low bank, BHE=1 & A0 = 0.
• Byte of data written into or read from address X transferred over data lines D7-D0.
High bank byte access bus cycle:
• MPU applies odd address X+1 to both banks.
• MPU enables high bank only, BHE=0 &A0 =1.
• Byte-wide data transfer takes place over data line D15- D8.
Word access bus cycle:
• MPU applies even word address X to both banks.
• MPU enables both banks BHE=0 &A0 =0.
• Word-wide data transfer takes place over D15- D0.
• All accesses take a minimum of one bus cycle of duration.
@5MHz—800ns
@8MHz—500ns
15
The 8088/8086 Microprocessors and their Memory and Input/Output Interface,
Microprocessor and Microcomputer I, 2nd year, Computer Eng. Dept.
Prepared by: Dr. Mohammed A. Al-Ebadi
Figure (14) shows the three types of aligned memory access of 8086 MPU.
Fig.(14) – a) Low bank byte access, b) High bank byte access c) Word access.
16
The 8088/8086 Microprocessors and their Memory and Input/Output Interface,
Microprocessor and Microcomputer I, 2nd year, Computer Eng. Dept.
Prepared by: Dr. Mohammed A. Al-Ebadi
Figure (15) shows the misaligned word memory access of 8086 MPU.
17
The 8088/8086 Microprocessors and their Memory and Input/Output Interface,
Microprocessor and Microcomputer I, 2nd year, Computer Eng. Dept.
Prepared by: Dr. Mohammed A. Al-Ebadi
Figure (16) shows the memory control signals of 8088 minimum mode interface.
18
The 8088/8086 Microprocessors and their Memory and Input/Output Interface,
Microprocessor and Microcomputer I, 2nd year, Computer Eng. Dept.
Prepared by: Dr. Mohammed A. Al-Ebadi
Figure (17) shows the memory control signals and memory bus status codes of maximum mode 8088
microprocessor.
Fig.(17) The memory control signals and memory bus status codes of maximum mode 8088 MPU.
Read and Write Bus Cycles
1- 8088 Minimum Mode Read Bus Cycle
Figure (18) explains read bus cycle timing diagram and shows relationship between signals relative to
times states.
- T1 state—read cycle begins
• Address output on A0-A19.
• Pulse produced at ALE, and address should be latched in external circuitry on trailing edge of ALE.
• IO/M set to 0, memory bus cycle.
• DT/R set to 0 to set external data bus control circuitry for receive mode (read).
- T2 state
• Status code output on S3-S6.
• AD0 through AD7 tri-stated in preparation for data bus operation.
• RD set to 0, read cycle.
• DEN set to 0 to enable external data bus control circuitry.
- T3 state
• Data on D0-D7 read by the MPU.
- T4 state—read cycle finishes
• RD returns to 1, inactive level.
• Complete address/data bus tri-stated.
• IO/M returned to 1, IO bus cycle.
• DEN returned to 1, inactive level.
• DT/R returns to 1, transmit level.
19
The 8088/8086 Microprocessors and their Memory and Input/Output Interface,
Microprocessor and Microcomputer I, 2nd year, Computer Eng. Dept.
Prepared by: Dr. Mohammed A. Al-Ebadi
Fig. (18) 8088 minimum mode memory read bus cycle timing diagram.
20
The 8088/8086 Microprocessors and their Memory and Input/Output Interface,
Microprocessor and Microcomputer I, 2nd year, Computer Eng. Dept.
Prepared by: Dr. Mohammed A. Al-Ebadi
Fig. (19) 8086 minimum mode memory read cycle timing diagram.
3- 8088 Minimum Mode Write Bus Cycle
Fig. (20) explains write bus cycle timing diagram and shows relationship between signals relative to times
states.
- T1 state—write cycle begins.
• Address output on A0-A19.
• Pulse produced at ALE and address latched in external circuitry on trailing edge of ALE.
• IO/M set to 0, memory bus cycle.
• DT/R remains at 1 to set external data bus control circuitry for transmit mode (write).
- T2 state
• Status code output on S3-S6.
• AD0 through AD7 transitioned to data bus and write data placed on bus.
• DEN set to 0 to enable external data bus control circuitry.
• WR set to 0, write cycle.
- T3 or T4 state
• Data on D0-D7 written into memory.
- T4 state—write cycle finishes
• WR returns to 1, inactive level.
• Complete address/data bus tri-stated.
• IO/M returned to 1, IO bus cycle.
21
The 8088/8086 Microprocessors and their Memory and Input/Output Interface,
Microprocessor and Microcomputer I, 2nd year, Computer Eng. Dept.
Prepared by: Dr. Mohammed A. Al-Ebadi
Fig. (20) 8088 minimum mode memory write cycle timing diagram.
Fig. (21) shows the waveform of 8086 maximum mode write cycle timing diagram.
22
The 8088/8086 Microprocessors and their Memory and Input/Output Interface,
Microprocessor and Microcomputer I, 2nd year, Computer Eng. Dept.
Prepared by: Dr. Mohammed A. Al-Ebadi
23
The 8088/8086 Microprocessors and their Memory and Input/Output Interface,
Microprocessor and Microcomputer I, 2nd year, Computer Eng. Dept.
Prepared by: Dr. Mohammed A. Al-Ebadi
Fig.(22): (a)The block diagram, (b) the internal architecture, and (c)the truth table of 74F37 - Octal D-
type latch.
24
The 8088/8086 Microprocessors and their Memory and Input/Output Interface,
Microprocessor and Microcomputer I, 2nd year, Computer Eng. Dept.
Prepared by: Dr. Mohammed A. Al-Ebadi
Figure (23) illustrates the implementation of address bus latch with 3 74F373 Octal-D-type latches.
• Inputs AD0-AD7, A8-A19, from 8088 MPU.
• All devices permanently enabled by fixing the OC inputs at logic 0.
• All latches clocked in parallel with pulse at ALE from 8088 MPU.
• Latched and buffered outputs are: A0L-A19L.
The data bus D0-D7 can be formed using bidirectional bus transceiver circuit 74F245. Fig.(24) sows the
block diagram and internal architecture of 74F245.
25
The 8088/8086 Microprocessors and their Memory and Input/Output Interface,
Microprocessor and Microcomputer I, 2nd year, Computer Eng. Dept.
Prepared by: Dr. Mohammed A. Al-Ebadi
26
The 8088/8086 Microprocessors and their Memory and Input/Output Interface,
Microprocessor and Microcomputer I, 2nd year, Computer Eng. Dept.
Prepared by: Dr. Mohammed A. Al-Ebadi
The 74F245 is an octal bi-directional bus transceiver, consists of 8 independent bus transceivers. The DIR
input selects direction of data transfer as follows:
If DIR input is 0, the direction of data transfer is from B to A (read).
If DIR input is 1, the direction of data transfer is from A to B (write).
The G input should be 0 to enable all transceivers.
Fig.(25) shows the implementation of data bus transceiver of 8088 MPU. The A inputs/outputs are AD0-
AD7 directly from MPU. The direction of the device set by logic level of DT/R. The device enabled at
appropriate time for data transfer by DEN=0. The B inputs/outputs are the buffered data bus lines DB0-
DB7. Buffered data bus lines applied directly to the memory or input/output subsystem.
Fig.(25) The implementation of data bus transceiver of 8088 MPU using 74F245.
27
The 8088/8086 Microprocessors and their Memory and Input/Output Interface,
Microprocessor and Microcomputer I, 2nd year, Computer Eng. Dept.
Prepared by: Dr. Mohammed A. Al-Ebadi
28
The 8088/8086 Microprocessors and their Memory and Input/Output Interface,
Microprocessor and Microcomputer I, 2nd year, Computer Eng. Dept.
Prepared by: Dr. Mohammed A. Al-Ebadi
29
The 8088/8086 Microprocessors and their Memory and Input/Output Interface,
Microprocessor and Microcomputer I, 2nd year, Computer Eng. Dept.
Prepared by: Dr. Mohammed A. Al-Ebadi
Block diagram of the ROM, PROM, and EPROM are essentially the same.
- Signal interfaces
• Address bus (A10-A0)—MPU inputs address information that selects the storage location to be
accessed.
• Data Bus (D7-D0)—information from the accessed storage location output to be read by MPU.
• Control bus—enables device and/or enables output from device.
• CE = chip enable—active 0; 1 low-power standby mode.
• OE = output enable—active 0; 1 high-Z state.
- Byte capacity– number of bytes a device can store.
• Calculated from number of address bits.
EX: Address = 11-bit address, storage capacity =211= 2048 bytes.
- Organization—how the size of a ROM is described.
• Formed from capacity and data bus width.
EX: 2048 X 8 or just 2K X 8
- Storage density—number of bits of storage in a ROM
• Calculated from byte capacity and data width
EX: Storage density = 2048 X 8 = 16384 bits (16K bits)
Example:
A ROM device has 15 address lines and 8 data lines. What are the address range, byte capacity,
organization, and storage density?
Solution:
• Address range
A14-A0 = 000 0000 0000 00002 - 111 1111 1111 11112 = 0000H - 7FFFH
• Byte capacity
215= 32,768 bytes = 32K bytes
• Organization
32768 X 8 bit
• Storage density
32768 x 8 = 262144 bits = 256K bits
30
The 8088/8086 Microprocessors and their Memory and Input/Output Interface,
Microprocessor and Microcomputer I, 2nd year, Computer Eng. Dept.
Prepared by: Dr. Mohammed A. Al-Ebadi
• Organization
64K X 8 bit
• Storage density
2 X 32K x 8 = 512K bit
31
The 8088/8086 Microprocessors and their Memory and Input/Output Interface,
Microprocessor and Microcomputer I, 2nd year, Computer Eng. Dept.
Prepared by: Dr. Mohammed A. Al-Ebadi
32
The 8088/8086 Microprocessors and their Memory and Input/Output Interface,
Microprocessor and Microcomputer I, 2nd year, Computer Eng. Dept.
Prepared by: Dr. Mohammed A. Al-Ebadi
33
The 8088/8086 Microprocessors and their Memory and Input/Output Interface,
Microprocessor and Microcomputer I, 2nd year, Computer Eng. Dept.
Prepared by: Dr. Mohammed A. Al-Ebadi
34
The 8088/8086 Microprocessors and their Memory and Input/Output Interface,
Microprocessor and Microcomputer I, 2nd year, Computer Eng. Dept.
Prepared by: Dr. Mohammed A. Al-Ebadi
35
The 8088/8086 Microprocessors and their Memory and Input/Output Interface,
Microprocessor and Microcomputer I, 2nd year, Computer Eng. Dept.
Prepared by: Dr. Mohammed A. Al-Ebadi
36
The 8088/8086 Microprocessors and their Memory and Input/Output Interface,
Microprocessor and Microcomputer I, 2nd year, Computer Eng. Dept.
Prepared by: Dr. Mohammed A. Al-Ebadi
37