5.11 Scan Key Matrix
S can key m atrix
Select from DRV1 to
DRV18
(write DRV[0..4] in
DRVSEL)
Set DRVOE to drive
selected DRV pin to
low
Read SENSE register
if any bit is logic '0',
indicate that the
specific key is pressed
Clear DRVO E to
float all DRV pins
No
Set DRVOE and
INVDRV to enable Yes
all other DRV pins
2 or m ore bits are
logic '0' in SENSE
register ?
No
Any same SENSE
bit is logic '0' at
other DRV pin ?
No
Select next DRV
pin
Yes
Ghost key
detected scanned
m atrix invalid.
All DRV pins have
been scanned ?
Yes
S can key m atrix
com plete
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).
Revision 1.6
-30-
02/28/2000