Page 1 of 1

Shift Register 74HC595

Posted: Mon Jan 27, 2020 11:36 pm
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?

Re: Shift Register 74HC595

Posted: Tue Jan 28, 2020 10:54 am
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.

Re: Shift Register 74HC595

Posted: Tue Jan 28, 2020 12:08 pm
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.

Re: Shift Register 74HC595

Posted: Tue Jan 28, 2020 12:14 pm
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.

Re: Shift Register 74HC595

Posted: Tue Jan 28, 2020 6:21 pm
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.

Re: Shift Register 74HC595

Posted: Tue Jan 28, 2020 10:30 pm
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

Re: Shift Register 74HC595

Posted: Wed Jan 29, 2020 10:26 pm
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?

Re: Shift Register 74HC595

Posted: Thu Jan 30, 2020 7:01 am
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.

Re: Shift Register 74HC595

Posted: Thu Jan 30, 2020 3:29 pm
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.

Re: Shift Register 74HC595

Posted: Thu Jan 30, 2020 4:08 pm
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.

Re: Shift Register 74HC595

Posted: Thu Jan 30, 2020 6:45 pm
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.

Re: Shift Register 74HC595

Posted: Fri Jan 31, 2020 6:51 am
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

Re: Shift Register 74HC595

Posted: Fri Jan 31, 2020 6:59 am
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.

Re: Shift Register 74HC595

Posted: Fri Jan 31, 2020 2:15 pm
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.

Re: Shift Register 74HC595

Posted: Wed Dec 30, 2020 4:38 pm
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.