16 channel multiplexer


I am trying to connect pots to the CD74HC4067 multiplexer. (http://www.sparkfun.com/commerce/product_info.php?products_id=9056)

I have everything connected, I think in the correct way. but I am unsure of what arduino and max/msp code to use in order to read all 16 channels on the multiplexer.

i have read all the posts and forums i could find on this topic but I am still confused. :-/ Could you please help me or lead me in the right direction?

also if anyone knows of supercollider code that can read the multiplexer instead of max/msp that would be great, as I am not very accustomed to max, if not max is cool :)

(here is a list of the most useful pages i have read and tried to put into practice: http://www.arduino.cc/cgi-bin/yabb2/YaBB.pl?num=1236179619/0#0 http://www.arduino.cc/playground/Learning/4051 http://www.arduino.cc/cgi-bin/yabb2/YaBB.pl?num=1138666403 http://little-scale.blogspot.com/2007/06/arduino-midi-out-example.html )

thank you 8-)


You'll need to write a sketch for the Arduino that selects one of the 16 analog input channels, then reads the analog input, then selects the next channel, reads the analog input, and so on. So you'll have four digital outputs to drive the four bits of the 'channel select' inputs on the 4067 and one analog input to connect to the 4067's one analog output.

oops sorry, i was not emailed so i didn't know anyone had replied to my question :)

thanks for the link. I managed to type up some arduino code myself last week, by adjusting the 8 channel code, but i am unable to check if it is working correctly without any max/msp so trying to update the 8-channel one. :-?

will let you know when i get it working and post the 16-channel max code on the forum :)

thanks for the help