Programmer looking for some hardware/design help

Just a bit of background - I'm a C programmer looking to implement a light board similar to this:

I've already secured an Arduino Uno, and I'd like to utilize a shield from bliptronic that does audio spectrum analyzing:
http://www.bliptronics.com/item.aspx?ItemID=116

So 36 LEDs, preferably able to change color, that move around to the sound of the music inputted. However, at this point, I'm just looking to get a square to light up, so mono-color works for the first iteration - nothing fancy.

I've pretty much written all of the code that handles the various states of LED lights into an integer array - thing is, I just need to get the code to interface with some hardware to output the various patterns. Last time I touched any circuitry was an EE100 class in college about 10 years ago.

Clearly I'm going to need additional hardware, as the Arduino doesn't have 36 outputs -I've read about shift outputting, but I'm not sure where that comes into play with regards to the software.

My question is this - where are some resources that easily explain the following:

  1. What parts do I need to increase the available outputs from the default to over 32 outputs?
  2. What wiring will be necessary for this? Assuming I'll have to get bread boards.
  3. What software changes will be necessary to account for the changes of the output? For example, the usual digitalWrite() is passed a pin, but this won't work - how would I digitalWrite() out the status of the LED to these lights?

I clearly don't want the work done for me, but a little guidance is greatly appreciated. I've been looking around for the last few weeks, and most of the information I get is way over my head.

Thanks!

You can use 5 TPIC6B595 shift registers to drive the LEDs. This also means 36 resistors. Or there are versions with constant-current outputs, such as the STP16C596, that will only need a single resistor.

Then there are all sorts of chips designed specifically to drive multiple LEDs, eg AS1108, TLC5947 etc.

As to how this affects your software, that depends on the chip used but let's assume a shift register because they are easier to drive.

You would probably have an array of 5 bytes where the bits correspond to the LEDs.

byte led_bits[5];

// some code sets and resets the bits in this array

for (int i = 0; u < 5; i++) {
     shiftOut(dataPin, clockPin, MSBFIRST, led_bits[i]);
}

Rob

Thanks for the feedback!

So I've stubbed out methods for output, so instead of using digitalWrite(pin, HIGH), I would do shiftOut(). However, I don't see definitions of shiftOut() with 4 arguments - what is the 3rd argument that you list?

The order of the bits, can be LSBFIRST or MSBFIRST.

http://arduino.cc/en/Reference/ShiftOut


Rob

Forget shiftout();
Use
SPI.transfer

digitalWrite(SSpin,LOW);
SPI.transfer(byte0);
SPI.transfer(byte1);
SPI.transfer(byte2);
SPI.transfer(byte3);
SPI.transfer(byte4);
digitalWrite(SSpin,LOW);

will be wicked fast for updates