Page 1 of 1

Modify single 7 Segment LED

Posted: Wed Feb 03, 2016 10:54 pm
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.

Re: Modify single 7 Segment LED

Posted: Wed Feb 03, 2016 11:14 pm
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

Re: Modify single 7 Segment LED

Posted: Wed Feb 03, 2016 11:45 pm
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.

Re: Modify single 7 Segment LED

Posted: Thu Feb 04, 2016 6:48 am
by STibor
Hello!

Without component.

Re: Modify single 7 Segment LED

Posted: Thu Feb 04, 2016 1:07 pm
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

Re: Modify single 7 Segment LED

Posted: Thu Feb 04, 2016 2:38 pm
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.

Re: Modify single 7 Segment LED

Posted: Thu Feb 04, 2016 3:10 pm
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.

Re: Modify single 7 Segment LED

Posted: Thu Feb 04, 2016 5:52 pm
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.

Re: Modify single 7 Segment LED

Posted: Thu Feb 04, 2016 7:02 pm
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 411 times
Let me know how you get on if you give it a go.

Re: Modify single 7 Segment LED

Posted: Thu Feb 04, 2016 7:34 pm
by STibor
Hello!
Clear digits macros will not work?
If there is no common inputs, you can not negated the common input output.

Re: Modify single 7 Segment LED

Posted: Thu Feb 04, 2016 7:42 pm
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?

Re: Modify single 7 Segment LED

Posted: Thu Feb 04, 2016 8:28 pm
by STibor
Simulation image attached.

Re: Modify single 7 Segment LED

Posted: Thu Feb 04, 2016 9:57 pm
by medelec35
Hmm thats odd.
I was basing my comment on the attached flowchart in which clear digit does work fine.

Re: Modify single 7 Segment LED

Posted: Mon Feb 08, 2016 12:11 pm
by Benj
Hello,

Right this should hopefully improve things and allow the clear digit to function correctly.

Re: Modify single 7 Segment LED

Posted: Thu Feb 11, 2016 8:32 am
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

Re: Modify single 7 Segment LED

Posted: Thu Feb 11, 2016 1:31 pm
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.

Re: Modify single 7 Segment LED

Posted: Thu Feb 11, 2016 2:18 pm
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".

Re: Modify single 7 Segment LED

Posted: Thu Feb 11, 2016 3:21 pm
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.

Re: Modify single 7 Segment LED

Posted: Thu Feb 11, 2016 6:14 pm
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

Re: Modify single 7 Segment LED

Posted: Fri Feb 12, 2016 5:10 pm
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.

Re: Modify single 7 Segment LED

Posted: Sun Feb 14, 2016 11:26 am
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.