Nothing Special   »   [go: up one dir, main page]

Alp For 7 Segment Display

Download as pdf or txt
Download as pdf or txt
You are on page 1of 9

Deo's

7 Segment Display Institute

To display numbers from 0 to 9 and some letters like

A,B,CE,F,H etc.
Deo's
7 Segment Display Institute

F B
G
|E C
D
Common Cathode Deo's
Institute

7 Segment Display

a a a
b b

d d.
e e
f d DP

Comm on
Cathode
Common Anode Deo's
Institute

7 Segment Display
+V
Comm on +
Anode

a
b
a
b
C b
d-
f d DP
Institute
Interfacing Diagram
5V

40
EA vee
01
c3 R3
Common cathode
10uf/10V P1 ww
2 R4
seven segment LED dsplay

RST P1.1
www
RS
P12 www-
R6
Ct
AT89S51
P1.3

P1.5

P16
w
ww
R7
RS
R9

x1
19XTAL P1.7
w
R10

R3to R10 560ohm


0582ME 18
XTAL2
GNO
20
G Digit drive pattern
Institute

E
D
Digit A B C D E F G
1 1

0 0 0
2 1

3 1

4 1

5 1 0
6
7 1 0
8 1
H
Digit H
(DOT)
9 e d C b a Code

Vo 0 0 1 1 1 1 1 3F

1 0 0 0 1 1 0 06

2 1 0 1 1 1 1 5B

3 1 0 0 1 1 4F

4 0 1 1 0 0 1 1 0 66

5 0 1 1 0 1 6D
6 1 1 1 1 0 1 7D
7 0 0 0 1 1 1 07

8 0 1 1 1 1 1 1 1 7F
Program to Display 0to 9digits continuously on seven segment display

ORG 000H starting address

START: MOV RO,#0AH ;Register RO initialized as counter which


;counts from 10 to 0
MOV DPTR, #string Point DPTR to first element of string
SBACK:MOV A,#00OH ; Initialize accumulator with 0
LABEL: MOVCA,@A+DPTR ;read data from program memory
MOV P1,A ;Send digitvalue to port 1

ACALL DELAY ;calls the delay of the timer


INC DPTR ;Point DPTR to next digit of string
DJNZ RO, BACK ;Decrement counter RO
SJMP START

string: db 3FH,06H, 5BH, 4FH,66H,6DH, 7DH,07H, 7FH,6FH

You might also like