Professional Documents
Culture Documents
No-03
Experiment Name
Write an assembly language for the display shows the letters A to E
using EdSim51DI.
Objective
To implement display that shows the letters A to
E using EdSim51DI.
Theoretical Study
A seven-segment display is commonly used in
electronic display devices for decimal numbers,
letters from zero to nine and in some cases, basic
characters.
Assembly Code
START:
MOV R0, #0FFH ; Set R0 to 0xFF (all
segments off)
MOV P1, R0 ; Display nothing initially
; Display 'A'
MOV R0, #10001000B ; Binary representation for 'A'
MOV P1, R0 ; Display 'A'
CALL DELAY ; Delay for some time
; Display 'B'
MOV R0, #10000000B ; Binary representation for 'B'
MOV P1, R0 ; Display 'B'
CALL DELAY ; Delay for some time
; Display 'C'
MOV R0, #11000100B ; Binary representation for 'C'
MOV P1, R0 ; Display 'C'
CALL DELAY ; Delay for some time
; Display 'D'
MOV R0, #11000000B ; Binary representation for 'D'
MOV P1, R0 ; Display 'D'
CALL DELAY ; Delay for some time
; Display 'E'
MOV R0, #10000110B ; Binary representation for 'E'
MOV P1, R0 ; Display 'E'
CALL DELAY ; Delay for some time
DELAY:
MOV R2, #0FFH
DELAY_LOOP:
DJNZ R2, DELAY_LOOP
RET
END
Output
Conclusion
Implementing display that shows the letters A to E using EdSim51DI is obtained.