A,#0DEH,Not03
MOV InputedKey,#03H
LJMP JugeKeyOver
Not03: CJNE
A,#0EEH,NotOrder
SETBOrderKeyPressed
LJMP JugeKeyOver
NotOrder:CJNE
A,#7DH,Not04
MOV InputedKey,#04H
MOV InputedKey,#00H
LJMP JugeKeyOver
Not00: CJNE
A,#0B7H,NotUp
SETBUpKeypressed
LJMP JugeKeyOver
NotUp: CJNE
A,#0D7H,NotDown
SETBDownKeyPressed
LJMP JugeKeyOver
LJMP JugeKeyOver
Not04: CJNE
A,#0BDH,Not05
MOV InputedKey,#05H
LJMP JugeKeyOver
2020/12/10
5
Not05: CJNE
A,#0DDH,Not06
MOV InputedKey,#06H
LJMP JugeKeyOver
Not06: CJNE
2020/12/10
2
识别键值:
JugeWhichKey:
MOV
ScanTimes,#04H
MOV
A,#11101111B
;P1.4置低不影响其他列
ScanLoop:
ORL P1,#11111111B
ANL
P1,A ;判断P1.4对应列是否有键按下
MOV
WhichCol,A