Documenti di Didattica
Documenti di Professioni
Documenti di Cultura
Microprocessors
and
TheirMemoryand
fnput/OutputInterfaces
INTRODUCTION
Up to thispointin thebook,we havestudiedthe 8088and8086microprocessors fiom a
software pointof view.We havecovered their softwarearchitectufe, instructionset,how
to wdte,execute, anddebug programs in assenbly language, and found thatthe 8088 and
8086were identicalfrom the software point of view. This is no! lrue of the hardware
architectures
of the8088and8086microcomputer systems. Now we beginexamining the
8088 and 8086nicrocomputel from the hardwarc point of view In this chapter,we cover
the 8088/8086\ signal interfaces,memory interfaoes,inputoutput interfaces,and bus
cycles.The chaptersthat fbllow coverotherhardwareand intedacingaspectsof these
Focessors. This chapterincludesthe followingtopics:
8.1 8088and8086Microprocessors
8.2 Minirnum-Mode andMa.{imum-Mode Systems
8.3 Min;rnum-Mode InterfaceSignals
8.4 Maxinum Mode InterfaceSignals
8.5 Elecirical Characteristics
8.6 SystemClock
8.7 Bus CycleandTime States
8.8 Hadware organizarionof ihe Memory Addres$Space
8.9 AddressBus StatusCodes
3t5
8.10 Memory Control Signals
8-11 ReadandWrite Bus Cycles
8-12 Memory InterfaceCircuiis
8.13 ProgrammableLogic Arrays
8.14 Typesof Input/Output
8.15 IsolatedInput/Outputlnterface
8.16 Input/OutputData Transfers
8.17 lnput/Ou.putInstructions
8.18 Input/OuiputBus Cycles
Tte 8086, amounced in 1978, was tLe filst 16-bit miqoprocessorintroducedby Intel
Corporation.A secondmemberof rhe 8086 family, fte 8088 midoprocessor followed it
in 1979.The 8088 is tuny softwarecompatiblewilh its predecessorthe 8086. The dif-
ferencebetweenthesetwo devicesis in their hardwarearch;tecture.Justlike the 8086.the
8088is intemally a lGbit MPU. However,extemally the 8086 hasa 16-bit databus,and
the 8088 hasan 8-bit databus.This is the key hardwareditrerence.Both deviceshave.he
ability 1oaddressup to lMb)te of nemory via their 20-bit addrcssbuses.Moreover they
can addressup to 64K of b'te-wide irput/output ports.
The 8088 and 8086 are borh manufactued ]usittqhish-petomance metul oide
semiconductor(HMOS) technolog), and the circuitry on their chips is equivalent to
apFoximately 29,0,mtransistors.They arc housedin a 40 pin dual in line package.This
packagecanbe mountedinto a socketthat is solderedto the circuit boardor haveits leads
inserteddrough hole.sin the board and soldered.The signalspinnedoui to eachlead arc
shownin Figs. 8-1(a) and (b), respectively.Many of iheir pins have multiple funclions.
For example,in lhe pin layout diagrarnof the 8088, we see thal addressbus lines A0
drough A? and databus lines Do throughD7 are multiplexed.For this rcason,theseleads
arelabeledADo throughAD?. By nubiplered we meanthat the samephysicalpin canies
an addftss bit at one time and the databit at anothertime.
EMMPLE8.I
At what pin location on the 8088's packageis addressbit A16 output?With what other
signal is it multiplexed?What tunction do€sthis pin serveon the 8086?
Solution
Looking at Fig. 8-1(a), we find that the signal,t16 is l()catedat pin 38 on the 8088 and
that it is multiplexed wirh signal L. Fipre 8 1(b) showsus that pin 38 servesthe same
functions on the 8086.
l-RoGto-J
m
(iii/6?i,
lFd6_rir
lill/fi}
rs_,1
rt ddall
rSll
Drl;i rsi)
dm 19.I
6$
(osot
nn
itSI
ilflkhhi#;{li{:!:"i3ii.r;;s:m:r.I:it*x#?
8,2 MINIMUM-MODE
AND I\,4AXIMUM-MODE
SYSTEMS
Tle 8088and 8086nicroproces
,fiorscan I
lf*i;i.trilT',ffi
t*:tfrHfi,l'd,ils!.;
iTfr
[",;]fi
*5':ffi j:ifli,:H#
#iifll_it','i,!'_fpil$
n:[,n
:;i#m*l#";*'x": ffi i;run**:
sec.8.2 Mjnimum-Mode
an ci MaximumMooesystems
337
The signalsof the 8088 microprocesr;or commonto both modesof operation,those
uniqueLominimurnmodednddroseuniqu€I to maximummode,are lisLcdnr Figs. 8 2(a).
(b), xnd (c). resp€ctively.
Hefewe lind the name,tunclion, and type lor each signal.For
example, the signalRD is in ihe commong roup. lt tunctionsas a rcxd control ouiput and
is usedlo signalmemoryor I/O deviceswl 1enthe 8088'ssystembusis setup to readin
data. Moreover, note that the signals ho ld reqnest (HOLD) and hold achowledge
(HLDA) a.reproducedonly in the minimun r-modesystern-If the 8088 is set up for mar-
imum mode,they arc replacedby the reque svgrant bus accesscontrol lines RQ/GToand
RQ/GT,.
Mlnim0mmod. riqnalr(MN/MX=
Ve)
HOLD
wn-
IO/M
DT/F-
DEN
sso
INT'A
MN/MX
FD
modesiqnah(MN/fit= GNo)
l\raximum
NMI
LOCK
sr-so
+5V
GND
os1,oso
Fieure 8-2 (a) Signalscormo! ro borh min inun and narinum modcs.(b) Unique
minlnum-modesiendls(c) Ulique maximunj
Solution
Conparingthe pin layoutsofthe 8088and8086in Fig. 8-i, we find thefbllowing:
1. Pins 2 ihrough 8 on the 8088 are addresslines Ara tbroughAs, but on the 8086 they
are address/dalalines ADia throughADs.
2. Pin 28 on rhe8088i' lhe lO,M ourpu,andon $e 8080iri5 lhe M,4-0ourpur.
3. Pin 31 of rhe8088rs $e SSOouFur.aodon lhe 808brhicpin cupplie.rheBHE/\?
output.
A 8.3 MINIMUM-MODEINTERFACE
SIGNATS
When minimum modeoperationis select€d,the 8088 or 8086 itself plovides a[ rhe con,
aol signalsne€dedto implementthe memory and I/O interfaces.Fignres 8-3(a) and (b)
show block diagramsof a minimum-modeconfigurationof the 8088 and 8086, resp€c-
tively. The minimum-mode signals can be divided into the following basic groups:
address/databus,status,control. intenupt, and DMA.
Address/DataBus
Let us first look at the address/data
bus. In an 8088-basedmicrocomputersysten,
theselines sene two turctions. As n adnrcssbus, they are usedto carry addressinfor
nation to the memory and l/O ports. The addrcssbus is 20 bits long and consistsof sig-
nal lines A0 tbroush Are. Of ihese.Are representsthe MSB and A{r the l-SB. A 20-bit
addressgivesthe 8088 a lMbyte memory addressspace.However.only addressLinesA0
throughAr5 are usedwhen accessingI/O. This givesthe 8088 an independentyO address
spacethat is 64Kbytesin length.
The eight ddta ,rr lines D0 though D? are actually multipiexedwith addresslines
A0 tbroughA7, respectivell For this reason.they are denotedasADo tlrough AD7. Data
LineD7 is the MSB in the byte of data and D0 the LSB. Wben acting as a databus,rhey
carry readwrite data for memory input/output data for l/O devices,and interrupttype
codesfrom an interruptcontroller
Lookine at Fig. 8-3(b), we seethat the 8086 has 16 databus lines insreadof 8 as
in the 8088.Data fines aft rnultiplexedwith addresslines Ao tbroughAr5 and aft there-
tore denotedasADo throughADr5.
RES€T
IO/M
HOLD
RO
wB-
DEN
CLK
INTR
aD o-AD,r.A 6/S!-A,r/36
ifTA
NMI
AIE
RESET
BnE/S?
M/Io
DMA HOLD Dl/R
RD
WR
DEN
cL(
(b)
I'tgue E-3 (a) Block diagrm of the minimum'mode 8088 MPU (b) Btock
diagran of the mininum-mode 8086MPU
s4 5l
0 AlrgrnareG6rariv.
rorheESse!men0
srackterarive
b rness s.qm€.o
Cod.lNonelrelalivslo lhe CS seg
menr or a del.rrr ol z€ro) FigurEE-4 Addre$ bussiarur
DalatGlaliveto lh€ os segm€ )
codas.(Repiint€dwilh pernissionof
I el Corporaliotr,
@ 1979)
Status
Signals
The foul most significantaddresslines,Are drough A16of both the 8088 atrd8086
are also multiplexed,but in lhis casewilh stdt r stgrals 56 through53. Thesestaos bits
are output on the bus at the sametime thal dataare hansfered over the other bus lines.
Bits Saand Sr togetherform a 2 bit binary codethat identifieswhich of the intemal seg-
ment registerswas usedto geneBtethe physical addressthat was output on the addrcss
bus during the cunent bus 'Jycle.The,sefour codesand the regisren they representare
shownin Fig. 8-4. Note that the code SaS3= 00 idenrifieslhe extra segmentrcgister as
the sourceof ihe segmentaddrcss.
Stalusline Sj rcflectsthe statusof anotherinternalchrmcteristicof the MPU- It is the
logic levelof theintemalintempt enableflag.The statusbir 56is alwaysat the0 logic level.
Control Signals
T\e contml siqnals arc ltrovided to suppod the memory and I/O interfacesof the
8088 and 8086. They control functions such as when the bus carries a valid addrcss,
which direcdon data are transferredover lhe bus. when valid write data are on the bus.
andwhen to put readdataon the systembus.For example.addrcsslatch etnble (ALE\ is
a pulse to iogic 1 that siglals extemalcircuitry when a valid addrcssis on the bus.This
addresscan be latchedin extemrl circlitry on the I to 0 edgeofthe pulse at ALE. _
Using the IO/M (lo/nenoO line. D' R (data transmit/receiye\line, and SSO
(statusoutput) line, the 8088 signalswhich type of bus cycle is in progressand in which
directiondataare to be tsansfenedoverthe bus.The logic level of IO/M tells extemalcn-
cuiry wherler a memory or UO trdnsferis taking placeover the bus.lngic 0 at this out-
put signalsa memory operalion,and logic I signals an VO operatioi. The direction of
datatansfer over the busis sienaledby rne logic level ouFut at DT/R- When this line is
logic I during the datatransferpan of a bus cycle, the busis in the transmitmode.There
fore. dataare either written into memory or output to an UO device.On the other halrd.
logic 0 at DT,R signalsthat drc bus is tu the rcceivemode.This conespondsto .eading
datafmm memory or inpur of dataftom an input porl
ComparingFigs. 8 3(a) and 8 3(b), we find two differencesbefv/e€nthe minimum-
mode8088 and 808b microproce,ssors. Fi^L rhe 8086 s memoryno conFotrMI-Or 'isnal
is the complementof the equivalentsignaloflhe 8088.Secondthe 8088\ SSOstatussig-
nal is rcplacedby bdnt /,ish e able (BtE\ M tre 4086.l-ogic 0 on tlis line is usedas a
mernoryenablesignalfof r}le nosr sienmcantb)'te har of the databus, Ds drough Drs.
This line also carriesstatusbit 57.
InterruptSignals
The keyinterrupt interface signals arc intettupt r€q&€rt (INTR) and intenwt
acknowledSe(INTA). INTR is an input to the 8088 and 8086 that can be used by an
externaldeviceto signalthat it needsto be seNiced.This inpur is sampledduring the final
clock period of eachtfftroction acquisition cyck. Logic I at INTR representsan active
interrupt request.Wlrcn the MPU recognizesan interupt request,it indicatesthis fact to
exrematcircuirs with pulsesto logic 0 at the INTA outpur.
The TEST input is also relatedto the exiemal interruptinterface.For example,exe-
culion of a WAIT instructioncausesthe 8088or 8086to checkthe logic level at the TEST
input. If logic I is found at this iDput,the MPU suspendsopention and goesinto what is
known as the idle rtdt?. The MPU no.longerexecutesinstructions;instead,ir repeatediy
checksthe logic level of the TEST input waiting for its transition back to logic 0. As
TEST switchesto 0, executionresumeswith the nexi instruction in the program. This
feanre can be used to synchonize the opemtion of lhe MPU to an eveni in exremal
hardware.
There are fwo more inpuis in the irtenupt inretface: nonnaskable interrupt
(NMl) and,'€rer(RESET).On the 0{o-1 t ansitionof NMI, controlis passedto a ron-
maskableintenupt serv;ceroutineat completionof executionof the currentinstruc,
tion. NMI is the interrupt requestwith highesr pdority and cannot be maskedby soft-
ware.The RESETinput is usedto providea ha.dwareresetfor the MPU. Switchirg
RESETto logic 0 initializesthe intemalregistersof ihe MPU andinitiatesa resetser
DMA InterfaceSignals
8.4 MAXIMUM-MODEINTERFACE
SIGNAIS
DT/R-
DEN
ADo-AO?,
Ar.A,-A01S.
R6
-- -- Lo6lbu.
FO/Glr RO/Glo 6nrol
(a'
EMMPLE8.3
ff the bus statrs codeSrSlS0equals101,what g?e of bus activity is taking plac€?Wlich
conmand ouFut is Fodrced by the 8288?
Solution
Lookingat thetablein Fig.8 Z we seethatbusstatuscode101identifies
a readmemory
bnscycleandcauses theMRDCoutputof thebuscontrollelto be switchedto logic 0.
MRD'
MlrTC
s. 3233 ^Mra
io-Rc-
'o-*:c
RESET AIOWC
iMI
MCE/FDEN
DT/i
a-ft
BHE
RD
EoicT, Ra/cL
(b)
FigurEE-s (cortinued)
Lock Signal
o-id
iFiI n a
iit
la -iE
i6ta
fiic
6i-4
tbt
OueueStatus
Signals
Two orhersignalsproducedby the 8088and 8086.in the naxinum-modemicro
computersysrem,are queuestatusoutputsQSoand QSr tharfon ^2bjt queuestatus
.,1e, QSlQSo.This code tells lhe extemalcircuitry whal type of informationwas
rcmovedtiom the inltructionqueneduringthe previousclockcycle.Figure8 8 shows
thefour dillerentqueuesiatuscodes.Note tharQSlQSo= 0l indicatesthatthe first byte
of an insfirctioD was taken off the queue.As shown. the feich of the Dextbyte of lhe
instmclionis identiliedby the codeil. Whenevefthe queueis reseldueto a t|,tnsferof
codc10 is ouiput.
control,|hereiniiialization
CPUCycle E2!6Comm.nrl
s2 s1 s0
0 0 Inlerupt Acknowledge
0 1 -----to--o
s9-
0 0
0 1 Hall
0 M_RDC
I lvlFDC
0 frfrJaA-Mwc
1 1
l Subssqusnl Byte.Thebytelaken
Iromths queuewasa subsequ€nl figure 8-8 Queuestatuscodes.
byleol theinslrucllon. (Reprintedlith pernisslon of lntel
Corporanon,
O 1979)
LocalBusControlSignals
CHAMCTERISTICS
8.5 ELECTRICAL
+2,4V
Figure 8-9 I/O voltagelevels.
A 8,6 SYSTEM
CLOCK
The dme basefor synchronizationof the internal and extemal operationsof the micro-
pro.essorin a microcompuiersystemis providedby the cl.rc* (CLK) input signal,At pfe-
sent,the 8088 is availablein two different speeds.Tbe standardpan op€rutesot 5 MHz and
the8088-2operales at 8 MHz.On theolberhand,the8086microprocessor is manufactuled
in threesp€edsr the s-MHz 8086,the 8-MHz 8086-2,anddle lo-MHz 8086-1.The 8284
clockgenerator anddriverIC generate$ CLK, Figul€8-I0 is a blockdiagramofthis device.
The standardway in which this clock chip is usedwith the 8088is to connecteither
a 15- or 24-MHz crystal betweenits Xr and X2 inputs.This circuir connecrionis shown
in Fig. 8 11.Note that a seriescapacitorCL is also required.trs lpical value when used
with the 15-MHz crystal is 12 pF The funnanental crystal frcquerry is divided by 3
within tbe 8284 to give either a 5- or 8-MHz clock signal. This signal is internally
bufferedandoutput at CLK. The CLK outputof the 8284canbe dnectly connectedto the
CLK input of the 8088.The 8284 connectsto the 8086 in exacdythe sameway.
Figure 8-12 showsthe wavefom of CLK. Here we seethat the signal is specified
at metal onde semiconductorO4os)-compatiblevoltagelevels andnoi transistortransis-
ior logic (TTL) levels.Its minimu.n and maximun low logic levels a.e VLdi : -0.5 V
andVlda = 0.6 Y respectively.Moreover the minimum and marimum high logic levels
areVs-i" = 3.9 V andVHms : Ve + 1 Y respectively.Thepetrd of the clo€k signalof
a 5 MHz 8088 can rangefroln a nininum of 200 ns to a mrximum of 500 ns, and the
maxilj.u.mrise andfatl tines of its edgesequal 10 ns.
Figure 8-10 shows two morc clock outputs on the 8284i tte peripheml cLock
(PCLK) and oscilLdtorclo.* (OSC).Thesesignalsare provided to drive peripheraiICs.
The clock signal output at PCLK is half the frequencyof CLK. For instance,if an 8088
is operatedat 5 MHz, PCLK is 2.5 MHz. Also, it is at TTl-compatible levelsratherthan
MOS levels.On dre otherhand,the OSC output is at the crystal frequency,which is thre€
times that of CLK. Figure 8-13 illustratestheserelationships.
T]le 8284 can also be driven from an extemalclock sourcejhe extemalclock sig-
nal is applied to ihe exiemal frequencyinput (EFI). Input F/C is provided for clock
sourceselection.Wlen it is strappedto the 0 Iogic level, the crystal betweenXr and X,
is used.On the otherhand.applyins logic I to F/C selectsEFI as the sourceof the clock.
The clock sync (CSYNC) input can be usedfor extemalsynchronizationin systemsthat
employ multiple clocks.
s e c . 8 - 6 SystemClock 341)
Figure 8-13 RelationshjpbelweenCLK and PCLK. (Reprintedwith pennis-
sion of lntel Coryonrlon, O I 979)
EMMPLE8,4
If theCLK inputofan 8086MPU is to be ddvenby 4 9-MHz signat,wha!speedversion
of the 8086mustbe usedandwhatfrequency crystalmustbe attnchedto the 8284?
Solution
The 8086-l is the versionof the 8086that canbe run at 9 MHz. To createrhe 9-MHz
clock,a 27-MHzcrystalmustb€ usedon the 8284,
A 8,7 BUSCYCLE
AND TIMESTATES
A Dlli c)cb definesth€ basicopemlionthat a microproces$or pertbrmsto communicate
with externaldevices,Examplesof bus cyclesare the memorylead, Demoly write,
input/outputread,and inpuvoutputwrite.As shownin Fig. 8-14(a),a buscycleco e-
spondsto a sequence of eventsthatstall with an address beingoutputon the systembos
followedby a reador write datatransferDuringtheseoperations, the MpU produces a
seriesof controlsigralsto conlrolrhedirectionandtinringof thebus.
The buscycleof the 8088and8086microprocessors consistsof at leastfour clock
p€riods.Thesefour time statesarecalledT , T2,Tj, rnd Td.DuringTr, theMpU puB an
addrcss on the bus,For a write memorycycle,dataareput on thebusduringstateT, and
maintained throughT3 andTa.Whena readcycleis ro be pedomed,the b s is first pur
in the high-ZstateduringT, and thenihe datato be readmusrbe availableon the bus
dudngT1 andTa. ThesefoLrrclock staLes gi\e a bus .jlle durationof 125ns X 4 =
500ns in an 8-MHz 8088system.
If no bus cyclesare reqxired,the microFocessorperforns whal are knowr as td?
rrat€r. During thesestates,no bus activiry takesplace.Eachidle staGis one clock period
long,andanynumberol themcanbe inserredberween buscyctes.Figure8-14(b)shows
two buscyclesseparatedby idle states.Idle staresare perfomed if the insrructionqueue
in.idelhe nicroproce*,'r i. tLll dnd ir aoe.nor neea,o'e,,dor wrireoperrnd.from
ln fact, the READY input of the MPU is Fovided spe.ificaly for rhis pupose. Figwe
8 14(c) showsthat logic 0 at this input indicatesthar tlle cuneni bus cycle shouldnot be
completed.As long as READY is held at the 0 leve], wait statesare inserredberween
statesT3 andTa of the curent bus cycle, and the dararhar were or the bus during T3 are
maintained.The bus cycle is not completeduntil rhe extemalhardwarereturnsREADY
back to the 1 logic level. This extendsthe duration of the bus cycle, therebypermitring
the use of slower memory and I/O devicesin the system.
EMMPLE8.5
What is the duration of the bus cycle in the 8088-basedmicrocomputerif the clock is
8 MIIZ and two wait statesare iDserted?
Solution
The duration of the bus cycle in an s-MHz systemis give, in generalby
ty.=500ns+Nx125ns
.]IMSYTES 5 1 2 tl Y t E s srrEs
t12r(
2 !
i
(b)
Fisur€ 8-15 (a) lM x 8 hemory bank of rhe 8088. (b) Hish and low
memory banks of tle 8086. (Reprintedwirh permision of Intel Corporation,
o 1979)
(x+1t
Sec-8.8 Space
HardwarcOrganjzationof the MemoryAddress 35
bank over lines A0 throughAre, and the byre of datais wrilten into or read from storage
locarion X orerline.Do-hrough D-. D cdJries rhe\4SBo, rheoyteotdara.dnd D0c;-
riestheLSB. This showsthara byteof datais accessed by rhe 8088jn onebuscvcle.A
memorycJ(le lor an F088rLrnning ar 5 MH,, w t- no $aiL.rare.rate. 800n..
When a word of data is ro be transfer"edberweenrhe 8088 and mernorv.we must
Derformrso acce$e.ofremor). readjogor sriling a bytFin eacnacce-. Figure8 r6lbl
illustates how the word storagelocarionstartingal addressX is accessed. Two bus cycles
are requred ro accessa word of data.During the fusr bus cycle, the leastsignificanrbyte
of the word, locatedat addressX. is accessed. Again the addressis appliedro the mem
oD banxoverA. lhroughAro.and.heb)reot datai. Fan.feredto o, irolnuo"g.'o.u.
tron X over Do tbroughD?.
Next, the 8088 automaticallyincrementsrhe addressso rhat it now points to bvte
dddre$X + L hi. addre$poin..lo lhene\rcon.ecutive b)re.lorage tocalionin men
ory, which conespondsro the most significantbyte of the word of daraat X. Now a sec-
ond memory buscycle is initiated. Durirg rhis secondcycte,daraare writren inro or read
l?om the storagelocation at addressX + 1. Sinceword accesses of memorytake two bus
cyclesinsteadof one,it takes1.6ms to access a word of datawhenthe 80S8is oDerarins
dr r 5 MH,, cloc,(ralew h ao wail !!ares.
The 8086 .nicroprocessorperforms byte and word data transfe$ differently from
the 8088.Lel us next examinethe daratransfersthar can take placein an 8086-based
355
Next, the 8086 auromaricallyincrementsthe addressso tharA. = 0. This reDresenrs
lhe nerl addreq,in memoryuhich ,s eren.Thena \econdmemon bu. c\cte L iniridred.
Duringrhi,,econdclcle.rhee\enb)re localed ar X - 2 in rheto\ banl is acces,ed.
The datatransfertakesplace over,buslines D0 throughD7. Tbis tansfer is accomDanie.d
b)& 0and BHE - l. lo rheproce.soj. dri, ie rhehighblreofrheuordol daia.
EMMPLE 8.6
Is theword at memoryaddress
0123116 of an 8086basedmicrocompureratignedor mis
aligned?How manybus cyclesare requiredto read it ftom memory?
Solution
The first byte of the word is rhe secondbyre ar the aligned-wordaddress0123016.There_
fore, the word is misalignedand requirestwo bus cyclesto be read from memory
8.I O MEMORYCONTROLSIGNATS
Earlier in the chaprerwe saw rhat similar control signatsare producedin rhe maximum
andminimum mode.Moreover,we found ihat in rhe ninimum mode,the 8088 and 8086
microprocessonproduceall the conrrotsignals.But in the maximum mode,the g288 bus
contoller producesthem. Here we wiil look morc closely ar each of thesesisnais and
rbeirtunctjonsu irh re,pecrlo memoryinlerfaceoperdrion.
Minimum-Mode
MemoryControlSignals
In the 8088 rnicrocompurersysrernshown in Fig. 8_18, which is configurealfor
Lheminimummodeotoperarion. $e tindlhartheconnotsrgnat( prorjdedro.upDonrhe
inrerfacero rhe memory\ub\ysremare ALL, tOA4, Dt/R, RLi. WR. arl nf|,r. T|*"
Io/i
DEN
sso
Maximum-Mode
MemoryControlSignals
W}len the 8088 is conligured to work in rhe maximum mode. it does nor diectlv
pro\ideall rl.econtrol.ignal( ro supponrhe memor)inrerface. Incread.an exremalbu'
controllet the 8288,providesmemoryconmandsandcontol signats.Figure 8 19 shows
an 8088connected in thiswav
Specificalt).rhe WR. tOA4. DT,R.bLN. ALE. andSSOrignat rine.on rhe8088
are Lhanget.The) dre replacedvirh nultiproce\\ot /or* rlOCKr signat.a b,l \rdrar
!94e (SrS1SJ,anda 4rar? rrarrr cod?(QSreS0).The 8088stitl doesproducerbesisnal
RD.whichprovides lhe.amelJnclionasil did in minimummode
The 3-bil busstatuscodeqS,Sn is nutputprior to the iritiation of eacbbuscycle.
It identjfieswhichlype ofbus cycleis to follow This codeis inputto the g2ggbuscon_
troller Here it is decodedto identify which type of bus cycle commandsignalsmust be
generaled,
Figure8-20 showsthe relationship belweenthe busstatuscodesandthe typesof
buscyclesproduced, Also shownin this chartare the namesof the co$esDondins com-
mandsignalsrharare generaedar the ourputsof the 8288.For instance,rhe inprircode
S:SrSoequalto 100fldicaresrhatan inerruction ferchbuscycleis ro takeplace.Sincefie
insructionferchis a memoryread.lhe 8288makesthenenory readconnand (fr-RDC1
outputswitchto logic0.
Anorherbuscommandprovrdedtbr thememorysubsystem is SrSl56equalro I J0.
This represents a memorywrite cycleand it causesboth the memorywrite conmand
8288
The rcad bus q,cle begtnswith srateTr. During this period, the 8088 ourputsrhe
20'bit addressof fie memorylocation to be accessedon its mulriplexedaddress/data bus
ADo through AD?, As throughAr, and multiplexed lines A6/51 tbrough Arr/56. Nore
that al the sametime a pulseis also producedat ALE. The rrailing edgeor the high level
of this pulse shouldbe usedto latch the addrcssin extemll circuitry.
Al.o \^e ceelhalar he {a1 ofT.. siCnal,lO/\4lld DT,Rare,et to rhe0logic
level. This indicaresto circuitry in rhe memory subsystemihar a memory cycle is in
p,!,sre\\anarha,,he8088; lornr ro recei\ed d from,bebu..Srdru. SSOr. at.oour-
IO/M
RO
DT/F
-- -t
Fisur€ s-22 (a) Minimum-mode memory read bus cvcle of dre 8086'
o loTq''b' \4drmum_mode
I R ; o r i ne d + t r np e m i . . i o no l l n r e l C o r p o r a l i O
mr:^ry ead bu, cycleof .he d08{-.,ReprInredwirl. Derris,ionol lnrelCoF
poralior O 1979)
at the beginningofTr andis held at this levelfor the durationof the buscycle;andthe
SSO statussignal is not produced.
Fignre 8-22(b) showsa read cycle of s-bit data in a Ina\ilnum mode 8086 based
microcomputersystem.Thesewavefoms are similar ro those given for the minimun-
modereadcyclein Fig. 8 22(a).Comparingthesetwo timingdiagrams, we seethatthe
addressand datatnnsfers that take place are identical. In fact, the only differencelbund
in the maximummodewaveformsis that a buscycleslatuscoite,SrSrS0,is outputjFsr
prior to the beginningof the buscycle. This statusinformation is decodedby the 8288to
producecontrol signalsALE, MRDC. DT/R, and DEN.
V/riteCycle
Figure8-23(a)illustratesrhetnite bus clcie trmingofthe 8088in ninimummode.
It is similarto thatgivenfor a rcadcyclein Fig. 8-21. Lookjngat the write cyclewave-
forms. we find that dudng Tr the addressis output and latchedwitb the ALE pulse.This
is identical to lhe read cycle. Moreover,IO/l'{ is set to logic 0 to indicate that a memory
cycle is in progressand statusinformation is ouiput at SSO.However.this time DT,&. is
switchedto logic L This signalsextemal circuits that lhe 8088 is going to tansmit data
w3
ora__j L.
DEN
_-J
--1 r-
sso r, (a)
Just as we describedfor the readbus cycle, the write cycle of the 8086 ditrers from
that of the 8088 in four ways; agaia SSOis not prcduced!Bm isiutput along with the
addressidata ,re canied over a 16 databl]s lines: and fnally, M/IO is the complement
of dle 8088'sIO/M signal.The wavefoms in Fig. 8-23(b) ilustrate a wrjte cycle of word
datain a ma,\imum-mode8086 system.
BHE
wR,
WR.
Fd
Figure8-Z Memoryinterfaceblockdiagram.
The 7,lFl73 is xn examplc of an octal latch dcvicc that can be used to implement
the ddr.€rr /d.., section of the 8086 s memor) i erface circuit. A block diagram of this
device is shown m Fig. 8-25(a) and fts intemal circuit] is shown in Fig. 8-25(b). Note
that ii accepF eight inpuis: lD through SD. As long as the clock (C) inpnt is ar logic I,
the outpxts of fte D-t-vpe ltip-flops follow fte logic level of the data applied to their cor
respondinginputs.When C is swilchedro logic 0, fte current contenlsof tbe D type fiip
flops de latched. The laiched inrbmation in the flip flopr is not output at data outputs 1Q
through 8Q unless the output'control (OC) irpu. of the buffers that fo ow dre larches is
at logic 0.IfOC is at logic l, fte outpulsare in ihe high-impedancesrare-Figure 8 25(c)
summdizes this operation.
In the 8086 microcomputer system, the 20 addresslines (ADo AD 5, A 6 Ar,)
and the bank higlr enable signal BHE a.e nomally la.ched;n ihe addressbus latch. The
circuit configuration shown in Fig. 8 26 can be used to latch these signals.Fixing OC
at the 0 logic le\€l permanendyenableslalched outputs AoL rhrough AreL and BHEL.
Moreover. thc addressinformation is latched at the outputs as the ALE signal ffom the
bus controller returns to losic 0 that is, when the CLK itrput of all devices is switched
io logic 0.
In general.it is importail to m;nimize the propagationdelay ofihe addresssignals
as they go through the bus in erface circuit. The switching propeny of the 7,1F373latches
that deternine this delay for.he cncuit of Fig. 8 26 is called enableao-output propaga-
tion d?ldJ and has a maxirnum value of 13 ns. By selecting fasi latches that is, iatches
with a shoner Fopagation delay time a maximum amount of the 8086's bus cycle tirne
is preservedfor fte accesstimc of the memory deviccs.In this way slower. lower cost
memory ICs can be used. These latches also provide bulTering for the 8086 s address
lines. The outpuis of the latch can sint a maxnnum of 2,1 lnA.
m
ao
80
O-C Enabl€C D o
L I.] H
LHL L
Figure 8-25 (a) Block diaSm of d @ta] D'rype latch. (b) Circuit diagm of the
74F373. (CouJtesyof Texas lnstrumentsIncorporated)(c) Operation of the 74F373.
(Courtesyof TexasInstrum€ntshcorpoFted).
''lll t-Tv
oc
|]l
tl
Ir*
I r---L t
f"'v
iLl -[
AHE
oa
DataBusTransceivers
'lhe
dala bush lnsceiNerblock of the busintertacecircuir cm be implementedwith
74F245octalbustransceiver ICs-Figure8 29(a)showsa blockdiagramof this device.
Nole thati1sbidirectionalinput/ourputIinesarecauedAj throughAs andB I drough Bs.
Lookingat the circuitdiagramin Fig. 8 29(b).we seedut the G inputis usedto enable
the buffer for op€ration.On the other h'ind, the logic level at the direction (DIIR) input
selectsthe direction in which data are transfen€dthroughthe device.For instarrce,logic
0 at this input setsthe transceiverto passdata{iom the B lines to the A lines. Siwitching
DIR to logic I reversesthe direction of datatlansfer.
Figure 8-30 showsa circuit that implementsthe databus transceiverbl,ock of the
businterfacecircuit using the 74F245.For the 16-bit databusof the 8086micr(rcomputer,
two devicesarerequired.Here the DIR input is ddven by the signaldatatransr"ioit/receive
(DT/R), and G is supptiedby data bus effable(DEN). Thesesignalsaie outlputs of the
8288 busconholler
Another key function of the data bus hansceivercircuit is to buffer t.loe &ta bus
lines.This capability is definedby how much currentthe devicescan sint at rheir outputs.
Ihe IoL rating of the 74F245is 64 mA.
BHEL
MRDC
7432
Addft 3ssDecoders
iR
G
Mic,op@s$d d.ta b6
] I
DBo-D8,
74F245
switches.o the 0logic level. For instance,whenBA : 01, outputYr is logic 0. The table
in Fig. 8-32(c) summarizesthe operationof the 74F139.
The circuit in Fig. 8 33 employsthe addrcssdecoderconfigurationshown in Fig.
8 31. Note that addressLinesArTL and ArsL are applied to the A and B inputs of the
/,1flJq decoder.fte addressline Aror i( usedro erableone ol rbedecoders and {r,r.
obtainedusing an inverter,enablesthe seconddecoderol the 74F139.Eachdecodergen-
eratesfour chip enable(CE) outruts. Thus both decodersof the 74F139togetherFoduce
the eight outputsCEottuough CE7.
e,*I'^
L2B
Ftgure 8-32 (a) Block diasrm of th€ 74F139 2line to 4line decoder/
denu|iplexer (b) circuit diagrm of the 74F139. (Counesy of TexasInslru-
nents Incoryorated)(c) oleration of the 74F139 de.oder. (counesy of Texas
InstrumentsInco@rated)
372
c&
cEr
cEr
1Y3 cE3
74F139
. 2Y0 cE4
2v1 cE5
2\2 cE€
2\3 CF,
Figur€8-33 Add.ress
de.odercircuit.
\2
Y3
Y5
dzA Y6
GzE
Y7
'*t*'
(c)
Frsure8-34 ol-:T:::
- d' qb.kdT.cr-al,-
rcorp"rar'"' '''lf .ff"iJ,i'"T'iii
tc;unes\ of Te\as Ins!ruments
'
(CounesyofTe\as ln\mments licorPonre! |
"ifll,T
cBz
cE3
cE4
c1 cEj
c2B @1
Figure E-35 Addres decodercircuit
using74Fi38.
B. i3 PROGRAMMABLE
LOGICARMYS
PLA5.GAt"s.and EPLD5
The block diagramh Fig. 8 36 rcprcsentsa typical PLA Looking at this diagram,
we seethal it has 16 input leads,marked Io through IL5 There are eight output leads'
labeledF0 lhrough F7.This PLA is equippedwith ttue€-stateoutputs For this reason.ii
hasa chip-enableconaol lead.In the block diagram.fiis control input is narked CE. The
logic level of CE determinesif the outputsare enabledor disabled.
When a PLA is used to implement random logic firnctions. the inPuts represent
Booleanvariables,and the outputsare usedto provide eight separaterandomlogic func_
tions. The intemal AND OR-NOT army is programmedto definea sum-of-productequa-
tion for eachof lheseoutputsin tems of the inputs and their complemenlsln this way,
Architectureof a PtA
Wejust pointed out that the circuitry of a PLA is a generalpurPoseAND-OR-NOI
aray. Figue 8 3?(a) showsthis architecture.Herc we seethat the input buffen supply
input signalsA andB andtheir complemenisA andB. Programmableconnectionsin the
AND aray permit any combinationof these inputs to b€ combinedto form a product
term. The Foduct term outputs of the AND array are supPliedto fixed inputs of the
*".,1
*t
t-
I
I
F=AB+AB
(b) =
44E l!:_37 G) BasicPLA archilectue. Inllenenting the losic tunctionF
(AB + AB).
sec.a.l3 Programmable
LogjcAfays 317
OR array.The output of the OR gateproducesa sum-of-productsfutction. Finally, the
r n l e r t e fc o m p l e m e n ttsh i s f u n d j o n .
The circuit in Fig. 8 37(b) showshow dre functionF - (AB + AB) is implemented
widl the AND OR NOT aray. Notice that an X markedinto theAND arraymeansthat th€
fuseis left intact,andno markingmeans!ba!it hasbeenblown to folm an opencircuii. Rr
ihis reason.the upperAND gateis connectedto A and B and Foduces the productterm
AB. The secondAND gatefrom the top connectsto A andB to producethe Foduct term
AB. The bottomAND gaG is markedwith an X to indicatefiar it is not in use.Cateslike
this that arc not to be activeshouldhaveaI of their input tuseLinksleft inlact.
Figurc 8 38(a) shows the circuit structurethat is most $ridely used in PLAS. It
differs from the circuit shownin Fig. 8-37(a) in two wals. First, the inverterhas a pro-
grammablethre€-statecontrol and can be usedto isolate the logic function Aom the oul_
put. Second,the bnffered output is fed back to fbnn anolherset of inputs to the AND
array.This new output conligumlion permitsthe outputpin to be progJallllrcdto wo* as
^ standardautput, standad input, or logic-cantrcllzd inputlor,tput For instance,if the
upperAND gate.which is the control gatefbr the output buffer is set up to permanendy
enablethe inverter and the fuse links for ils inputs that arc fed back from lhe outputsare
all blown open,the output functions as a standardoutput.
OIJTPUT
Kt-
CLOCK
INPUT
FEEOSACK
(b)
StandardPALruDevices
Now that we bave introducedthe rypesof PLAS, block diagram of tlle PLA' and
internal drchitectureof the PLA, let us continueby examini4 a few of the widely used
PAL devices.A PAl, or a programmableanay logic, is a PLA in which the OR arav is
fixed; only the AND array is programmable
The 16L8 is a widely used PAL IC. lts intemal circui.rv and pin numberingare
shown in Fig. 8-39(a). This device is housedh a 2Gpin package'as shown in Fig
8-39(b). Looking at this diagam. we seerhat it employsthe PLA drchitectue illustrated
in Fig. 8-38(a). Note that it has 10 dedicatedinput pins. All of.hese pins are labeledI'
There are also two dedicatedoutputs,which are labeled with the letter O' and six pro
grarnmableI/O lines,which are labeledyO Using fte programmableI/O lines' rhe num
ber of input lines canbe expandedto as many as 16 inputs or the Nmber of outputscan
be increasedto a5 many as eigh. lines-
All the 16L8's inpuLsare bufferedand produceboth the original form of the signal
and its complement.The outputsof the butrer are appliedto the inputs of the AND arrav'
This array is capable of producing 64 product terms- Noie that the AND gates are
arrangedinto eight groupsof eiglt. The outputsof sevengatesin eachof thesegoups are
usedas inputs 1oan OR gate, and the eighth ouFut is used to p.oduce an enablesignal
for the correspondingtlEee-stateoutputbuffer' In this way. we seethd rhe 16L8 is capa-
ble of producingup to sevenFoduct termsfor eachourpu! andthe Foduct ierms canbe
formed using any coqbination of lie 16 inputs
The l6L8 is manufacturedwith bipolar t€chnology-It operates{iom a +5V :l:109'
dc power supply and drawsa maximum of 180aA. Moreover,all it! inpuis and outputs
are at TTL compatiblevoltagele\€ls. This deviceexhibitshigh-speedinpui-outputprop-
agationdelays.In fact, the maximum l-to-O Fopagation delay is ratedas 7 ns
Anotherwidely usedPAL is the 20L8 devic€.l-ooking at the circuitv of this device
in Fig. 8-40(a), we seethat it is similar to that of the 16L8jusr described Howeve! the
20L8 has a maxim m of 20 inputs, eight outpuls, and 64 P terms. The device's24-pin
packaseis sllown in Fig. 8 40(b)
The 16R8is also a popular20 pin PLA. The circuit diagramal}dpin lavout for this
device;re shown in Figs. 8-41(a) and O), rcspectively.FIom Fig. 8 41(a), we find that
its eight fixed I inpursand AND-OR array are essedially the sameas thoseof the 16L8'
Thereiii oDechnge. The outputsof eight AND gates.insteadof seven,are suppliedto
the inputs of eachOR gare.
A numberof changeshavebeenmadeat the ouiput side of the 16R8-Note thai the
outputsof the OR gatesare fiIst latchedh D type flip-flops wirh the CLK signal Thev
are then bufferedand suppliedto the eight Q outputs-Another charge is tbat the enable
tll]
"o
!l 'o
380
Figure 8-40 (a) 20L8 ctcuit diagram. (Courtesyof TexasInstrumentsIncorporated)
(b) 20L8 lin layout. (Courtesyof Texashstrumenls lncorporaled)
3Al
6,:':
342
srgnalsfor the ootput invertersale no longer prognmmable. Now the logic level of the
OE control input enablesa[ three-stateoutputs
The last changeis in the part of the circuit that Foduces the feedbackinpuis ln the
16R8,theseeight inpu! signalsare derivedftom ihe complementaryoutput of the colle-
spondinglarch insteadof the output of the buffer' Fo. this rcasoq the ouq)utleadscanno
longer be pro$ainmed to work as direct inputs.
The 20R8is the registeroutputvenior of the 20L8 PAl Its circuit dia$am andpin
layout are give! in Figs. 8 42(a) atrd(b). respectively
ExpandingPtA CaPacity
Sone appiicationshaverequimmentsthat exceedthe capacityof a singlePLA IC- For
instance,a 16L8 devicehasthe abiliry to supply a rnaximumof 16 inputs' 8 outputs.and
64 productterms.ConDectingseveraldevicest€erher canexpandcapacityLei us now look
a! the way in which PLASare intercomectedto expand$e numberol inputsandoutputs.
ff a single PLA does not have enoughoutputs,two or more devicescan be con-
nectedtogelher into the configurationof Fig. 8 43(a) Here vr'esee that the inputs I0
through Ir5 on the two devicesare individualy connectedin parallel This connection
doesnot changethe numberof inputs.
On the olher hand, the eight outputsof the two PLAS are separatelyusedto form
the upper and lower btaes of a 16-bit output word. The bits of this wod are denotedas
OothroughOr5.So with this conneciion,we havedoubledthe numberof outputs.
\vhetr data are appliedto the inputs, PLA I outputsihe eight leart significantbits
of data.At the sameinstantPLA 2 outputsthe eight most significantbits Theseoutputs
can be usedto representindividual logic tunctions.
Another limitation on the apPlicationof PLAS is the numberof inplrts-The ma,\r
mum numberof inputs on a single 16L8 is 16.Howevet additionallcs can be connecled
to expandthe capacityof inputs Figue 8-43(b) showshow oneadditionalinput is added
This permits a 17-bit input denoredasIo through116The new bit 116is suppliedtbrough
invertersto the CE inputs on the two PLAS.At the output side of the PLAS, outputsOo
through 07 of the two devicesare individually connectedin paralel. To inplemenl this
coMeclion.PLA detrce'$i!h open-colle{lor or three-\tale ourpulcmuslbe rsed
When 116is logic 0, CE on PLA 1 is logic 0. This embles the devicefor operation'
andthe oulput functionscodedfor input I0 tfuough Ir5 are output at Ootbrough07- At the
sameinstant,CE on PLA 2 is iogic 1 and it rernains disabled Making the logic level of
116equalto 1 disablesPl-A 1 aDdenablesPLA 2 Now ihe input at Io through Ir5 causes
the output function definedby PLA 2 to be output at Oo through 07 Actually, this con-
nection doublesthe numberof Foduct terms as well as increases the number of inputs
OF INPUT/OUTPUT
8,I4 TYPES
(a) {b)
344
:
llL
..-i_
I
I
(a)
that is, some peripherallcs are treatedas isolaied I/O devicesand oihers as memory-
rnappedI/O devices.Let us now look at eachof theseryPesof I/O.
lsolatedInput,/OutPut
Wlten using isolatedI/O in a microcomputersystem,the I/O devicesare treated
separatefrom memory.This is achievedbecausethe so{iwarcand hardwaxearchitectures
oithe 8088/8086supportsepamtememory and I/O addressspaces.Figure 8-zg illus-
tratesthesememory and I/O addressspaces.
In our study of 8088/8086softwarearchitectue in Chapter2, we exarninedthese
addressspacesfrom a softwarepoint of view.We found that infbrnation in memoryor at
I/O pofs is organizedas bytes of data; that lhe memory addressspacecontainslM con-
,".uilu" Uyt" iaa..ttes io the range 0000016through FFFFFL6Iand that the I/O address
.o,...oniuin' O+K.on..cuLi\e blre add'e'se. In Ineran8e0000r' tuoughFFFF"
Figure8 45,ar iho\\s a more derailel]map of rhi' l/O add'e'csp:ce Herc$e find
that the;ltes of data in rwo consecutiveI/O addrcssescould be accessedas word-wide
data.For instance,l/O addresses 000016,000116' 000216, and 000316 canbe treatedas
independenr byte-widel/O ports.ports0. 1, 2, and3, or pons0 and 1 mavbe considered
togetheras word-wide Pot 0.
Note that the pan of the I/O ad&essspacein Fig 8-45(a) from address000016
nhrough00FFr6is refered to aspdg€ a Cedain UO inslructionscan only perform oper-
ations'topots in this part ofrhe addressrarge Olher I/O instruciionscaninput or output
datafor pons anywherein the I/O addressspace
This isolatedmerhodof I/O offers someadvantagesFirst, the complete lMbyte
memory addressspaceis available for use urith memory' Second' special instuctions
havebeenprovided in *re instruction set ol the 8088/8086to perforn isolated I/o inp'rt
pedor-
and ouD; operations.These instruciions have been tailored to maximize I/O
mance.i dis;dvantageof this rype of I/O is that all input and output datatransfersmusl
take piacebetueen the AL or AX register and dre UO port
lnPut/OutPut
Memory-MapPed
I/O devicescan be placedin the memory addressspaceof the microcomputeras
pon
well as in the independentI/O addressspace.In this cdse,lhe MPU looks at the UO
as though it is a storagelocation in memory.For this reason'the methodis known as
netnory napped I/O.
ln a microcomputersystemwith menory-mappedI/O' someof the memoryaddress
m
spaceis dedicatedtol/O ports For example'in Fig. 8 45(b) the 4096 memoryaddresses
tire rangefrom E0000r6throltgh E0FFFL'jare assignedto I/O devices Here the contents
of a<trtrlssE0000r6representb)'te-widel/O port 0, andthe conlentsof addressesE0000t6
and8000116 correspondto word-wide por 0
va :
E0oo316
E0004s (16-bilpod
Eooolls
0000i6 (15-bilpo't)
(b)
347
Wllen I/O is configuredin this way,inslructionsthat affect datain memoryare used
insteadof ihe specialinput/outputinslructions This is an advantagein that many more
instructionsand addrcssjngmodesare availableio perform I/O operations For instance'
the contentsof a memory-mappedl/O poll can be directly ANDed with a value in an
intemal register.In addition, l/O tansfers cannow take placebetweenan l/O port andan
in@mal registerother than ju$ Af or A,I. However,lhis also leads to a disadvantage.
That is, the memory instructionstgnd to exe.ute slower than thosespecifically desigrcd
for isolatedUO. Therefore,a memory mappedI/O routine may take longer to perform
than an equivalentprogrl]musing the inputoutput tnstructlons.
Anolher disadvantage of usingthis methodis drat part of the memo.y addressspace
is lost. For instance,in Fig. 8-45(b) addresses in the range from 8000016ihrough
E0FFFI6.allocatedto I/O, cannotbe usedto jmplement memory
8.I 5 ISOLATEDINPUT/OUTPUTINTERFACE
Interface
Minimum-Mode
Let us beginby looking at the isolatedI/O interfacefor a minimum-mode8088 sys-
tem. Figure 8-46(a) showsthis minimum-modeinterface.Here we find the 8088' inter-
faceciicuity, andVO poris for devices0 tbroughN I/O devices0 throughN can repre-
sent input devicessuch as a keybo.rd, output devicessuch as a printer' or inpuvoutpui
devicessuchas an asynchronousserial communicationsport An exampleof a rypical I/O
device usedin the l/O subsystemis a programmableperipheralinterface(PPI) IC' such
as the 82C55A.This type of deviceis usedto implementparallel input and output poris
The circuiis in the interface seclion must perform functions such as selectthe I/O port'
lalch output data. sampleinput dgta, synchronizedata transfers,and translatebetwe€n
TIL voltagelevels and ihoserequiredto operatethe I/O devices.
The data path between the 8088 and l/O interface circuiis is the multiple)Gd
address/data bus.Unlike the memory interface,fiis time just dre 16 least significantlines
of the bus, ADo tlrough AD? andAs rhough Ar5, are in use This interfacealso involves
the control si$als that we discussedas pad of the memory interface-that is ALE, SSO.
RD. WR. IO,M. DTA.. and DEN.
Figure 8-46(b) showsthe isolaredI/O intedace of a minimum-mode8086-based
micrccomputersystem.Looking at this diagram.we find thai the interface differs from
tbat of the 8088 microcomputerin severalways.First, the compleiedatabusADo through
, aDo-aD, !o
)
\---------------
Aa-A,a
---------------- ) uo
8@8
FD
IO/M
MN/MX OEN uo
tHE
' ADo-ADr5 l I
\-,/
3036 RD
VE
M/id
DT/F
MNA,IX tEN
N
(b)
Maximum-Mode
lnterface
tvhen fie 8088rs .trappedro opemrern rhe ma{mum moder\4J\/M} corurecred
to gound), rhe inteface to the I/O circuihy changes.Figure 8 47(a) illustrates this
configura.ion.
vo
3133
3to
s: 5,
0 iNlA
I
rorvc.A-idwa
I
iliSt
0 MRDC
I fuwrc,AMw'c
I
DATATRANSFERS
8,I6 INPUT/OUTPUT
INSTRUCTIONS
A 8, I7 INPUT/OUTPUT
Input/outpul operations ale pefbrmedby the8088and8086micrcprocessols thatemploy
isolatedllO usingspeclalinputAndoltput iDslructions logether wilh theI/O p-ortaddress-
i:rg motles.Thes=e instructions, ir (IN) and o&r (OUT), are lisied in Fig S-49' Tbeir
rnienonicsandforrnatsareprovidedtogetherwith a brjef description of theiroperations
Note tha! there arc two diilbrent forms of IN and OUT instructionslthe dircct 1/O
be
instluclio s andvariahleI/O /tntt?rclr",{t.Either of thesetwo rypesof instrxrclionscan
used1()tansfer a byte or word of data.All dau anslers takePlace between an I/O dev;ce
andtheMPU'SaccumulatofregisterFor thisreason,this nethod of perfoming l/O is known
^s arumulat.tr t/O Byte nansfersinvolvetheAL rEgister,andnod transfeNtheAX r€8is-
IN ( A . O€ l P o r r ) A c .= A L o r A x
o!rT
Outputindn€ci(v.dable)
EMMPLE8.7
Solution
First, the AL registeris loadedwith FFr6 as an immediateoperandin the instuction
MOV AL, OFFH
Now the datain AL can be ouFut to dle byte-wide outpLrtport with the instruction
OUT OABH, AL
sec.8.17 lnnftrcnons
InPuVOutPut 3rt
EMMPLE8.8
Write a s€riesof irsrructions that will output FFr6 ro an outpur port locatedat address
B00016of the I/O addressspace.
Solution
The DX registermust firsr be loadedwith the addressof rhe ouFur port. This is donewith
theinstruction
MOV DX,0B000H
Next, the dararhat are to be output must be loadedinto AL with the insruction
EXAMPLE
8,9
Data are to be read in from rwo blre-wide input polts at addrcssesAA16 and A916and
thenoutpui as a word to a word-wideoutput port ar addressB00016.Wrire a sequenceof
insiruciionsto perfom this input/ourputoperarion.
Solution
We can firsr read in the byte from the pot at addressAA16 inio AL and move it to AH.
This is done fith the instructions
IN AL, OAAII
MOV AI{, Ni
Now the other byte, which is at port A96, can be read into AL by the instrucrion
IN AL, OA9H
The word is now held in AX. To wrile our the word of data,we load DX with rhe aaldress
800016and usea variableoutpurinsruction. This teadsto rhe following:
l. 8.IB INPUT/OUTPUT
BUSCYCLES
In Section8.15, we found that the isolatedUO interface signatsfor the minimum mode
8088 and 8086 miffocomputer sysremsare essentially rhe same as rhose invotved in
the memory interface.In fact. dle function, logic levels. and riming of a signalsother
I on. b$ cvil.
r'lr,
IO/M
F6
DT/F
$o --J
WU
DT/R-
DEN
---t
^',.iitrd:l@
ber that for the 8086 microprocessorthis signal is usedaloDgwith Ao to selectrhe byte-
wide or the word-wide porr. Next, lhe 8086'sdatalransferpath to the I/O intedaceis the
16-bit address/dafa bus, not 8 bjts as in the 8088 system.Thercfore.datatransfels,which
rakeplaceduring T3,cantake placeoverthe lower 8 databuslines, upper8 databuslines,
or all 16 databus lines. Thhd, dre 8086 outpuislogic 0 on the M/IO 1ine,while the 8088
outputslogic 1 on the IO/M line. Thar is, the M,{O contol signalof the 8086is the con
plementof that of the 8088.Finally, the 8086doesrot producean SSOoutput signallike
the onein the 8088.
R E V I E WP R O B L E M S
Section8.l
1. Nameihe tecbnologyusedto fabricalethe 8088 and 8086 rnicroprocessors.
2. wlat is the transistorcount of the 8088?
3. Wlich pin is usedastheNMI inputon the 8088?
4. which pin providesthe BHE/S?outpntsignalson the 8086?
5. How much memory can dle 8088 and 8086 direcily address?
6. How large is ihe I/O addressspaceof fie 8088 and 8086?
Section8.2
7. How is minimurn or naximum modeof operationselected?
8. Describeihe differencebetweenthe minimum-mode8088 syst€mand ma,\imum_
mode8088system.
tq7
9, What ouFut funciion is performedby pin 29 of dle 8088 when i" the minimum
mode?Maximummode?
10. Is the sienalN4,/I'O
an input or output of the 8086?
11. Nameonesignalthatis suppliedby lhe 8088but not by the 8086.
12. Are the signalsQSo and QSL producedin lhe minimum mode or maximum
Section8.3
13. Wlar are rhe word lengths of the 8088\ addrcssbus and data bus? The 8086's
address busanddatabus?
14. Does$e 8088havea multiplexedaddress/dara bus or independentaddressanddata
buses?
15. What mnemonicis usedto identifythe leastsignificanibit of the 8088'saddress
bus?The most significantbir of the 8088'sdatabus?
16. \l/llat does statuscode SlSr : 01 mean in terms of lhe memory segmentbeing
17. Which output is usedto signal exiemal circuity fiat a byte of datais availableon
the upperhalf of the 8086'sdatabus?
18, What doesthe logic level on M,{b signal to extemal circuitry in an 8086 micro,
Section8.4
23. ldentify the signal lines of tbe 8088 that are different for the minimum-modeand
ma,{imummodeinterfaces.
24. Wharsiatusoutputsof the 8088areinputsto rhe8288?
25, Whar maximun'mode contol signalsare generatedby the 8288?
26. What function does the LOCK signal serve in a ma{imum mode 8088 micro-
computersystem?
27. What statuscode is output by the 8088 to rhe 8288 if a memory read bus cycle is
takingplace?
28. What connand output becomesactiveif the statusinpursof the 8288 are 1002?
29. ff lhe 8088 executesa julnp instruction,what queuestatuscode would be output?
30. What signalsare provide.dfor local bus control in a ma{imum-mode8088 system?
Section8.6
35. At v,hat speedsare 8088sgenerallyavaitable?
36. What frequencycrystal must be connectedberweenihe Xr and X? inputs of rhe
clock generatorif an 8088-2is ro run ai tul1 speed?
37. What clock ourputsare produce.dby the 8284?Wlat would be their frequenciesif
a 30-MHz crystal were used?
38. What are the logic levels of the clock waveformsapplied ro the 8088?
Section8.7
39. How many ciock sraresare in an 8088 bus cycte that has no wait states?How are
thesestatesdenoted?
40. Wlat is the durationofthe bus cycle for a 5 MHz 8088 that is running at tuI1speed
and with no wait stares?
41. What is an idle srate?
42. Wlat is a wait stare?
43. If an 8086running at 10 MHz perfonnsbus cycleswith two wail states,wharis the
durationof the buscycle?
Section8.8
44. How is the memory of an 8088microcompurerorganizedfrom a hardwarepoinr ot
view? An 8086 microcompurer?
45, Give an overviewof how a byte of datais readfrom memoryaddrcssB0003t6of an
8088-basedmicrocornpute! and list the memory control signals along with their
activelogic leveis that occur during the memoryreadbus cycle.
46. Give an overview of how a word of data is wriften to memory starting ai actdress
A000016of an 8088 basedmicrocompute! ,nd tisi the memory conaol signats
togetherwith their acrivelogic levelsthat occur dwing the mernorywrite cycle.
47. In which banl of memoryin an 8086-basedmicroconputer areodd-adatressed byres
of datastored?Whar bank selectsignalis usedto enablethis bant of memory?
48. Over which of the 8086'sdarabus lines areeven addressedbyresof daratransferred
and which bank selecrsignal is active?
49, List the memory control signalsrogetherwith their active logic levels that occur
when a word of data is writter io memory addressA000016in a minimum,mode
8086microcomputer system.
399
50. List the memory conlrol signals togetherwith their active logic levels that occur
when a byte of data is wditen to memory address8000316in a minimum-mode
8086 miffocompurer Over which datalines is the byte of datatransfered?
Section8.9
51. In a naximum-mode 8088 microcomputer,what code is oulput on SaSrwhen an
iDs.ruction'fetchbus cycle is in progress?
52. What is the value of SaS3if the operandof a pop instruction is being read from
memory?Assumethe microcomputeremploysthe 8088 in the maximumnode.
S e c t i o8n. 1 0
53. mich of dre 8088'smemory control signalsis the complementof the correspond-
ing signalon the 8086?
54. What memorycontrol ouipur of ihe 8088 is not providedon the 8086! What signal
replaces it on ile 8086?
55. In a maxirnum-node 8088 basedmicrocornpuie! what memory bus statuscode is
output when a word of instruction code is fetchedfrom memory?Wbich memory
control outputG)is (are) Foduced by the 8288?
56. In ma{mun node, what memory bus statuscode is output when a destination
operard is writlen to memory?Wlich memory control output(s)is (are) produced
by the 8288?
57. When the instruciion PUSH AX is executed,what addressbus status code and
memorybuscycle codeare outputby the 8088 in a rnaximum,modemiffocomputer
system?Which conlmandsignalsare output by the 8288?
Section8. i I
58. How mary clock statesare in a readbus cycle that hasno wait states?What would
be the duraiion of this bus cycle if the 8086 were operatingat 10 MHz?
59. What happensin the TL part of the 8088'smemory reador wrire bus cycle?
60. Descdbethe bus activity that takesplace as an 8088, in minimurn mode, wites a
byte of datainio memory address8001016.
61. Wtich two signalscan be used to determinethat the current bus cycle is a write
Section8. i 2
63. Give an ove iew of the function of each block in the memory interfacediagram
shownin Fig. 8-24.
64, When the instructionPUSH AX is executed,what bus statuscodeis output by the
8086 in maximun mode, whal are the logic levels of Ao and BHE, and what
rcad/write control signalsaft producedby the bus controller?
65. Wlat type of basic logic devicesis providedby the 74F373?
66. Specilythe logic .ererrol Bl-tLL.lTwRC. raRDC.aodAa $hen rJre808bIn l-r8.
8 24 rcadsa word of datafrom address12340H.
70, MaLe a drawing lite ihat shownin Fig. 8-30 to illustrate the data bus tansceiver
circuit neededin an 8088-basedmicrocomputersystem.
71. How nany addressiines must be decodedto generatefive chip selectsignals?
72. Name an IC that implementsa twoline to tbur-Linedecoderlogic tuncrion.
7 3 . I f l h e i n p u r " r o7r 4 F l l 8d e c o d ea 'r eC L C , ^ 0 . G . 8 0 . a n a C B q- l 0 l
, which output is active!
7,1. MaLe a drawing for a ninimum-mode 8088-base.dmicrocomputerfor which a
74F138 decoderis used to generateMEMR and MEMW from the RD, WR, and
IO,M sigftls.
Section8. | 3
75. What doesPLA standfor?
76. List tkee properies that measue the capacityof a PLA.
77. wlat is the programmingmechanismusedin the PAL called?
78. What doesPAL standfor? Give the key diftbence betweena PAl- and a PLA.
79. Redmw the circuit Eol,n in Fie. 8-3?(b) to illostrate how it can implement lhe
logictunctionF: (AB + AB).
80. How many dedicatedinputs, dedicatedoutputs, prograrnmableinput/outpuis.and
Foduct tems are suppoftedon the 16L8 PAl?
81. what is the rnarimun numberof inputs on a 20L8 PAL? The maximun Dunber of
82. How do the outputsof dre 16R8differ ftom thoseof the 16L8?
83. Usea lol8 ro decodeaddre- line' ArTLLluougn Arqr to generaFCh throughCLa.
SectionB.l4
84. Name the two types of inpuUoutput.
85. What type of I/O is in use when peripheraldevicesare rnapp€dto the 8088's l/O
address space?
86. Which type of I/O hasthe disadvantagethat part of the addressspacemus.be giYen
up to implementI/O ports?
87. wlich type of I/O has the disadvantageihat all I/O datatransfersmust take place
rhrcughthe AL or AX register?
401
8.l5
Section
lires relaiilc to an iso-
St Wr.ata.. tle runctionsof the 8088s addressandd'itabus
latedl/O operation l
indicatesto Dxremal
89. In a mininun-node 80118microcompulerwhich lignal
nol lhe menory
cifcuiry that the curent bus cycle is lbr rhe t/O inledaceand
8.I 6
Section
96. How manybits arei)r the 8088'sI/O address'l
9?, wblt is therangeof byte addresses in lhe 8088'sI/o addressspdce?
spacein lermsol wotd-wideI/o porls?
98. What is the sizeof ihe 8086'sI/o 0ddr€ss
99, ln rn 8086-based lnicrocomPuter syslem,whatArethe logic levelsol Ao 4ndBHE
*lr"n o tyr" ul aomis beilu written to l/O addrcssA00016lIf a word of dalais
beingwriltento address A000r6?
100. In an 8088 microco[]puter$yslem,how mrny buscyclesare I equired-to outputa
wordof datato I/O address AOO0ld? In aI1801t6microcomputef system?
8.l7
Section
101, Describethe operalionperfornedby the instfuctionIN AX' 1AH
102. Write an instluclionsequence to pedbrn the sameoperutionas thatof theinstruc
tion in problem101.but this tinreusevariableor indirec!I/O
AL'
103. Delcribethe operationpertbrncdbv the instructionOUT 2AH
104. Write an insirltctionsequence thatoutputs the byie of dala 0Fr6 to an dutpulpod at
address10006
105. Write a sequencc of insructionsthatinputsthebvteof darafion1inputpofs at l/O
in
aaaresses A.OOO*and 800016.addsthesevaluestogether'and savesthe sun
lnemorylocationlO SUM.
r h e i n p Jpl o n a r l / O
1 0 6 .W r : r e J' e q u e r t r \ 'ionl' r r t r c L rruhnl 'r r l i n T ulrn c c o n l e n l ' o l
d o d r e '8 0 J n Jj l m p r o r h eh ( e r n r g i r o J e n h ( r o J l i n e e n l i h <hdv l h eL r b e l
d
"
ACTIVE INPUT if the lcastsignilicanlbit of the datais I
4|)3