multiplexer vs shift register

Hi, I'm starting on a project that will be reading in 40 senors. They are attached to the strings of a piano, so I will need to be able to respond to them very quickly. My first instinct is to use a multiplexer and have it be interrupt driven, but a friend seems quite convinced that I should use a shift register.

Do anyone here have any thoughts on which one to use with the arduino? I am new to the arduino world, but have done real time embedded programming before on motorola microprocessors.

Thanks

Hi, I'm starting on a project that will be reading in 40 senors. They are attached to the strings of a piano, so I will need to be able to respond to them very quickly

. How quickly, exactly? What seems fast to a person (1/100 of a second) is ages to a microcontroller running at 16Mhz.

What kind of data are you getting? Just a digital bit, or do you need an analog value?

My first instinct is to use a multiplexer and have it be interrupt driven, but a friend seems quite convinced that I should use a shift register.

Pro's of using a multiplexer: - yes, it is faster than a serial shift register - there are analog versions con's of using a multiplexer: - uses more pins (for 40 sensors you'd need at least 7 pins). - you can only get data from 1 sensor at a time.

Pro's of using a shift register: - they can be daisy chained for a large number of sensors - only uses 3 pins, no matter how many bits - you can get data for multiple bits at the same time con's of using a shift register: - digital (1 bit per sensor) only - takes a little more work to get the data (slower)

FWIW, I don't think a shift register is that much slower than a multiplexer on a human reaction time scale. It's only an issue if microseconds count.

Sorry for jumping on this thread but I'm working on a similar project which needs 17 analogue inputs with up to four signals happening simultaneously (e-drum kit with velocity sensitive multi-zoned pads & rims, dual-zoned cymbals with choke sensors).

My electronics knowledge is a little thin on the ground so bear with me..

I'd initially given up on the arduino because of maximum 8 analogue inputs, but just read about the option of interrupt-driven multiplexing in the playground (http://www.arduino.cc/playground/Learning/4051).

What sort of switching process would monitor the analogue inputs of the 4051, detecting transients and operating the three 4501 digital interrupts? One of the inputs is a pot varying over time, how could I be sure this signal wouldn't be cut off by any of the other interrupts (or is this all academic due to the 16Mhz operating speed of the IC?). I might not be making any sense here.. :-/

Are there any self-contained interrupt driven multiplexers that would suit this problem?