Anda di halaman 1dari 7

Expt. No.

15
Title :- 8279 Keyboard and Display Controller.
Proble !tateent :- "rite 8#8$ %&P to initiali'e 8279 and to display ()ara(ters in ri*)t
entry ode. Pro+ide also t)e ,a(ility to display.
1- C)ara(ter in le,t entry ode.
2- .ollin* display
/- 0las)in* display.
%12:- Write 8086 ALP to initialize 8279 and display characters in
a) Right entry mode
) Le!t entry mode
c) Rolling display
d) "lashing display#
T)eory:-
Keyboard ode:-
$
1- De(oded s(an ode::
%n decoded mode the internal decoder decodes the least signi!icant t&o its o! scan lines
internally to pro'ide !o(r possile cominations on the scan lines )*L0 to *L+),
---0$--0-$-0--$0---
.h(s the o(tp(t o! decoded scan is acti'e lo&# .hese !o(r acti'e lo& o(tp(t lines can e also
(sed to inter!ace !o(r digit se'en segment displays$ 8 / 0 matri1 2eyoard eliminating the
e1ternal decoder#
2- En(oded s(an ode.:
%n encoded mode$ the scan co(nter pro'ides the inary co(nt !rom 0000 to ---- on the !o(r
scan lines )*L0 to *L+) &ith acti'e high o(tp(ts# .his inary co(nt m(st e e1ternally
decoded to pro'ide -6 scan lines#
3isplay can (se all -6 lines to inter!ace -6 digit se'en segment display$ (t 2ey oard can
(se only eight scan lines o(t o! -6 scan lines#
Display odes:-
1- .i*)t Entry:-
%n the right entry mode$ 8279 displays characters !rom right to le!t in m(ltiple1ed display
li2e calc(lator# .he !irst entry displayed is on the right most display# .he ne1t entry is also
displayed on rightmost display a!ter the display is shi!ted le!t y one character#
2- &e,t Entry:-
%n le!t entry mode$ 8279 displays characters !rom le!t to right in m(ltiple1ed display li2e a
type&riter# %n this$ each display position is directly corresponds to a yte or nile in the
display RA4# Address 0 in the RA4 is le!tmost displayed character and address -5 is
rightmost displayed character#
Deterination o, (odes !tored at 2###:
a
f g B
e C
d . dp
.he 7 segment displays (sed are common cathode type# *o to glo& the segment$ send logic - to the
segment#
.he code can e !o(nd as,
Di*it to be
Displayed
D7 D$ D5 D3 D/ D2 D1 D#
4ex (ode
&ED se*ent d ( b a , * E dp
- - - 0 0 - - 0 6 76
- - - 0 - - 0 0 6 78
0 - 0 0 0 - - 0 6 06
0 - - - - - - 0 6 77

!E&ECT15N %DD.E!!E! 50 8279 %.E:
%- C5NT.5& "5.D .E61!TE. : /14
7- D%T% P5.T : /#4
Di,,erent (oand 8ords o, 8279 9sed in t)e pro*ra are:
1- Key board: Display 2ode set (oand ;###-
.his command is (sed to program operating modes o! 2eyoard and display# .he Least
*igni!icant + its decides the 2eyoard mode and ne1t 2 its decides the display mode
D7 D$ D5 D3 D/ D2 D1 D#
# # # D D K K K
K K K Key board odes
0 0 0 7ncoded scan 2eyoard 2 2ey loc2 o(t
0 0 - 3ecoded scan 2eyoard 2 2ey loc2 o(t
0 - 0 7ncoded scan 2eyoard 9 2ey roll o'er
0 - - 3ecoded scan 2eyoard 9 2ey roll o'er
- 0 0 7ncoded scan sensor matri1
- 0 - 3ecoded scan sensor matri1
- - 0 *troe inp(t encoded display scan
- - - *troe inp(t 3ecoded display scan
D D Display odes
0 0 8:8 it character display le!t entry
0 - -6:8 it character display le!t entry
- 0 8:8 it character display right entry
- - -6:8 it character display right entry
2- "rite Display .%2 (oand 8ord;1##-
.o &rite data into display RA4 it is necessary to set 8279 in &rite display RA4 mode
D7 D$ D5 D3 D/ D2 D1 D#
1 # # %1 % % % %
%1 71T: 1: Enables %9to in(reent ode
#: Disable %9to in(reent ode
%%%%: !pe(i,ies t)e address o, 1$ byte display .%2
/- Clear Coand ;11#-
%t is (sed to clear all the ro&s o! display RA4 &ith a select tale lan2ing code$ to clear the
stat(s o! "%"; RA4 and to reset interr(pt o(tp(t line#
D7 D$ D5 D3 D/ D2 D1 D#
1 1 # CD2 CD1 CD# C0 C%
CD1 CD# 7lan<in* (ode
# = All 0<s !or common cathode display
1 # 20= !or alpha n(meric displays
1 1 All -<s !or common anode display
71T Des(ription
CD2 71T:
-, 7nales clear display
0, 3isales clear display
C0 71T:
-, 8lear the stat(s o! "%";$ Resets the interr(pt o(tp(t line and sets the sensor RA4
address to 000
C% 71T: 8lear all its#
Coon &e,t entry> ri*)t entry and ,las)in* pro*ras:
8odes corresponding to display digits are stored at 2000= memory location on &ards
Code C)ara(ters to display
76 3
78 >
06 9
77 A
Proble stateent: -
a) &e,t entry ode: - 3ecoded scan 2eyoard- t&o 2ey loc2o(t$ 8 8 it character display le!t
entry
-) Display:Keyboard 2ode set (ontrol 8ord:
? #14

2) "rite display .%2 (oand:


? 9# 4
37 36 35 30 3+ 32 3- 30
0 0 0 0 0 0 0 -
37 36 35 30 3+ 32 3- 30
- 0 0 - 0 0 0 0
Pro*ra,
&abel Pro*ra Coent
4;? 8L$ 00 *et co(nter !or !o(r ytes
4;? AL$ 0- 8ontrol Word initialization
;@. +-$AL
4;? A/$ 2000 *et a memory pointer
4;? AL$ 90 %nitialization o! &rite display RA4 commend &ord
;@. +-$AL
@P, 4;? AL$ BA/C Det !irst data
;@. +0$ AL ;(t data to data port
8ALL +000 8all delay
%98 A/ %ncrement memory pointer
378 8L 3ecrement co(nter
E9F @P
%9. +
Delay .o9tine: Entered at /###
&abel Pro*ra Coent
4;? 3/$ """"= Load a 3elay co(nter
@P-, 378 A/ 3ecrement and chec2 &hether it is zero
E9F @P-
R7.
Conne(tion:-
Note: 2a<e all t)e ne(essary (onne(tions ,irst and t)en s8it() on t)e s9pply.
1- Conne(t D@N% K7D1!P to D@N%8$ <it 9sin* a 5# pin 0.C (able.
2- 0or de(oded display ode (onne(t ta*s !&# A !&/ To C!&# A C!&/.

Proble stateent: -
) .i*)t entry ode:- 3ecoded scan 2eyoard- t&o 2ey loc2o(t$ 8 8 it character display right
entry
-) Display:Keyboard 2ode set (ontrol 8ord:
? 114
2) "rite display .%2 (oand:


? 9# 4

Pro*ra:
&abel Pro*ra Coent
4;? 8L$ 00 *et co(nter !or !o(r ytes
4;? AL$ -- 8ontrol Word initialization
;@. +-$AL
4;? A/$ 2000= *et a memory pointer
4;? AL$ 90 %nitialization o! &rite display RA4 commend &ord
37 36 35 30 3+ 32 3- 30
0 0 0 - 0 0 0 -
37 36 35 30 3+ 32 3- 30
- 0 0 - 0 0 0 0
;@. +-$AL
@P, 4;? AL$ BA/C Det !irst data
;@. +0$ AL ;(t data to data port
8ALL +000 8all delay
%98 A/ %ncrement memory pointer
378 8L 3ecrement co(nter
E9F @P
%9. +
Delay .o9tine: Entered at /###
&abel Pro*ra Coent
4;? 8=$ 02=
@P2, 4;? 3/$ """"= Load a 3elay co(nter
@P-, 378 A/
378 8=
E9F @P-
E9F @P2
R7.
Conne(tion:-
1- Conne(t D@N% K7D1!P to D@N%8$ <it 9sin* a 5# pin 0.C (able.
2- 0or de(oded display ode (onne(t ta*s !&# A !&/ To C!&# A C!&/.
Proble stateent: -
+) 0las)in* Display:- 3ecoded scan 2eyoard - t&o 2ey loc2o(t$ 8 8 it character display
le!t entry
a. Display:Keyboard 2ode set (ontrol 8ord:
? #14
2) "rite display .%2 (oand:


? 9# 4
+) Clear (oand:


? C1 4
Pro*ra:
&abel Pro*ra Coent
4;? AL$ 0- 8ontrol Word initialization
;@. +-$ AL
@P-, 4;? AL$ 90 %nitialization o! &rite display RA4 commend &ord
;@. +-$ AL
4;? 8L$ 00 *et co(nter !or !o(r ytes
4;? A/$ 2000
37 36 35 30 3+ 32 3- 30
0 0 0 0 0 0 0 -
37 36 35 30 3+ 32 3- 30
- 0 0 - 0 0 0 0
37 36 35 30 3+ 32 3- 30
- - 0 0 0 0 0 -
@P, 4;? AL$ BA/C Det !irst data
;@. +0$ AL ;(t data to data port
%98 A/ %ncrement memory pointer
378 8L 3ecrement co(nter
E9F @P
8ALL +000
4;? AL$ 8- 8ontrol &ord !or lan2ing display
;@. +-$AL
8ALL +000
E4P @P-
Delay .o9tine: Entered at /###
&abel Pro*ra Coent
4;? 3/$ """"= Load a 3elay co(nter
@P-, 378 A/ 3ecrement to chec2 &hether it is zero
E9F @P-
R7.
Conne(tion:-
1- Conne(t D@N% K7D1!P to D@N%8$ <it 9sin* a 5# pin 0.C (able.
2- 0or de(oded display ode (onne(t ta*s !&# A !&/ To C!&# A C!&/.
Proble stateent : -
+) .ollin* Display :- 7ncoded scan 2eyoard- t&o 2ey loc2o(t$ -6 8 it character display
le!t entry
a. Display:Keyboard 2ode set (ontrol 8ord:
? 184
2) "rite display .%2 (oand:


? 9#4
Pro*ra:
&abel Pro*ra Coent
4;? AL$ -8 8ontrol Word initialization
;@. +-$AL
@P-, 4;? AL$ 90 %nitialization o! &rite display RA4 commend &ord
;@. +-$AL
4;? 8L$ -0= *et co(nter !or !o(r ytes
4;? A/$ 2000
@P, 4;? AL$ BA/C Det !irst data
;@. +0$ AL ;(t data to data port
8ALL +000 8all delay
%98 A/ %ncrement memory pointer
378 8L 3ecrement co(nter
E9F @P
37 36 35 30 3+ 32 3- 30
0 0 0 - - 0 0 0
37 36 35 30 3+ 32 3- 30
- 0 0 - 0 0 0 0
E4P @P-
Delay .o9tine: Entered at /###
&abel Pro*ra Coent
4;? 3/$ """"= Load a 3elay co(nter
@P-, 378 A/ 3ecrement to chec2 &hether it is zero
E9F @P-
R7.
E9F @P2
R7.
Data entry: .eB9ired 4ex Codes at 2###4 to 2##/4 and ,ro 2##34 to 2##04 store
##4
Code C)ara(ters to display
76 d
78 >
06 n
77 a
Conne(tion:-
Note: 2a<e all t)e ne(essary (onne(tions ,irst and t)en s8it() on t)e s9pply.
1- Conne(t D@N% K7D1!P to D@N%8$ <it 9sin* a 5# pin 0.C (able.
2- 0or ENC5DED Display ode (onne(t ta*s !&# A !&/ To 7!&# A 7!&/ %ND 2# A
2/ T5 C!&# A C!&/ ;0or 8C8 ()ar(ter display (onne(t !&# A !&/ T5 7!&# A
7!&/-
Con(l9sion:-
D9estions:
-# What is necessity o! inter!acing 2eyoard displays (sing 8279#
2# 9ame di!!erent operating modes o! 8279
+# 3i!!erentiate et&een encoded and decoded mode#
0# 9ame di!!erent applications (sed in day li!e#
5# What do yo( mean y 88 and 8A type o! displays
6# 71plain the logic to inter!ace 0 / 0 matri1 2eyoard to (P (sing 8279 and &itho(t
(sing 8279#
7# 71plain the terms t&o 2ey loc2 o(t and 9 2ey roll o'er#
8# 71plain the type o! display o! 8279 2it and ho& to program it#

Anda mungkin juga menyukai