30 / 35 page

Revision 1.6
-30-
02/28/2000
5.11
Scan Key Matrix
5.12
Turn LED On/Off
To turn LEDs on, the firmware should set corresponding I/O pins (Port 1.5~Port 1.7) to output low. An external
resistor should be added on every LED pins to limit sink current. To turn LEDs off, the firmware should output
high to corresponding I/O pins (Port 1.5~Port 1.7).
S c a n ke y m a trix
S e le c t fro m D R V 1 to
DRV 1 8
(w rite D R V [0 ..4 ] in
DRV S E L )
S e t D R V O E to d riv e
s e le c ted D R V pin to
lo w
R e a d SEN SE re g is te r
if any b it is logic '0 ',
in d ic a te th a t th e
s p e c ific ke y is p re sse d
S e le ct n e xt D R V
pin
No
A ll D R V pins hav e
been s c ann ed ?
S c a n ke y m a trix
co m p le te
Ye s
2 o r m o re b its a re
lo g ic '0 ' in SEN SE
regis te r ?
No
Cle a r DRV O E to
flo a t a ll D R V p in s
S e t DRV O E a n d
IN V D R V to ena ble
all o ther D R V p ins
Ye s
An y s a m e SEN S E
bit is lo gic '0 ' at
oth e r D R V pin ?
G hos t k e y
d e te c ted s c a nned
m a trix in v a lid .
Ye s
No