Interfacing
7-Segment with 8051 using keil
7-Segment is
the best display to message something spatially numbers by using low electrical
power.
If we need
to display some numerical data in a message board then we can choose 7-segment
display because the 7-segment is a one type of LED display, it consume minimum
electrical power to display. On the other hand LCD or other messaging display
takes a huge amount of power to display something.
There are
two types of 7-segment displays in our hand.
Common Anode 7-segment display.
And
Common Cathode 7-segment display.
How to use Common-Cathode 7-segment display
Pin description for common cathode
7-segment display
Pin No. Used for
1
e
2
d
3
GND
4
C
5
Dp
6
b
7
a
8
GND
9
f
10
g
In common
anode display if we want to display a LED we have to make output low (0) to
that LED pin.
Suppose if
we want to display ‘1’ in the common cathode display, then we have to make b
and c to output high (1) and remaining pin to output low (0).
Like that..
For common cathode display
Dp g f e d c b a Hex
code Display
0 0 1 1 1 1 1 1 0x3F 0
0 0 0 0 0 1 1 0 0x06 1
0 1 0 1 1 0 1 1 0x5B 2
0 1 0 0 1 1 1 1 0x4F 3
0 1 1 0 0 1 1 0 0x66 4
0 1 1 0 1 1 0 1 0x6D 5
0 1 1 1 1 1 0 1 0x7D 6
0 0 0 0 0 1 1 1 0x07 7
0 1 1 1 1 1 1 1 0x7F 8
0 1 1 0 1 1 1 1 0x6f 9
No comments:
Post a Comment