Write an ALP to implement a moving display of a given string of digits
on a display interface with a suitable delay.
PROGRAM ALGORITHM
START: MVI A,CW STEP 1: Initialize all ports
OUT CWR: STEP 2: Make all rows high
MVI C,04H STEP 3: Sense the Key board
RPTCD: MVI A,FFH STEP 4: Is any Key Pressed , if Yes call
CALL DISP delay
LXI D,FFFFH STEP 5: If No, Check the Key Pressed
CALL DELY STEP 6: Initialize counter
DCR C Step 7: Set Row High.
JNZ RPTCD Step 8:Is any Key Pressed Check first
LXI D,FFFFH column, If No increment the
CALL DELY counter by 8 and enable next Row.
LXI H, F100H Step 9: If Yes Display the counter.
MVI C, 04H
RPDIS: MOV A,M
CALL DISP
INX H
PUSH H
PUSH B
LXI D,FFFFH
CALL DELY
POP B
POP H
DCR C
JNZ RPDIS
LXI D,FFFFH
CALL DELY
JMP START
DISP: MVI E,08H
MOV B,A
RPTR: MOV A,B
OUT PB
RRC
MOV B,A
MVI A,00H
OUT PC
CMA
OUT PC
DCR E
JNZ RPTR
RETURN: RET
NOTE:
• Store the program from F000H.
• Store the string of data from F100h.
• Connect the interfacing unit to the PPI of the kit.
• Execute the program.
• Observe the result in the display interface unit.
LED DISPLAY:
a
f b
g .h
e c
d
String for SSIT:
A b c d e f g h
0 1 0 0 1 0 0 1 49H(S)
0 1 0 0 1 0 0 1 49H(S)
1 0 0 1 1 1 1 1 9FH(i)
1 1 1 0 0 0 0 1 E1H(t)
No comments:
Post a Comment