# Charliplexing/Multiplexing?

I have made a LED matrix - size 12 by 5 using blue LEDs. Now, other than shift registers, there are two other ways I can control the LEDs: Charlieplexing or Multiplexing.

I was thinking of Charliplexing, but the problem is this: I have 9 pins available on my Arduino (UNO). The formula for charliplexing
is :

Number of LEDs = Pins available * (Pins available-1)

That substitutes to Number of LEDs = 9 * (9-1) = 72.

Now you may be thinking, " Hey, that's alright, you just have 60 LEDs!"

If I add one more pushbutton in another version of this clock, that makes it 8 * (8-1) = 56.

Should I still stick with Charlieplexing or should I switch to Multiplexing?

(Also, I can't post a picture of the circuit because I am having this poblem with the circuit. The circuit and the code will depend upon whether I use Charliplexing or Multiplexing.

Frankly, I think you should be using a MAX7219.

Pretty much all problems solved in one go - multiplexing, driver transistors, current control, three pins to operate.

]

Paul__B:
Frankly, I think you should be using a MAX7219.

Pretty much all problems solved in one go - multiplexing, driver transistors, current control, three pins to operate.

Sorry but I cannot use any external ICs. Only either Charlie or Multiplexing.

Arduinoisme:
Sorry but I cannot use any external ICs. Only either Charlie or Multiplexing.

Well, if you cannot use any external ICs, then presumably you cannot afford driver transistors either because they are going to take up the same amount of "real estate" as a MAX7219 or TPIC6B595, so you are going to be stuck with limited brightness from the LEDS - though for a clock that should not matter much.

On a UNO, you have 20 digital pins, with two generally reserved for the serial interface. I am wondering what you are using the other nine for if you say you have only nine available for the display?

To "straight" multiplex, you would need at minimum sixteen pins - eight rows, eight columns, so that is simply not an option anyway; that much is solved. To "Charlieplex", you need nine pins and you will be using a one in nine multiplex and the safe current draw on an Arduino pin being 20 mA, each of the eight possible LEDs in a given row can be allocated 2.5 mA and the average drive current per LED is then one ninth of that - less than 0.3 mA.

Note by the way, that if you are multiplexing or Charlieplexing directly from the Arduino, you can multiplex up to eight or nine pushbuttons (with a diode for each) on a single port pin.

With Charlieplexing you can control LEDs AND read input switches in the same matrix:

For times when you need to control several LEDs (up to 8) with just 2 pins I invented GraciePlexing: