Shift Register 74HC595

For Flowcode users to discuss projects, flowcharts, and any other issues related to Flowcode 8.

Moderator: Benj

Post Reply
Derrihj
Posts: 348
Joined: Mon Jul 09, 2018 12:43 pm
Has thanked: 67 times
Been thanked: 33 times
Contact:

Shift Register 74HC595

Post by Derrihj »

Hi guys yet again another tricky guy here "The famous SIPO (Serial-In-Parallel-Out) shift register" 74HC595,how do we use this in flowcode for PIC,i like to learn about it in flowcode coz it comes in-handy for low I/O pin count MCUs like my favourite the PIC12F683 if i want to drive a 3 digit 7 segment display with only 3 or 2 pins?

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: Shift Register 74HC595

Post by medelec35 »

HI Derrihj,
I posted about 74HC595 in the Programming Tips & Tricks section here
As it was some time ago, flowchart was created with Flowcode V5.
Attached if the file converted to V7/V8.
Attachments
74HC595 V2.fcfx
(17.58 KiB) Downloaded 378 times
Martin

User avatar
Benj
Matrix Staff
Posts: 15312
Joined: Mon Oct 16, 2006 10:48 am
Location: Matrix TS Ltd
Has thanked: 4803 times
Been thanked: 4314 times
Contact:

Re: Shift Register 74HC595

Post by Benj »

Excellent thanks for that Martin,

I could wrap this up into a component if that would be useful. This way you could set the number of 7-seg digits and simulate.

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: Shift Register 74HC595

Post by medelec35 »

Thanks Ben.
Benj wrote:I could wrap this up into a component if that would be useful. This way you could set the number of 7-seg digits and simulate.
That does sound like a good idea.
You can never have too many components.
Martin

User avatar
Benj
Matrix Staff
Posts: 15312
Joined: Mon Oct 16, 2006 10:48 am
Location: Matrix TS Ltd
Has thanked: 4803 times
Been thanked: 4314 times
Contact:

Re: Shift Register 74HC595

Post by Benj »

OK I've added the component to the update system now. If anyone has a go with it then let me know how you get on.

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

Re: Shift Register 74HC595

Post by jgu1 »

Hi Ben!

I have a couble 4x7 segment driven by the 595 and I make
A test tomorrow evening. You hear very good idea
With such :D a component too

Br Jorgen

Derrihj
Posts: 348
Joined: Mon Jul 09, 2018 12:43 pm
Has thanked: 67 times
Been thanked: 33 times
Contact:

Re: Shift Register 74HC595

Post by Derrihj »

[quote="Attached is the file converted to V7/V8.[/quote]

Hi Martin according to your flowchat, for me to understand this easily suppose i have arranged my output like in the image below and i want to display a 5 on digit 1 (D1), then a 7 on digit 2 (D2) and a 8 on digit 3 (D3) how will the flowchat be like for an output arrangement like below?
Attachments
74HC595 Image.jpg
74HC595 Image.jpg (102.27 KiB) Viewed 6075 times

Derrihj
Posts: 348
Joined: Mon Jul 09, 2018 12:43 pm
Has thanked: 67 times
Been thanked: 33 times
Contact:

Re: Shift Register 74HC595

Post by Derrihj »

Ok this is how i understand your program Martin correct me if am wrong. You are shifting bits one at a time into the shift register in response to a clock pulse of 1ms and after you have pushed all the 8 bits into the shift register, you jump out of the loop and you latch all the content of the shift register into the storage register which also appears on the output in parallel right? , My problem is the "theory is all over my head ringing bells all the time" Yet the practical bit of it is not yet there.Ok lets do some practical for me to get this into my little head so fast.Please help me take the flowchat below and add the 595 but with an output setting as the picture i provided above its a prog reading voltage from 0 - 55v with that example i believe i will get this in my head in a blink of an eye thanks to all of you guys, learning new things is intresting.
Attachments
3Digit 7seg 0-55v voltmeter - Update.fcfx
(15.81 KiB) Downloaded 259 times
Last edited by Derrihj on Fri Jan 31, 2020 9:27 am, edited 1 time in total.

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: Shift Register 74HC595

Post by medelec35 »

Hi Derrihj,
The flowchart I posted was only intended as educational rather than used within a practical application.
For Practical applications try Ben's new 7Seg(74HC595) component.
On hardware should be just what you are after.
If you would like any help with that or how the flowchart I posted drives 74HC595 then let me know.
Martin

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

Re: Shift Register 74HC595

Post by jgu1 »

Hi Martin and Derijj!

I am agree with Martin. I already test Ben’s new component. It work, almost :wink:

Look at this message.

Nr 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: Shift Register 74HC595

Post by medelec35 »

Hi Jorgen,
jgu1 wrote: I already test Ben’s new component. It work, almost
I have moved your bugs report to the bugs section, so all the bugs are in the same section of V8.
I have also edited your post to show the new link.
Martin

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

Re: Shift Register 74HC595

Post by jgu1 »

Hi Martin!

Well,ok. As I wrote, I don`t know if it i a bug or me who do something wrong, I only discover some weird thing, I saw that Ben would create a component to Derrij and I have one display I could test with and I only want to be kind and help in this tread and not trouble.

Apologize for the inconvenience.

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: Shift Register 74HC595

Post by medelec35 »

Hi Jorgen,
Apologies are not required at all.
You have done nothing wrong.
It's the opposite, so it's greatly appreciated.
Any bug reports whether right or wrong really helps a lot.
I just thought all bugs are better in the bugs section,
so would leave this topic for talking about how to use 74HC595.
It also helps to stop bug reports getting missed when in normal threads.
Martin

User avatar
Benj
Matrix Staff
Posts: 15312
Joined: Mon Oct 16, 2006 10:48 am
Location: Matrix TS Ltd
Has thanked: 4803 times
Been thanked: 4314 times
Contact:

Re: Shift Register 74HC595

Post by Benj »

Hello Derrihj,
Hi Martin according to your flowchat, for me to understand this easily suppose i have arranged my output like in the image below and i want to display a 5 on digit 1 (D1), then a 7 on digit 2 (D2) and a 8 on digit 3 (D3) how will the flowchat be like for an output arrangement like below?
At the moment the new component assumes that you have wired in a certain way.

Q0 - A
Q1 - B
Q2 - C
Q3 - D
Q4 - E
Q5 - F
Q6 - G
Q7 - DP

However one of the problems mentioned by Jorgen seems to suggest this might not work for his hardware and so I might have to add a way of remapping the segments on the shift register. I take it you wired in the way you did to make the wiring easier, say on a single layer PCB?

If you're using Martins example instead of the component then you can simply re-order the segment bit patterns as required.

Derrihj
Posts: 348
Joined: Mon Jul 09, 2018 12:43 pm
Has thanked: 67 times
Been thanked: 33 times
Contact:

Re: Shift Register 74HC595

Post by Derrihj »

Hi Ben,hope all is well,now on your SevenSeg_74HC595 Component,how do i know your mapping of the segments on the shift register and is there a way to view this setup in flowcode for one to make a few changes on the connections just like you could do for the lcd to arrange which pin of the 7 Seg goes to what pin of the 595 parallel Out pins or you fixed it and if it's fixed, what is your arrangements? I just want to try out this 595 once again and put a tick on it in my book as a done deal also.Thanks.

Post Reply