Micro processor Lab Manual / Interface 7 segment display

Program Name

Write a Assembly Language Program for Interface 7 segment display.
Theory
Instruction Mnemonic Operand Comments
MVI A,80 Load accumulator with
80H to configure CWR of 8255.
OUT CWR Configure CWR to display output with accumulator value. i.e 80
MVI D,0B Move OBH in reg D
LXI H,8100 Loading the contents if address 8100 into register pair
MOV A,M Move contents of accumulator
to memory location.
INX H Increment the value of H.
CALL DSPLY Call the delay function.
MVI B,03 Move 03H in reg B
MVI A,FF Initialise the accumulator with FF.
CALL DSPLY Call the delay function.
DCR B Decrement reg B by 1
JNZ XX Jump back to xx if the result of previous operation is not zero
CALL DLY Call delay
CALL DLY Call delay
DCR D Decrement reg d by 1
JNZ YY Jump back to yy if the result of previous operation is not zero
JMP ZZ Jump back to zz with out any condition


Display Conf. Code
Instruction Mnemonic Operand Comments
MVI C,08 Move 08H in reg C to configure 8 bit of
RLC Rotate acc left to configure 7 segments
MOV E,A Copy the content of acc to reg E
OUT PB Configure port B with content of Acc
MVI A,01 Move immediately 01 H to acc
OUT PC Configure port C
DCR A Decrement reg A
OUT PC Configure port C
MOV A,E Copy the content of reg E to Acc
DCR C Decrement the count
in register C.
JNZ YZ Jump back to yz if the result of previous operation is not zero
RET Return back to main routine.
Program Code


Online compiler for 8085 Microprocess Compiler


Home     Back