English
Language : 

AN980 Datasheet, PDF (5/8 Pages) STMicroelectronics – ST7 KEYPAD DECODING TECHNIQUES
ST7 KEYPAD DECODING TECHNIQUES, IMPLEMENTING WAKE-UP ON KEYSTROKE
You have to press the chosen key at least 0.5 to 1 second depending on which key you
choose (table read from keypad_top to keypad). The faster the key is read into the table, the
faster it will be decoded and the faster the result will be sent on LEDS.
The keypad code is in the file constant.asm as follows:
.keypad
keypad_top
DC.B
DC.B
DC.B
DC.B
DC.B
DC.B
DC.B
DC.B
DC.B
DC.B
DC.B
DC.B
DC.B
DC.B
DC.B
DC.B
$0E,$0E,$1
$0E,$0D,$2
$0E,$0B,$3
$0E,$07,$F
$0D,$0E,$4
$0D,$0D,$5
$0D,$0B,$6
$0D,$07,$E
$0B,$0E,$7
$0B,$0D,$8
$0B,$0B,$9
$0B,$07,$D
$07,$0E,$A
$07,$0D,$0
$07,$0B,$B
$07,$07,$C
;PC0 PA0
;PC0 PA1
;PC0 PA2
;PC0 PA3
;PC1 PA0
;PC1 PA1
;PC1 PA2
;PC1 PA3
;PC2 PA0
;PC2 PA1
;PC2 PA2
;PC2 PA3
;PC3 PA0
;PC3 PA1
;PC3 PA2
;PC3 PA3
5/8