TUTORIAL ON 7-SEGMENT DISPLAY

on Saturday, 19 October 2013
Before we proceed to do project on 7-segment display it is necessary to understand its working. So, it is necessary to read this tutorial to go further.
First we should know how 7-segment display works, if you red my previous post i.e LED Dice then it will be easy for you to understand this project too. Showing numbers on to the 7-segment display is exactly similar to that of showing pattern on the LED dice which we have seen before.

7-Segment displays available in two different configurations.
  • Common Cathode configuration
  • Common Anode configuration
In Common Cathode configuration all the -ve terminals of the leds are connected to ground, to turn ON specific LED corresponding  led pin should be high. Look below fig.
common cathode 7segment
 In Common anode configuration all the -ve terminals are connected to voltage source,  to turn ON specific LED corresponding led pin should be Low. Look below fig.

common anode 7segment

We use Common cathode 7-segment display in project, so let us look its working to display numbers.
Assume 7 Leds(a,b,c,d,e,f,g) are arranged as shown in the below fig.
7segment display explanation
To show pattern '0' then if we ON leds a,b,c,d,e,f then it looks like '0'.
For showing 1 if we ON leds b and c then it will look like '1'.
Similarly if we want to show 5 then LEDs a,f,g,c,d should be ON.
Look at the below fig to understand which leds should be ON for showing different digits.
7segment display numbers

We connect each pin of 7segment display to microcontroller port pins. Depending upon the value we want to display, corresponding hexadecimal values will be sent to that port.
We have just converted the binary values to hex values, look at the below table to understand better.


NUMBER
g f e d c b a
HEX VALUE SEND TO PORT
0
0 1 1 1 1 1 1
0x3F
1
0 0 0 0 1 1 0
0x06
2
1 0 1 1 0 1 1
0x5B
3
1 0 0 1 1 1 1
0x4F
4
1 1 0 0 1 1 0
0x66
5
1 1 0 1 1 0 1
0x6D
6
1 1 1 1 1 0 1
0x7D
7
0 0 0 0 1 1 1
0x07
8
1 1 1 1 1 1 1
0x7F
9
1 1 0 1 1 1 1
0x6F



Multiplexing two 7-Segment Displays: If we want to connect more than one 7-segment display to our microcontroller then the number of micrcocontroller  pins required will be more.
For example, if we want to connect two 7-segment displays individually to microcontroller then we need minimum of 18pins. So, its practically not possible to connect more number of displays individually. We use multiplexing technique to reduce usage of number of pins. Let's see how to do it...

7segment display multiplexing
Look at the above fig, in which we have connected both the 7-segment displays to same microcontroller pin. Now you might get a doubt, if we send any value from microcontroller to 7segment display then both of them will show the same value, then what is the use of it...
Your thinking is right, if we send any value then both the displays shows the same value but only when both the EN pins are high i.e active. Lets take an example to understand clearly.
For example we want to display 58 on to it i.e '5' on the 1st display and '8' on the other.
  • First we will make '2nd segment display' Enable(EN) pin OFF and '1st segment display' EN pin ON, there by we send '5' (corresponding value) to the port pins. Now 5 only appear on 1st display but not on 2nd display because 2nd display is in OFF state. 
  • Similarly we OFF the 1st display and ON the 2nd display and send the value 8. Now it appear only on 2nd display because 1st display is OFF. 
We repeat it continuously at high speed, our eye cannot catch such high speed. so it looks to our eyes that both the displays are ON at all the time. We look 58 is being displayed to our eyes...

If you understood this concept then you have understood concepts of 'LED CUBE' , ' SCROLLING LED DISPLAY' ,etc.
I hope i have explained you as simple as possible. My next project will be on the project using 7segment display.


 AUTHOR: YOUSTRON SIC


















3 comments:

Syed Zain Nasir said...

You should also check [url=https://www.TheEngineeringProjects.com/]The Engineering Projects[/url] because they have posted a lot of [url=http://www.theengineeringprojects.com/2015/03/arduino-projects.html]Arduino Projects[/url] and [url=http://www.theengineeringprojects.com/2015/03/pic-microcontroller-projects.html]PIC Mirocontroller Projects[/url] and have also designed many new [url=http://www.theengineeringprojects.com/2013/03/a-complete-tutorial-on-how-to-use-proteus-isis-ares.html]Proteus Tutorials[/url]. I hope you guys are gonna like them.

Syed Zain Nasir said...

You should also check The Engineering Projects because they have posted a lot of Arduino Projects and PIC Mirocontroller Projects and have also designed many new Proteus Tutorials. I hope you guys are gonna like them.

Jermain Am said...

You must be aware of the LED display with micro controller which has been designed to produce such an amazing product. I know a website leddisplay.org which has been building the LEDs with Micro controller.

Post a Comment