??? 02/22/05 07:51 Read: times Msg Score: +1 +1 Good Question |
#88117 - Keypad Program |
Below is a portion of Keypad program for 16 buttons control:
START0: SUB_0: MOV R3, #04H MOV R2, #0FEH MOV R4, #00H SUB_1: MOV A, R2 MOV P0, A LCALL DELAY2 MOV A, P0 ANL A, #0F0H CJNE A, #0F0H, SUB_2 INC R4 MOV A, R2 RL A MOV R2, A DJNZ R3, SUB_1 LJMP SUB_0 SUB_2: CJNE A, #0E0H, SUB_3 MOV R6, #00H LJMP SUB_7 SUB_3: CJNE A, #0D0H, SUB_5 SUB_4: MOV R6, #01H LJMP SUB_7 SUB_5: CJNE A, #0B0H, SUB_6 MOV R6, #02H LJMP SUB_7 SUB_6: CJNE A, #70H, SUB_01 MOV R6, #03H SUB_7: MOV A, R4 MOV DPTR, #INTIGER MOV B, #4 MUL AB ADD A, R6 MOVC A,@A+DPTR MOV DYTA, A MOV A, DYTA SUB_01: RET I have doubt on how does it scan each of the 16 key and display it to LCD? #04H MOV R2, #0FEH MOV R4, #00H What are those #04H, #0FEH deal with? Could anyone please give me a hand? Thanks |
Topic | Author | Date |
Keypad Program | 01/01/70 00:00 | |
Re:Keypad Program | 01/01/70 00:00 | |
thanks | 01/01/70 00:00 | |
re:thanks | 01/01/70 00:00 | |
re:re![]() | 01/01/70 00:00 |