Shift Register 74HC595

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

Moderator: Benj

Post Reply
Derrihj
Posts: 218
Joined: Mon Jul 09, 2018 12:43 pm
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?

User avatar
medelec35
Valued Contributor
Valued Contributor
Posts: 8873
Joined: Sat May 05, 2007 2:27 pm
Location: Northamptonshire, UK
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 49 times
Martin

If you read a post that is useful, please show appreciation by clicking on thumbs up Icon.

User avatar
Benj
Matrix Staff
Posts: 14835
Joined: Mon Oct 16, 2006 10:48 am
Location: Matrix TS Ltd
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.

User avatar
medelec35
Valued Contributor
Valued Contributor
Posts: 8873
Joined: Sat May 05, 2007 2:27 pm
Location: Northamptonshire, UK
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

If you read a post that is useful, please show appreciation by clicking on thumbs up Icon.

User avatar
Benj
Matrix Staff
Posts: 14835
Joined: Mon Oct 16, 2006 10:48 am
Location: Matrix TS Ltd
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: 1188
Joined: Tue Oct 06, 2009 9:39 am
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: 218
Joined: Mon Jul 09, 2018 12:43 pm
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 1056 times

Derrihj
Posts: 218
Joined: Mon Jul 09, 2018 12:43 pm
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 33 times
Last edited by Derrihj on Fri Jan 31, 2020 9:27 am, edited 1 time in total.

User avatar
medelec35
Valued Contributor
Valued Contributor
Posts: 8873
Joined: Sat May 05, 2007 2:27 pm
Location: Northamptonshire, UK
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

If you read a post that is useful, please show appreciation by clicking on thumbs up Icon.

jgu1
Posts: 1188
Joined: Tue Oct 06, 2009 9:39 am
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.

User avatar
medelec35
Valued Contributor
Valued Contributor
Posts: 8873
Joined: Sat May 05, 2007 2:27 pm
Location: Northamptonshire, UK
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

If you read a post that is useful, please show appreciation by clicking on thumbs up Icon.

jgu1
Posts: 1188
Joined: Tue Oct 06, 2009 9:39 am
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

User avatar
medelec35
Valued Contributor
Valued Contributor
Posts: 8873
Joined: Sat May 05, 2007 2:27 pm
Location: Northamptonshire, UK
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

If you read a post that is useful, please show appreciation by clicking on thumbs up Icon.

User avatar
Benj
Matrix Staff
Posts: 14835
Joined: Mon Oct 16, 2006 10:48 am
Location: Matrix TS Ltd
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.

Post Reply