For 35 buttons, you may consider using resistors for each and read them via an analog port. (One pin)
-----------
For 35 buttons, you may consider using resistors for each and read them via an analog port. (One pin)
-----------
"If the Earth were a single state, Istanbul would be its capital." Napoleon Bonaparte
Hi, Ioannis
70 pots ... wow, how much hands to drive them ??? two 8 channel low Ron multiplexers could do it ... makes 8 I/O ports
for the keyboard ... 7 port lines can give you 42 buttons ... the trick is just to add a series diodes with each button, and swap the line levels that test the buttons.
Total is 15 I/Os ...
Sorry for Sayzer, but 35 resistors will really be too close a value to each others ( 3% steps ) ... will give a rock'n roll decoding !!! and we do not talk about the POT command !!!
Alain
************************************************** ***********************
Why insist on using 32 Bits when you're not even able to deal with the first 8 ones ??? ehhhhhh ...
************************************************** ***********************
IF there is the word "Problem" in your question ...
certainly the answer is " RTFM " or " RTFDataSheet " !!!
*****************************************
Thanks for the replies.
Well for the buttons I think I 'll choose the matrix method (5x7 or more for the future).
About analog I came up with a scheme like this:
The pots will be grouped in 8 rows by 9 or more columns.
One end will be grounded. The other end will be joined for every row together and powered by a PIC pin output.
All wipers in one column will be joined together through a schotky diode and grounded by a 1M resistor, then input to a Analog multiplexer. The output of the multiplexer will be driving the A/D of the PIC.
I know the above idea will lack precision, but this really does not matter a lot if the error is common for all pots.
For the history, the application is a MIDI controller for a music plug-in that has on software many "analog controls" on screen. The idea is not to use the mouse to change the control but a real knob.
Any comments welcome.
Ioannis
Most multiplexer provide a low resistor between the IN/OUT, i don't see any kind of problem by using it. just make sure you smooth the signal at the output and you should be in business.
I already done something like that with almost the same requirement. The main difference was that i used few a/d and few multiplexers and all the POT was always connected to AVdd and AVss, the output to the Multiplexer, multiplexer out to an opamp (to match 100K impedance), then to the PIC a/d.
Have fun!
Steve
It's not a bug, it's a random feature.
There's no problem, only learning opportunities.
Bookmarks