BM Dept., Govt. Engg. College, Gandhinagar Page 57
INC DPTR
SJMP CHECK_C
GET_CODE: CLR A
MOVC A,@A+dptr
MOV P0,A
LJMP REL
DELAY: MOV R7,#0FFh
DLOOP: MOV R6,#0FFh
D_LOOP: DJNZ R6,D_LOOP
DJNZ R7,DLOOP
RET
KCODE0: DB '0','1','2','3' ;These codes are for LCDs
KCODE1: DB '4','5','6','7' ;Replace this code by seven
KCODE2: DB '8','9','A','B' ;segment code as per your
KCODE3: DB 'C','D','E','F' ;Circuit.
:: WORKSHEET ::
Exercise:
A. Prepare seven segment code for common anode seven segment display and replace it
with ASCII code in look up table as shown in the program. Run the program and see the
result.
Memory
Location
HEX
code
Label Opcode Operands Comments
Comments to this Manuals