Modify single 7 Segment LED

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

Moderator: Benj

Post Reply
sptcarl
Flowcode V4 User
Posts: 36
Joined: Thu Feb 18, 2010 10:53 am
Has thanked: 3 times
Contact:

Modify single 7 Segment LED

Post by sptcarl »

I have never modified a component so wouldn't know where to begin, but is it possible to modify the LED display so that I do not have to specify connections for pin7 (DP) and Pin8 (Common)
I was hoping I could leave them assigned as Unconnected, but of course it will not compile. Because the project I'm working on is to upgrade software on existing PCBs, then hardware redesign is not an option.

Thanks in advance for any help offered. Carl.

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: Modify single 7 Segment LED

Post by medelec35 »

Hi Carl,
Problem is common and DP are required.
If DP are all assigned to an unused pin then all the DP's will be on instead of off.
Common is vital for the working of 7seg.
If no common is connected of a 7seg then that 7seg will not work at all.
So not sure why would not want to connect a common?

Unless I have misunderstood?

Perhaps a circuit diagram of your hardware may help?

Martin
Martin

sptcarl
Flowcode V4 User
Posts: 36
Joined: Thu Feb 18, 2010 10:53 am
Has thanked: 3 times
Contact:

Re: Modify single 7 Segment LED

Post by sptcarl »

Hi Martin,
Thanks for the quick reply.
The circuit board connects to 1 single 7 segment display whose common anode is permanently connected to the +VE supply rail, so no microprocessor control is required for the common.
The DP of the display is not connected to anything as it is not used.

It is the connection properties of the 7 seg LED component within Flowcode that I would like to be able to modify.

Thanks, Carl.

User avatar
STibor
Posts: 263
Joined: Fri Dec 16, 2011 3:20 pm
Has thanked: 116 times
Been thanked: 113 times
Contact:

Re: Modify single 7 Segment LED

Post by STibor »

Hello!

Without component.
Attachments
seg_7_man.fcfx
(13.69 KiB) Downloaded 309 times

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: Modify single 7 Segment LED

Post by medelec35 »

sptcarl wrote:The circuit board connects to 1 single 7 segment display whose common anode is permanently connected to the +VE supply rail, so no microprocessor control is required for the common.
Oh right.
In that case does your microcontroller on your hardware have an unused pin?
If so can assign common and dp to them.
Or you could try the Flowchart STibor posted.

Martin
Martin

sptcarl
Flowcode V4 User
Posts: 36
Joined: Thu Feb 18, 2010 10:53 am
Has thanked: 3 times
Contact:

Re: Modify single 7 Segment LED

Post by sptcarl »

Hi Martin,
No there are no unused pins to connect them to (that's how I have got around it in the past with other projects).
I could be wrong, but I was certain that back in Flowcode V3, there was no common connection for the LED display, so I was assuming that it would be easy to get rid of it now with a bit of editing. To be honest it does seem a bit pointless and a waste of resources having to assign a pin to control a single display which is not multiplexed.

Anyway...

I hadn't even thought of STibr's method, yet it is such a simple solution and for that I give thanks.

Cheers guys. Carl.

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: Modify single 7 Segment LED

Post by Benj »

To be honest it does seem a bit pointless and a waste of resources having to assign a pin to control a single display which is not multiplexed.
I will see if I can make the common pin optional via a property.

User avatar
STibor
Posts: 263
Joined: Fri Dec 16, 2011 3:20 pm
Has thanked: 116 times
Been thanked: 113 times
Contact:

Re: Modify single 7 Segment LED

Post by STibor »

This example is simpler than the previous one.
An example includes two variable arrays. Common anode or common cathode display.
Previous examples can be problematic (stack owerflow) interruption.
Attachments
seg_7_man_2.fcfx
(19.84 KiB) Downloaded 277 times

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: Modify single 7 Segment LED

Post by Benj »

Hello,

Here is a version of the component with a optional common pin which should also hopefully perform better with the simulation.
led_7seg_single.fcpx
(12.36 KiB) Downloaded 278 times
Let me know how you get on if you give it a go.

User avatar
STibor
Posts: 263
Joined: Fri Dec 16, 2011 3:20 pm
Has thanked: 116 times
Been thanked: 113 times
Contact:

Re: Modify single 7 Segment LED

Post by STibor »

Hello!
Clear digits macros will not work?
If there is no common inputs, you can not negated the common input output.

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: Modify single 7 Segment LED

Post by medelec35 »

STibor wrote:Clear digits macros will not work?
They do with the latest update Ben posted above.
With that update you can select Yes or No for a Common Pin option.
Perhaps you have not over written original file with the updated one?
Martin

User avatar
STibor
Posts: 263
Joined: Fri Dec 16, 2011 3:20 pm
Has thanked: 116 times
Been thanked: 113 times
Contact:

Re: Modify single 7 Segment LED

Post by STibor »

Simulation image attached.
Attachments
7seg_new.pdf
(210.25 KiB) Downloaded 299 times
seg_7_new_nocompin.fcfx
(4.88 KiB) Downloaded 204 times

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: Modify single 7 Segment LED

Post by medelec35 »

Hmm thats odd.
I was basing my comment on the attached flowchart in which clear digit does work fine.
Attachments
Multiple 7Seg Example3_v6.fcfx
(11.6 KiB) Downloaded 185 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: Modify single 7 Segment LED

Post by Benj »

Hello,

Right this should hopefully improve things and allow the clear digit to function correctly.
Attachments
led_7seg_single.fcpx
(12.42 KiB) Downloaded 170 times

George_B
Posts: 128
Joined: Wed Jul 04, 2012 11:21 pm
Location: Greece
Has thanked: 51 times
Been thanked: 19 times
Contact:

Re: Modify single 7 Segment LED

Post by George_B »

Hello, i was trying to display characters like "C" , "A", "n" using output component and by setting equivalent pins Hi or Low. It is very weird that in FC4 this works fine but not in FC6!
Attached pictures show the FC4 components and the connections of the 7seg display in order to display character "o" (works fine).

Using Output component to obtain a characters on a 7seg display seems to have some issues in FC6 or am i doing something wrong?


Thanks
George
Attachments
CommonAnode.png
(4.65 KiB) Downloaded 5317 times
Connection 7-Seg.png
(31.18 KiB) Downloaded 5317 times

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: Modify single 7 Segment LED

Post by Benj »

Hi George,

It should be working ok in v6. Can you attach your v6 program so we can take a look for you.

George_B
Posts: 128
Joined: Wed Jul 04, 2012 11:21 pm
Location: Greece
Has thanked: 51 times
Been thanked: 19 times
Contact:

Re: Modify single 7 Segment LED

Post by George_B »

Hi Benj,

you can find attached the FC6 file with a simple program showing letter "o" and after 1 sec the letter "F".
Attachments
7seg_CA_Output.fcfx
(5.82 KiB) Downloaded 174 times

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: Modify single 7 Segment LED

Post by Benj »

Hi George,

Thanks for the file,
Using Output component to obtain a characters on a 7seg display seems to have some issues in FC6 or am i doing something wrong?
Can you explain what issues your having in v6, it seems to be working correctly for me.

George_B
Posts: 128
Joined: Wed Jul 04, 2012 11:21 pm
Location: Greece
Has thanked: 51 times
Been thanked: 19 times
Contact:

Re: Modify single 7 Segment LED

Post by George_B »

Hi Benj , thanks for your attention and your help.

when you simulated the attached program, did you get a proper 'o' letter and after one second a proper 'F' letter and so on?

I think the issue that i am facing in FC6 is that the output state of the pins does not change with the "ClearDigit" component command.

In other words segments equivalent to letter 'o' (C,D,E,G) and segments equivalent to letter 'F' (A,E,F,G) are all light up simultaneously and therefore the result on the 7 seg display is always '6' which means segments A,C,D,E,F and G is always LOW (if we suppose that our Segment is Common Anode as is in the attached file).

If i am not very clear please let me know and i will try to explain with a different approach.


Thank you
George

sptcarl
Flowcode V4 User
Posts: 36
Joined: Thu Feb 18, 2010 10:53 am
Has thanked: 3 times
Contact:

Re: Modify single 7 Segment LED

Post by sptcarl »

Wow this has moved on a bit since I was last on here!
Ben, I used your original modified component and it worked fine (I didn't need the clear digit part, although it would still be nice to have the DP connection as optional). I will try your latest one when I get chance.

I might be mistaken George_b but I'm sure someone once edited the display component to allow It to display a range of letters.
I never realised until the other day that the 7SEG also displays the hex values of 10 to 15, I always assumed it went blank with values above 9!

Ben, Martin and STibor, thanks for your help.

George_B
Posts: 128
Joined: Wed Jul 04, 2012 11:21 pm
Location: Greece
Has thanked: 51 times
Been thanked: 19 times
Contact:

Re: Modify single 7 Segment LED

Post by George_B »

Hello, after some testing with 7seg component on hardware, i found that in order to display a custom character correctly you have to define the status for all segments using output component. For example if we want to display letter 'C' (on a common anode 7seg display), we simply use the output component as follows:

1. Output component to enable common pin(HI)
2. Output component to set A segment (Low)
3. Output component to set B segment( Hi)
4. Output component to set C segment (Hi)
5. Output component to set D segment (Low)
6. Output component to srt E segment (Low)
7. Output component to set F segment (Low)
8. Output component to set G segment (Hi)
9. Output component to set DP segment (Hi)

I hope this helps anyone that will come across this.

Thank you all for help.

Post Reply