just to ask about multiplexers.
i am building a controller that will require multiplexers, as there is going more than a few controls, over 64, though a good amount [buttons] will be going into the digital ins.
but there will be some potentiometers, more than what the mega board will take, so i am going to be using multiplexers to help out.
but one thing i have come across on the forums and info on the arduino site, is that you can not do simultaneous movement with them, or at least the ones i could find.
is there any multiplexers that can allow simultaneous movement?
Analog multplexors can only read one of it's inputs at a time, just as Arduino can only read one analog input at a time, but both can do it very very fast, so it can appear that it is reading a bunch of inputs simultaneously.
I had a setup with 16 slide pots hooked up to Arduino by two 4051 multiplexors. I could read all 16 pots, format the data and send the data over serial to a PC every 10ms. Thats 100 times a second. There was no percived lag between moving a pot and seeing it's value reflected in the PC software.
In my setup not much else was going on, so if you have to read (and debounce!!!!) a bunch of switches and do some processing as well you might not be able to do it quite as fast / frequently, but it probably doesent matter.
I disagree. It's easy to do it in software. With lots of buttons, use a matrix (with diodes) and debounce in software. When you do it in hardware for a large number of buttons it gets too expensive.
well there are things i am starting to work out a bit more. such as sending data to ableton and other such daw programs to control faders etc. although it seems to not be working. i am using the maxuino code...
Don't do the debouncing in software - use schmitt trigger (hardware) for debounce.
Schmitt trigger doesn't debounce, it de-noises. If you have a mechanical switch and resistor/pull-up connected to an input pin, the input is going to be fast full-rail voltage swings anyway so a schmitt trigger does nothing.
You can have a low-pass filter before the schmitt trigger, but that's a lot of extra components for each switch.
Often a switch doesn't need debouncing because it is only polled every so often anyhow - it happens for free in your main loop.