Concept Ualquest I Ons
Concept Ualquest I Ons
Concept Ualquest I Ons
Concept
ualQuest
ions:
-
Q1)St
atet
heuseofsev
ensegment
.
--
>-Asev ensegmentdi spl
ayi saform ofel ectroni cdisplaydev i
ceusedi ndigit
al
clocks,electr
onicmet ers,
basi ccalculatorsfordi splayingdecimal numer alsthat
i
sanal t
er nat
ivetomor ecompl exdotmat r
ixdi splays.
-Theyar esomet imesusedi npost ersort ags, wher etheuserei therappliescolor
topr epr
intedsegment s,orappl i
escol orthroughasev ensegmentdi gittemplate,
tocomposef iguressuchaspr oductpr i
cesort elephonenumber s.
-Thesev ensegmentdi splayhasi nspiredtypedesi gnerstopr oducet ypefaces
remi ni
scentoft hatdi
splay,suchasNewAl phabet ,”DBLCDTemp” ,
”IONB”, etc.
-Usingar estr
ictedrangeofl ett
ersthatl ooklikedi git
s,sev ensegmentdi spl
ays
arecommonl yusedbyschool chi
ldrent oform wor dsandphr asesusi ng
techniqueknownas“ calculatorspell
ing” .
Q2)
Listv
ari
ousdi
spl
aydev
iceswi
tht
hei
radv
ant
agesov
erot
her
s.
-->LightEmi ttingDev ice:
-cheap, v
er ysimpl eelectr
oniccircuit
s.
-reli
abl e.
_ -ef ficient.
Liqui dCr ystal Displ ay:
-producesv er ybrighti magesduet ohighpeakint
ensity
.
-producesl owerel ectri
c,ma gneti
c ande l
ectr
omagn et
icfi
eldst
hanCRT.
-consumesl esst han1/ 3rdpowercompar edtoCRT.
Cat hodeRayTube:
-lessexpensi vethancompar abl
edi spl
aysusingotherdi
splayt
echnol
ogy
.
Ithasf astr esponset i
mesandnomot ionar t
if
acts.
-Bestf orrapi dit
yorchangi ngi mages.
-producesbestcol or
.
Pl asmadi spl ay:
-largerscr eensi zeav ailabil
i
ty.
-bet tercol oraccur acyandsat urati
on.
-bet termot iont racking.
Q3)Writ
eaprogram insuchawayt hat27Hand45Hshoul
dbe
vi
sibl
eacrossport
0andpor t1respecti
vel
y,nowaddt
hem .The
r
esultshoul
dbev i
sibl
eacrossport2.
-
->
ORG0000H
MOVA,#27H / /copyt heimmedi at
enumber27Ht oaccumul at
or
MOVP0,A //cont entsar ecopiedfr
om accumul at
ortopor t
0
MOVB,#45H //copyt hei mmedi atenumber45Ht oregi
sterB
MOVP1,B /
/cont ent sarecopiedfrom r
egisterBtopor t1
ADDA,
B /
/addt hecont entsofaccumulatorandr egi
sterB
MOVP2,A / /
mov est heresultfr
om accumul atort
oport2
END
Pr
obl
em Sol
vi
ngQuest
ions:
-
Page1
/2
TestSheet
Q4)
Wri
teapr
ogr
am t
odi
spl
ayev
ennumber
sbet
ween0-
9.
-
->
ORG0000H
MOVP0,#30H //display1
LCALLDELAY //wai tforaminute
MOVP0,#79H //display3
LCALLDELAY //wai tforaminute
MOVP0,#5BH / /display5
LCALLDELAY /
/wai tforami nut
e
MOVP0,#70H / /display7
LCALLDELAY /
/wai tforami nut
e
MOVP0,#7BH / /
display9
END
Q5)I
f08Hand24Har eaddedt
ogethert
hentheobtainedr
esult
shouldbedi spl
ayedacr
osstheLEDsconnectedacrosspor
t1.
Nowi nter
changethenibbl
esofthi
sobtai
nedresul
tanditshould
bedisplayedacrossport0.
-
->
ORG0000H
MOVA,#08H //copyimmedi atenumber08Ht oaccumul at
or
MOVB,#24H //copyimmedi atenumber24Ht oregist
erB
ADDA,
B //addcontentsofaccumul at
orandr egi
sterB
MOVP1,A / /mov esresul
ttoport1
SWAPA //inter
changest heni
bblesoftheresult
MOVP0,A / /mov escontentsofAtopor t
0
END
Q6)I
f42Hand35Har eaddedt
ogethert
hentheobtainedr
esult
shouldbedi spl
ayedacr
osstheLEDsconnectedacrosspor
t0.
Nowi nter
changethenibbl
esofthi
sobtai
nedresul
tanditshould
bedisplayedacrossport2.
-
->
ORG0000H
MOVA,#42H //copytheimmedi atev al
ue42Ht oaccumulat
or
MOVB,#35H //copyimmedi at
ev al
ue35Ht oregi
sterB
ADDA,
B //addscontentsofaccumul atorandregist
erB
MOVP0,A //mov estheresul
ttopor t0
SWAPA //
interchangethenibblesofresult
MOVP2,A /
/mov escontentsofAt oport
2
END
Anal
yti
calQuest
ions:
-
Page2
/2
TestSheet
Q7)Wr
it
eaprogr
am i
nsuchawayt
hat45Hshouldbev
isi
ble
acr
osspor
t0andthe1'
scompl
ementof45Hshoul
dbevi
sibl
e
acr
osspor
t2.
-
->
ORG0000H
MOVA,#45H /
/copyi mmediatenumber45Htoaccumulat
or
MOVP0,A //copycontentsofaccumul
atortoport0
CPLA //takescomplementofaccumulator45H
MOVP2,A /
/copyt her
esulttoport
2
END
Page3
/2
TestSheet
Q8)Wr
it
eaprogr
am i
nsuchawayt
hat64Hshouldbev
isi
ble
acr
osspor
t3andthe2'
scompl
ementof64Hshoul
dbevi
sibl
e
acr
osspor
t1.
-
->
ORG0000H
MOVA,#64H / /copyimmedi at
ev alue64Htoaccumul ator
MOVP3,A //
mov escont entsofaccumul atort
opor t3
MOVB,#01H / /
copyi mmedi atevalue01Ht oregi
sterB
CPLA //takescomplementofcont entsofaccumul at
or64H
ADDA,B //addscontentsofaccumul at
orandr egi
sterBandf i
nds2scomp
l
ement
MOVP1,A //copyt heresulttopor t1
END
Q9)Wri
teapr
ogr
am t
odi
spl
ay'
LAbS'
.(sequent
ial
l
yonechar
act
er
af
teranot
her
)
-
->
ORG0000H
MOVP0,#0EH //displayL
LCALLDELAY//waitforaminut
e
MOVP0,#77H //di
splayA
LCALLDELAY//waitforaminut
e
MOVP0,#1FH //
displayb
LCALLDELAY//waitforaminut
e
MOVP0,#5BH //di
splayS
END
CONCLUSI
ON
-Sevensegmentdi splayi
sa10pi nconf i
guredci
rcuitusedtodispl
aycharact
ers,
symbol sandnumber s.Itconsistsof2commonpi nsincaseofcommon
cathodeorv ccpinsincommonanode.
-other7pinsareusedt oglowLEDswhi char epl
acedassquar i
sh8.
-I
tispossibletodisplayt
hedeci mal val
ueofbinarynumberona7- segment
displayusi
ngBCDdecoder .
-Howev erthi
smet hodwillall
owdi splay
ingonlydigi
tsfrom 0-
9andl ett
ersAtoF.
-Theonlywayt odisplaynumbermor ethan9i stouseadi spl
aythathasmore
than7segment sorjustusingmul ti
ple7-segmentdisplay
satoncewi th
correspondingBCDdecoder .
Page4
/2