Using 4 - 7 segment displays - Sync problem

A forum where Flowcode v6 user created components can be shared, discussed and reviewed.

Moderator: Benj

User avatar
JLeith
Posts: 487
Joined: Wed Nov 14, 2012 7:49 pm
Location: British Columbia Canada
Has thanked: 129 times
Been thanked: 22 times
Contact:

Using 4 - 7 segment displays - Sync problem

Postby JLeith » Tue Feb 02, 2016 7:28 pm

Hello all
I was using a Quad 7 segment and everyting was working.

Then I thought I would like to use ( 4 ) 7 segments so I can disaply the info on two independent loactions.

I thought it should work.

I have ( 4 ) displays with PORT B shared and the common lead ( A0,A1,A2,A3)

For the simulation only the "Guest" add works.

When I press Guest Add all ( 4 ) of the display list the results ???

I have added a pictrure and also the Flowcode 6 program.

I had the Quad working on my Model Railway to display the train coming into the station, When I was playing I added a few more macro to play with.

Then the crash when I went to single 7 segments.

John
Attachments
LCD and Push Button.fcfx
(80.27 KiB) Downloaded 85 times
7 Seg with 4 displays.png
7 Seg with 4 displays.png (27.85 KiB) Viewed 3076 times

User avatar
medelec35
Valued Contributor
Valued Contributor
Posts: 8223
Joined: Sat May 05, 2007 2:27 pm
Location: Northamptonshire, UK
Has thanked: 2351 times
Been thanked: 3336 times
Contact:

Re: Using 4 - 7 segment displays - Sync problem

Postby medelec35 » Tue Feb 02, 2016 9:45 pm

Hi John,
Here I have modified a flowchart to work with quad 7SEG LED's

If I was you I would go through the flowchart to see how 7SEG LED's work together.

Martin
Martin

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

User avatar
JLeith
Posts: 487
Joined: Wed Nov 14, 2012 7:49 pm
Location: British Columbia Canada
Has thanked: 129 times
Been thanked: 22 times
Contact:

Re: Using 4 - 7 segment displays - Sync problem

Postby JLeith » Tue Feb 02, 2016 10:40 pm

Hello Martin

I hope the family is doing well. Over Christmas we have a new grandson ( Benjermine ). Dec 18th.

I read thru the link you posted and I could be 100% wrong but it is realted to the QUAD display. I used the Quad Display and I had great results. The issue came when I decided to use ( 4 ) single 7 segment displays ?

I will try and google more information and try to find a Flowcode video that uses ( 4 ) single LEDS.

I thought maby there was a glitch in Flowcode. Here is how I belive I have the single display connected.

The issue is that even if I send the value to segment 1 flowcode displays the value on all 4 segments ?

John
Attachments
7 Seg with 4 displays with Port A.png
7 Seg with 4 displays with Port A.png (23.55 KiB) Viewed 3068 times

User avatar
medelec35
Valued Contributor
Valued Contributor
Posts: 8223
Joined: Sat May 05, 2007 2:27 pm
Location: Northamptonshire, UK
Has thanked: 2351 times
Been thanked: 3336 times
Contact:

Re: Using 4 - 7 segment displays - Sync problem

Postby medelec35 » Tue Feb 02, 2016 10:53 pm

Hi John,
Family are well thanks, hope yours is too?
JLeith wrote:Over Christmas we have a new grandson ( Benjermine ). Dec 18th.

Congrats on the new edition. :)
JLeith wrote: read thru the link you posted and I could be 100% wrong but it is realted to the QUAD display

Yes but you can ADD the quad component and just use two of them.
It should work.
Its a similar principle with single as it is with quads.
You much only have one display at a time lit up.
So if you have four single 7seg displays 0 to 3.
Clear Digit 0, show digit 3
Delay 3ms
Clear Digit 3, show digit 2
Delay 3ms
Clear Digit 2, show digit 1
Delay 3ms
Clear Digit 1, show digit 0
Delay 3ms
repeat for ever
For the delay you could place the 7seg components within timer interrupt set for 300Hz

Martin
These users thanked the author medelec35 for the post:
JLeith (Wed Feb 03, 2016 1:42 am)
Rating: 5.88%
 
Martin

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

User avatar
JLeith
Posts: 487
Joined: Wed Nov 14, 2012 7:49 pm
Location: British Columbia Canada
Has thanked: 129 times
Been thanked: 22 times
Contact:

Re: Using 4 - 7 segment displays - Sync problem

Postby JLeith » Wed Feb 03, 2016 1:42 am

Hi Martin
I did some searching and I follow your information.

Using the Quad layout in Flowcode I can than use 2 sets of double 7 Segments and control them with the port settings.

From your information Flowcode is realy not able to control ( 4 ) individual displays and that is why they developed the Quad I suspect.

I will rebuild my desighn back to the Quad and when I had it working before I thought I could use seperate segements.

Thank you for taking the time to expain the on/off state.

All the best
John

User avatar
medelec35
Valued Contributor
Valued Contributor
Posts: 8223
Joined: Sat May 05, 2007 2:27 pm
Location: Northamptonshire, UK
Has thanked: 2351 times
Been thanked: 3336 times
Contact:

Re: Using 4 - 7 segment displays - Sync problem

Postby medelec35 » Wed Feb 03, 2016 7:12 am

Hi John.
no problem.
Reason for only having one 7seg LED pn at a time is because all the segments a to g are connected in parallel.
So if more than one are enabled at the same time then they would show the same digit.
Of segments a to g are cathodes then its the common anodes of each one connected to seperate pins.
Although using quad on your flowchart, you can use single on your hardware.
Before changing flowchart to quad I will see if I can get flowchart you posted working with single. 7segment LED's.
Martin

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

User avatar
JLeith
Posts: 487
Joined: Wed Nov 14, 2012 7:49 pm
Location: British Columbia Canada
Has thanked: 129 times
Been thanked: 22 times
Contact:

Re: Using 4 - 7 segment displays - Sync problem

Postby JLeith » Wed Feb 03, 2016 10:12 pm

Hi Martin
I was able to get the Quad working and I will be developing the Hardware and see how it works on 2 segment displays.

Here is my working model.

I have 2 LCD displays from the Scoreboard layout that have the pins off.

The run 16..15...1 to 14. They didn't work in my PCB and for some reason I had 2 sitting in a box. I must of ordered them from EBAY and not checked.
Attachments
LCD and Push Button.fcfx
Latest version Feb 3
(83.66 KiB) Downloaded 76 times

User avatar
medelec35
Valued Contributor
Valued Contributor
Posts: 8223
Joined: Sat May 05, 2007 2:27 pm
Location: Northamptonshire, UK
Has thanked: 2351 times
Been thanked: 3336 times
Contact:

Re: Using 4 - 7 segment displays - Sync problem

Postby medelec35 » Wed Feb 03, 2016 10:42 pm

Hi John,
I have been testing multiple 7segs.
They work fine with hardware but unfortunately there is a simulation bug which I have reported.
So if you want simulation best stick with the quads for now.
Besides if using quads type then it simplifies flowchart since with single 7segs you must switch off 3 and only have one running at a time as shown earlier.
I have made a small mod to your flowchart so 7seg LED's should work better on hardware.
You should be able to use individual ones instead of quad on your hardware
Attachments
LCD and Push Button 2.fcfx
(83.73 KiB) Downloaded 98 times
These users thanked the author medelec35 for the post (total 2):
JLeith (Thu Feb 04, 2016 6:45 am) • Benj (Thu Feb 04, 2016 1:00 pm)
Rating: 11.76%
 
Martin

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