Charlieplexing 100 LED's

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

Moderator: Benj

Post Reply
chri400t
Posts: 7
Joined: Wed Apr 26, 2017 11:23 am
Has thanked: 2 times
Been thanked: 2 times
Contact:

Charlieplexing 100 LED's

Post by chri400t »

Hi there

I am working on a school project and ran into a problem with using 100 LED's.
It seems like the maximum amount is 30 LED's with 6 pins, but I have to use 12 pins. I know that this will need the use of two ports, but that is not a problem.
How can I control 100 LED's in flowcode?
BR
Christoffer

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: Charlieplexing 100 LED's

Post by Benj »

Hello,

Let me investigate for you how easy it would be to add another 6 pins to the component. Hopefully it's not that bad.

11 pins should be enough for up to 110 LEDs.

chri400t
Posts: 7
Joined: Wed Apr 26, 2017 11:23 am
Has thanked: 2 times
Been thanked: 2 times
Contact:

Re: Charlieplexing 100 LED's

Post by chri400t »

Thanks, and I know that 11 would be enough. But the program I used to make a circuit board did not allow 11, so I had to use 12. It was either 10 or 12.

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: Charlieplexing 100 LED's

Post by Benj »

Here you go,

Here is the new v6 component which now supports up to 11 pins and up to 110 LEDs.
led_charlieplexed.fcpx
(10.42 KiB) Downloaded 323 times
Simply copy the file into your "Flowcode 6/components" folder and restart Flowcode for the changes to be loaded.

With higher pin counts you might notice that the property change event takes a while, if Flowcode pops up a warning then just click No to let the event finish it's job and create all the LED objects.

Let me know how you get on.

chri400t
Posts: 7
Joined: Wed Apr 26, 2017 11:23 am
Has thanked: 2 times
Been thanked: 2 times
Contact:

Re: Charlieplexing 100 LED's

Post by chri400t »

Thanks.

Could you make it with 12 pins instead?
Then it would work with my circuit board.

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: Charlieplexing 100 LED's

Post by Benj »

Here you go, should allow up to 12 pins or 132 LEDs.
led_charlieplexed.fcpx
(11.4 KiB) Downloaded 302 times

chri400t
Posts: 7
Joined: Wed Apr 26, 2017 11:23 am
Has thanked: 2 times
Been thanked: 2 times
Contact:

Re: Charlieplexing 100 LED's

Post by chri400t »

Thanks again.

As i final question, is there a way to configure the pins used for each LED?
So if i want to make LED 1 be pin 1 high and pin 2 low, and LED 5 be pin 1 high and pin 6 low?

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: Charlieplexing 100 LED's

Post by Benj »

Hello,
As i final question, is there a way to configure the pins used for each LED?
Not really, they are currently in a fixed order and I can't think of a nice way to allow this.

For a 12-pin system the indexing looks like this.

1 = 0 on, 1 off
2 = 0 off, 1 on
3 = 1 on, 2 off
4 = 1 off, 2 on
5 = 0 on, 2 off
6 = 0 off, 2 on
7 = 0 on, 3 off
8 = 0 off, 3 on
9 = 1 on, 3 off
10 = 1 off, 3 on
11 = 2 on, 3 off
12 = 2 off, 3 on
...

You should simply be able to find the LED indexes that will work with your PCB and use these to light the LEDs you have populated.

More info here.
https://www.matrixtsl.com/wikiv7/index. ... uts:_LEDs)

edit: 3&4 seem to be out of order with 5&6? Hmm I'll investigate this.

chri400t
Posts: 7
Joined: Wed Apr 26, 2017 11:23 am
Has thanked: 2 times
Been thanked: 2 times
Contact:

Re: Charlieplexing 100 LED's

Post by chri400t »

Well, that is a bummer... but thanks anyway, i can probably work around it somehow

chri400t
Posts: 7
Joined: Wed Apr 26, 2017 11:23 am
Has thanked: 2 times
Been thanked: 2 times
Contact:

Re: Charlieplexing 100 LED's

Post by chri400t »

Just to be sure.
Where can i find the configuration up to LED number 100.
I have to make a new curcuit board, and i have to know which pins should go for each LED.

chri400t
Posts: 7
Joined: Wed Apr 26, 2017 11:23 am
Has thanked: 2 times
Been thanked: 2 times
Contact:

Re: Charlieplexing 100 LED's

Post by chri400t »

Never mind I figured it out (I think). Thanks for the help and the quick answeres

Post Reply