Position: Index > Display Circuit >

How to show character on sevent segment display

2016-12-04 19:43  
Declaration:We aim to transmit more information by carrying articles . We will delete it soon, if we are involved in the problems of article content ,copyright or other problems.


Actually, seven segment possible show character like r,E,S,P,O,n,I.
I will explain how it can work. I used AT89C51 Microcontroller, this chip produce by ATMEL. With simple Assembly script, this project could be created. For coding and compiling use Systronix RAD51.

ASM Source Code

ORG 0H
MULAI: MOV A, P3
CJNE A,#0BFH,MULAI ;WAIT UNTIL BUTTON PRESS P3.6
JALAN:
MOV P1,#0CEH ;show r
ACALL DELAY
MOV P1,#86H ;show E
ACALL DELAY
MOV P1,#92H ;show S
ACALL DELAY
MOV P1,#8CH ;show P
ACALL DELAY
MOV P1,#0C0H ;show O
ACALL DELAY
MOV P1,#0C8H ;show n
ACALL DELAY
MOV P1,#92H ;show S
ACALL DELAY
MOV P1,#0F9H ;show I
ACALL DELAY

;
MOV A,P3 ;check if button P3.7
CJNE A,#7FH,JALAN ;if not go label jalan

MOV P1,#0FFH ;turn of all segment
SJMP MULAI ; goto? label mulai
;
;-------------------------------
; sub rutin delay
;-------------------------------

DELAY:
MOV R0,#5H
DELAY1:
MOV R1,#0FFH
DELAY2:
MOV R2,#0H
DJNZ R1,$
DJNZ R1,DELAY2
DJNZ R0,DELAY1
RET
;
END

asm source

hex file

Copyright and Credits:
Writer, ? puguhwah, graphics and photos, May2011.




Reprinted Url Of This Article:
http://makecircuits.com/blog/2011-05-10-how-to-show-character-on-sevent-segment-display.html