Question: Write a program in assembly language that retrieves input from the keypad and displays it on a 7 - segment display using EDSIM 5 1

Write a program in assembly language that retrieves input from the keypad and displays it on a 7-segment display using EDSIM51. That is my attempt but the code does not work (KEYPAD_DISPLAY:
CLR P0.0
JNB P0.0,ROW_0
L1:
CLR P0.1
JNB P0.1,ROW_1
L2:
CLR P0.2
JNB P0.2,ROW_2
L3:
CLR P0.3
JNB P0.3,ROW_3
ROW_0:
JNB P0.4,NUM_1
JNB P0.5,NUM_2
JNB P0.6,NUM_3
SJMP L1
ROW_1:
JNB P0.4,NUM_4
JNB P0.5,NUM_5
JNB P0.6,NUM_6
SJMP L2
ROW_2:
JNB P0.4,NUM_7
JNB P0.5,NUM_8
JNB P0.6,NUM_9
SJMP L3
ROW_3:
JNB P0.5,NUM_0
SJMP $
NUM_0:
MOV P1, #11000000B
NOP
NUM_1:
MOV P1, #11111001B
NOP
NUM_2:
MOV P1, #10100100B
NOP
NUM_3:
MOV P1, #10110000B
NOP
NUM_4:
MOV P1, #10011001B
NOP
NUM_5:
MOV P1, #10010010B
NOP
NUM_6:
MOV P1, #10000010B
NOP
NUM_7:
MOV P1, #11111000B
NOP
NUM_8:
MOV P1, #10000000B
NOP
NUM_9:
MOV P1, #10010000B
NOP
SJMP $)
"""""I do not want to use DPTR"""""

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!