Using 74HC595 to control 7seg LED

Tips, Tricks and methods for programming, learn ways of making your programming life easier, and share your knowledge with others.

Moderators: Benj, Mods

Post Reply
medelec35
Matrix Staff
Posts: 9520
Joined: Sat May 05, 2007 2:27 pm
Location: Northamptonshire, UK
Has thanked: 2585 times
Been thanked: 3815 times
Contact:

Using 74HC595 to control 7seg LED

Post by medelec35 »

74HC595 is a serial to parallel converter.
Although this is old tec now, I have had a couple of pms asking if I could post a flowchart driving 74HC595, so here it is :)
I will create a circuit diagram if the interest is there os just let me know.

Hopefully all required information has been added to flowchart.

I have tested this on hardware and 7seg display was incrementing by 1 every second as expected.
In simplified terms Referring to the diagram the serial to parallel chip works as follows:
74HC595.png
(31.51 KiB) Downloaded 8537 times
1st bit of serial data sets or clears at pin 14
then Clock (pin 11) is toggled
2nd bit of serial data sets or clears at pin 14
Clock (pin 11) is toggled again.
The above is repeated until all 8 bits of serial data have controlled pin 14

Now the serial data has to be is transferred to pins the parallel pins :
15(Q0 which will be the same state as 1st bit of serial data connected to seg a of 7seg)
1 (Q1 which will be the same state as 2nd bit of serial data connected to seg b of 7seg)
2 (Q2 which will be the same state as 3rd bit of serial data seg c of 7seg) etc.

To transfer the store serial data to all the parallel pins (Latch data to the pins)
just involves toggling (or clocking is another word) pin 12 just once!
Now all the serial data is latched to the parallel pins, andwill remain there until power is removed or the whole process is started all over again with another lot of serial data to be converted into parallel.

Martin
Attachments
74HC595 V2.fcf
(18.99 KiB) Downloaded 1170 times
Martin

jgu1
Posts: 1333
Joined: Tue Oct 06, 2009 9:39 am
Has thanked: 1135 times
Been thanked: 299 times
Contact:

Re: Using 74HC595 to control 7seg LED

Post by jgu1 »

Hi Martin!

Thank' s for Sharing. I am very interrest in a circurit. :D

Best regard

Jorgen

medelec35
Matrix Staff
Posts: 9520
Joined: Sat May 05, 2007 2:27 pm
Location: Northamptonshire, UK
Has thanked: 2585 times
Been thanked: 3815 times
Contact:

Re: Using 74HC595 to control 7seg LED

Post by medelec35 »

jgu1 wrote:Hi Martin!

Thank' s for Sharing. I am very interrest in a circurit. :D

Best regard

Jorgen
Hi Jorgen your welcome.
For you and anyone else interested, here is the circuit:
74HC595 V2.png
(24.53 KiB) Downloaded 8468 times
Note: I'm sure other serial to parallel devices should also work, but not tested any others yet.
If anyone does try a different version, would you mind posting about it for others to read.
Thank you.

Martin
Martin

jgu1
Posts: 1333
Joined: Tue Oct 06, 2009 9:39 am
Has thanked: 1135 times
Been thanked: 299 times
Contact:

Re: Using 74HC595 to control 7seg LED

Post by jgu1 »

Thank you Martin, kind of you. I will play with it :D

Jorgen.

Tom Stefanou
Posts: 32
Joined: Thu Nov 15, 2012 7:21 am
Has thanked: 7 times
Been thanked: 7 times
Contact:

Re: Using 74HC595 to control 7seg LED

Post by Tom Stefanou »

Hello guys,
i know this is bit of an old thread now,
but i was really wondering if it is possible to connect more than one of these in series to have like 4 or 8 or 16 and each one to display a different number.
Thank you in advance,
Best,
Tom

Spanish_dude
Posts: 594
Joined: Thu Sep 17, 2009 7:52 am
Location: Belgium
Has thanked: 63 times
Been thanked: 102 times
Contact:

Re: Using 74HC595 to control 7seg LED

Post by Spanish_dude »

You should check out the MAX7219 if you want to have multiple 7 seg displays.

- Nicolas

Tom Stefanou
Posts: 32
Joined: Thu Nov 15, 2012 7:21 am
Has thanked: 7 times
Been thanked: 7 times
Contact:

Re: Using 74HC595 to control 7seg LED

Post by Tom Stefanou »

Dont take my answer as an insult but your reply has nothing to do with what i asked for.
I am aware of the MAX7219.
What i want to know is what modifications the posted flowchart requires so as to have multiple 595's daisy chained.
Best,
Tom

Spanish_dude
Posts: 594
Joined: Thu Sep 17, 2009 7:52 am
Location: Belgium
Has thanked: 63 times
Been thanked: 102 times
Contact:

Re: Using 74HC595 to control 7seg LED

Post by Spanish_dude »

So, you want to make your program and your circuit board more complex ? I don't see the point in that.
Tom Stefanou wrote:What i want to know is what modifications the posted flowchart requires so as to have multiple 595's daisy chained.
You didn't ask that in your previous post.

I'm sure you can learn how medelec's program works, and by reading the datasheet of the 74HC595, you should be able to make your own DisplayNumber function which would allow you to write on multiple 7 segment displays.

- Nicolas

Tom Stefanou
Posts: 32
Joined: Thu Nov 15, 2012 7:21 am
Has thanked: 7 times
Been thanked: 7 times
Contact:

Re: Using 74HC595 to control 7seg LED

Post by Tom Stefanou »

Dear Nicolas,
Maybe it was not so clear, but i asked...
i was really wondering if it is possible to connect more than one of these in series to have like 4 or 8 or 16 and each one to display a different number.
Where does this conclude?
Nicolas, if what medelec had posted was not on the current post i would understand you suggesting me to finding it, reading a pdf then and see how can i make the changes.
Now, that his code is already here, why are you suggesting that?
Before asking my question apparently i tried to do it on my own.
Finally, you might not find a reason to make the board more complex but on the other hand, for me asking there is one.
Again, thank you for your advices.
Tom

Post Reply