LED Driver Options

Hi. Starting up my 1st Arduino project with the Mega. Planning to make a dart scoreboard and looking for advice as to what LED driver option I should take.

The project will have 6pcs of 3x7seg displays and 42 additional LEDs. This totals 168 LEDs. Also for context there will be 9 push button switches and one 4 throw switch.

I have a pretty good idea how to build it but im not so sure the best and easiest way to interface with all these LEDs. Ive seen a few different options and would appreciate if anyone with experience here has some feedback. Keep in mind I'd like to keep cost down and would also like this to run on the Duemilanove besides the Mega I have now. [1.] Use shift registers as described here: Link1. It seems like using shift registers rather than a serial protocol like SPI or I2C would require much more programming, right? Also i guess I'd need to use 21pcs of 595 chip. that would also get a bit pricey with so many IC's. [2.] There's the MAX7219 (Link2), an SPI interface chip that supports 8pcs 7seg displays. I'd need 3 of these but they are pricey (~$10ea). Also im not sure, can i use 3 of them on the serial bus? how easy is it to progam these using SPI? [3.]I really like the SAA1064 (Link3). It controls 4pcs 7seg displays, is affordable (~$1.5ea), and uses I2C which seems pretty easy to program. Unfortunately I'd need to use 6pcs of these but apparently you can only address up to 4pc on the I2C bus (so says the datasheet). Anyone know of a way to get a couple more on there?

So Im not sure what the best route to go is for all these LEDs. Are there viable choices other than the ones above? perhaps a combination? Is it possible to do I2C and SPI? Any help is much appreciated.

Links since I wasn't allowed to post them..

Link1:http://www.arduino.cc/en/Tutorial/ShiftOut

Link2:http://datasheets.maxim-ic.com/en/ds/MAX7219-MAX7221.pdf

Link3:http://www.nxp.com/documents/data_sheet/SAA1064_CNV.pdf

Is it possible to do I2C and SPI?

Yes they both use different pins so they can be used at the same time.

I use the MCP23016 - it's a 16 bit I/O expander on the I2C bus. You can have 8 of these on the bus without messing.

It seems like using shift registers rather than a serial protocol like SPI or I2C would require much more programming, right?

No - nothing to write home about.

Anyone know of a way to get a couple more on there?

Yes you put an analogue switch in the I2C lines to control different things with the same address.

Yes you put an analogue switch in the I2C lines to control different things with the same address.

@Grumpy_Mike, could you give me a quick example of how this would work with the analogue switch? I’m not familiar with this technique. Also are there any challenges (with flickering maybe) that this might introduce?
Thanks.

Follow up question. Which implementation do you think will be easier (mainly programming wise)? [1.] Using 6 SAA1064 chips, utilizing this "analogue switch" technique [2.] using 4 SAA1064 + 4 MCP23016. [3.] using 12 MCP23016 chips

could you give me a quick example of how this would work with the analogue switch?

Just do this:- This splits the bus into 4 sub buses. Simply use the enable lines sel_a & sel_b to select the right bus then you can have one device at the same address on each sub bus. With the MCP23016 you can have 8 devices on one bus because you can change the device's address with logic input pins. So with this arrangement you can have 8 X 4 = 32 chips with each one having 16 I/O lines giving a total of 512.

Also are there any challenges (with flickering maybe) that this might introduce?

There is no flickering because all the outputs are latched by the I2C device.

Using 6 SAA1064 chips, utilizing this "analogue switch" technique

Not sure what you mean by "analogue switch" it appears to be a straight forward driver. You can't use analogue switches to drive LEDs successfully. I would tend to stick to the the same chip for all the outputs as the 1064 is a multiplexed output where as the MCP32016 is not.

Just to throw a spanner in the works you can also use the 23S17 this is similar but uses SPI so you get the data out to it quicker, which might be important if a lot of LEDs are changing in an animation.

OK I understand what you mean with the multiplexer. I think I'm going to try this kind of I2C multiplexer using 1064 chips, mainly b/c i will need to use less of them. It's not an animating display or anything like that so i don't foresee any issues there.

Thanks for your help!