You are on page 1of 5

thi înerememt cot ,beve haw to first bna it tu

cne withi mimr)


umulatr and then renent iH
eyeles amd 10states ae
needed.
-43

forimput devie
IN gbit port acol
OUT 8bit pori. ",
olevice.

' 256 T/b devie

<data. addreiaddren gOH


devia Eport
IN meas ,
device 9OOk port
addren
devie's cnten will
Sdata devic (B1H/
I/D bestoredin
Lccumator
Soutut,
devie (ero/inen
OVT BH meam,the d
at).
eottgsa swtput witl be nent tothe
devie.shich port addren H. y
putputmeans,
oriumulatw
onternt
IN 90 2byte truc tn.
1bT states.
y3 machine ycle,

Time delang, prugram waing ngle


reqiste.
T staten
states. (totsin 2 byte îtnuction).
cFFH T
LoDp : DCR 4T 0(1byte îatuetin)
staten (3 byte irtruchn)
JN? tb/T4 As wng os JNZ state ment (uonditibn)
true irequires 1oT staten,othevise
4T stotes
u
required.
(FF (2ro tmes, neb,the JNZ trutin
JNZ iehion u true,onby 1
tima
Che
e
la
254
fime) H
he
false.
fime
A
first wenil coider,
erey ime the TNY statemenl
ntu (ie
wme 1DTState.
255 imes).
e
authe time the JN? ill uw Gn 4 tw peR c)
So. wthnLopp, thu aru
14T states (io fn JN? Ond

: Time required (T
we naw anlien that eey
(255 X 14) x b.5 Tstate, taken 0-5Us
elvek fre.
clock fre 24H2.
toideungy
LOndition
aetwaly, 254 imes, the JNI atis
But Se fer-the lort executio,
i naisfed., Lont on time Hin ied.
states,
T SD, for oun Pximation,
e
vswdedIh
JN?Cumes timm reqired foy
se we havetu subta-l the
3 extal T states,
those 3T state).
MUI efFH
truetin
amd otside the lop, theu ithen
T states.
shich veqiren
So,-the 4tod time reqired
q95,16- (oxo:5)4s
+7ko.sus
T =7us.
(78549) us.
795 s
that We con
s.
1795
Se tsta time delay delauy
m

So. appxinaley 19-t6


com generbe ated.
mt,
mgram wing re: pa: l7 nerae delay b moreham -9
e Delay
Tetates, intaetipn).
3 byle
4> 10T state
LX1 B,2 394!1 Rrelatedin tructoste S befngs byte inat).
Lop: DCX B +aken 6TStat),
MDV Aje 4T
11
* we com nst
we
JN2 tiei
B states. beaune DeXs
ORA
after DexB,reg
TN? p io7T dealswith paun
ie (6bits,
Ample,
ie previbm 4T
states. registen, for ts bit .sD,
we
Lons
wse
JN? atter
me
wop de.lay paci reloted nstructin.
) ine my eg

2394t+
ms.
109
TStd tirne renirad ()
t04m -(t xos)44(Dxos)4
Veyyeny maW rmaadt
lD ms.
3255- prqrammable periphenal fnt entau
I/D Addrened by )
wnique addrem (o portaddren
bit
devie addrened.
1/o devies cam be PB,P.4).
2=2st
(Contl'word,
reg-(aemengly Jntenfae port(A,
8 bit)7

PA(B) fdevie

D Data Bun. P-B (9)


Do
(a ot).
pes) PClPo-P)
PCU(PC4-P3)
Lonfiquned

comrnuitotin
ntenfang devie needed to mateompatiblemamy /
di{{erenu b/w thern
poenoY ando /o devie beawne, Aher au fenmd /wde rma
in terma 5t worling priniple, sped amd wol
825s i as mediator thrugh 1/p devie cam hieh
acs os an oterfaing device.
Coneetto 09s and hene
3 ports- A,B amdc,cam hold
semd 8 bit data,
82T ha heme
These ports ou tontiqunable ond
rough ts data bus. com behae an fput port or output
called ogrammable.p 3 ports /e port.
coTnect deviu with pt7t A,
thN it i
port.3fwemect nput pbrt
if ye
p
derie, then iti
Iruide,
* trol wbrd
we
con write 9 bit wrd.
registen",
-that wod n called cortrsl word, aceYding to thot
Lontrsl word povts conigwedy
y pot c com be shlited n tro port. - pcL(Len)
VP port amd pou ttiahen)
uppen
or
com be wed as a
srecom aa ningle pord shole ot 9 bit

he wed itas, toD, 4 bii PTtS,.

* com be îdevtied by proenr


The pust ng addreh bus. To

addren these ports, me ned least bit.


at 2

ddren l6it n
g08s. Sinto, we
requne by we
wpen
sits, rajet the
det bts, ie Ag-A

| Contsl ragister.
Ay A
Ag An A
we noed 8bits
O.
addren,
Bu
neoded tu speuty
1

I783| Canbec
vamdomy.
daned

we comidened,
He
IN &DH (poraddren)
read data /pdevie S

Thii mea pruno read go data ire devie, -tbugh porlA.


whieh addres 0H- Tnthe data of 301 /p
quen to he acumulat
&

e9T,
OUT 31H (pordB addren)
o'poleviu through 11
Aecunmulatur eonterl con reachthe
deniae, one ide ot hich, we
hye g03md pthen ide
we hawe 1/0 deviu

Cont D 4 Dg
D
DD
D5
wbrd
Cew).
mode-o (inple z/ofw Pe/p)
Bsr mode a homdchakin
mode-s(Behoe. uke
|Csit set-renet)
c mode).
fw pori only.
LAmode-o
ndividual bit
porte com be set s/o devie
6or eset. mode-D: @5 cam semd datato
or vie veNsa direcly awnunmg
botha eady to exehamge dat. sut.
ifthee spd mismtehthem
-IhenewÂIl be an oyerfo.
mot ready, but B09rh
: hadndchakes/b: if s/o devie is
mode-1
Dueh c awe, 302s sendoa
ready to oend data, (r Vie vesa) in
prioy iamat tu o n
device to nfrm;hat oevio, that elata readn
gna t g0 -hat,e
t L

Cemt. I6 deviu.-then send ackrvow bdgemert


dob om be recoi ved. n-thin wawy, 1he homdshaking methdwr
the Todevie dend-the hamdshakir
imal
frst Porl A

Port c(v)
) torts cambe o
oivided t
qorups
(rr. A
omd Gts).
Cortrol word -frmat.

D6 Dg D
Grup A

GCsup-b.
Port cu P0Yt CL

60/p

port A

Mode, Ö4edeo
I-mwde 1
O0mDde D
oIMDde mode-2 o nst awaila ble
Ix-wwde
m qroup- B.

mode o . what wiH bethe orlword


A) Jfal purtt ae output portr amd
.ou au= purts au
ofp pot; then
port au in mde-o,
Dy
b 1
(b mode)., and al l
D4 Ds D D
-Do =D,
SD, DD=
Contsl word:

You might also like