Lecture08 PDF
Lecture08 PDF
MICROPROCESSORS AND
THEIR MEMORY AND
INPUT/OUTPUT INTERFACES
8088
CPU
MN/MX = 1
MN/MX = 0
Solution:
(a) Pins 2 through 8 on the 8088 are address lines A14
S3
Address Status
10
11
CPU Cycle
8288 Command
S2
S1
S0
Interrupt Acknowledge
INTR
IORC
IOWC, AIOWC
Halt
None
Instruction Fetch
MRDC
Read Memory
MRDC
Write Memory
MWTC, AMWC
Passive
None
12
13
QS0
Queue Status
0 (low)
1 (high)
Solution:
Looking at the bus status table, we see that bus status code
101 identifies a read memory bus cycle and causes the MRDC
output of the bus controller to switch to logic 0.
14
Meaning
Minimum
Maximum
VIL
-0.5 V
+0.8 V
VIH
+2.0 V
Vcc+ 0.5 V
VOL
VOH
+0.45 V
+2.4 V
Test
condition
IOL=2.0 mA
IOH=-400 A
15
15- or 24MHz
crystal
Typical value of
CL when used
with 15MHz
crystal is 12pF
16
17
Solution:
The 8086-1 is the version of the 8086 that can be run at 9-MHz.
To create the 9-MHz clock, a 27 MHz crystal must be used on the
8284.
18
Solution:
The duration of the bus cycle in an 8 MHz system is given by
tcyc = 500 ns + N x 125 ns
In this expression the N stands for the number of waits states. For
a bus cycle with two wait states, we get
tcyc = 500 ns + 2 x 125 ns = 500 ns + 250 ns
= 750 ns
19
FFFFF
FFFFF
2
1
0
A19 A0
D7 D0
A19 A1
512K BYTES
512K BYTES
FFFFF
FFFFD
FFFFE
FFFFC
D15 D8
BHE
D7 D0
A0
20
X+1
(X)
A19 A0
D7 D0
A19 A0
X+1
X+1
(X)
(X)
D7 D0
A19 A0
D7 D0
21
A19 A1
Y+1
X+1
(X)
D15 D8
BHE (HIGH)
D7 D0
A0 (LOW)
A19 A1
Y+1
(X+1)
D15 D8
BHE (LOW)
D7 D0
A0 (HIGH)
22
A19 A1
Y+1
(X+1)
(X)
D15 D8
BHE (LOW)
D7 D0
A0 (LOW)
A19 A1
X+3
X+2
X+3
X+2
(X+1)
(X)
(X+1)
(X)
D15 D8
BHE (LOW)
D7 D0
A0 (HIGH)
A19 A1
D15 D8
BHE (HIGH)
D7 D0
A0 (LOW)
23
Solution:
The first byte of the word is the second byte at the aligned-word
address 0123016. Therefore, the word is misaligned and required
two bus cycles to be read from memory.
24
25
26
CPU Cycle
8288 Command
S2
S1
S0
Interrupt Acknowledge
INTA
IORC
IOWC, AIOWC
Halt
None
Instruction Fetch
MRDC
Read Memory
MRDC
Write Memory
MWTC, AMWC
Passive
None
27
28
29
30
Output
OC
Enable C
Q0
31
32
33
INPUTS
ENABLE
OUTPUTS
SELECT
Y0
Y1
Y2
Y3
34
35
36
37
38
39
40
41
42
43
44
45
46
47
CPU Cycle
8288 Command
S2
S1
S0
Interrupt Acknowledge
INTA
IORC
IOWC, AIOWC
Halt
None
Instruction Fetch
MRDC
Read Memory
MRDC
Write Memory
MWTC, AMWC
Passive
None
48
Mnemonic
IN
OUT
Meaning
Operation
Flags affected
Input direct
IN Port, Acc
(Acc) (Port)
Acc = AL or AX
IN DX, Acc
(Acc) ((DX))
Output direct
(Port) (Acc)
((DX)) (Acc)
Solution:
First, the AL register is loaded with FF16 as an immediate
operand in the instruction
MOV AL, 0FFH
Now the data in AL can be output to the byte-wide output port with
the instruction
OUT 0ABH, AL
49
Solution:
The DX register must first be loaded with the address of the
output port. This is done with the instruction
MOV DX, 0B000H
Next, the data that are to be output must be loaded into AL with the
instruction
MOV AL, 0FFH
Finally, the data are output with the instruction
OUT DX, AL
Solution:
First read in the byte at address AA16 into AL and move it into AH.
IN
AL, 0AAH
MOV AH, AL
Now the other byte can be read into AL by the instruction
IN
AL, 09AH
And to write out the word of data
MOV DX, 0B000H
OUT DX, AX
50
51
52