Rotatory Switches question

Well, you would actually need far less shift registers than 1,5 per switch if you were using the DIO_MATRIX module!

am i missing something ? 12 inputs from 12 switch-contacts -> 12 inputs on the shift-registers = 1 (8-input) shift-register + 0,5 (4-input) shift-register. and theres i no way around, unless you are on about connecting the switch contacts in some kind of matrix form to the shift-registers…

I think this schematic will help you: http://ucapps.de/midio128/midio128_v3_dio_scanmatrix.pdf

…thanks for pointing me in the right direction! looks really interesting and i didnt see that before…

Well, you would actually need far less shift registers than 1,5 per switch if you were using the DIO_MATRIX module!

You are very right.  This is a digital way to do the same thing.  You connect the switches in a matrix.  In fact if you connect it up in a specific way you don’t even need diodes.  In the matrix you could even go to 16 position switches and have 16 separate switches with just one DIO_MATRIX board.  To make it work you would take the 16 output chain wires (two 74HC595) and connect each one to the 16 positions of the switches.  If you have more switches, just parallel all the 16 wires from one switch to the next and to the next.  Now the wiper on each switch will connect to one of the inputs of the input chain (two 74HC165) of the matrix board.  The diodes are not needed because each switch will have only one of the 16 positions making contact to the wiper at any one time. 

makes sense to me! the only problem with that solution i see is, that i would never pay for one pcb with 16 rotary-switches! this sounds really expensive to me! i would split the design into 4 pcbs with 4 rotary switches each, as i have done before. that way you keep the pcb cheap and you can use the pcb 4 times. with the price of one rotary-switch of more than 7pounds i wouldnt do it without a cnc-drilled pcb. that would be a waste of money for the switches, if you think about it, because you would never get the switches aligned perfectly straight.

 

if anyone has an idea how to use the dio_matrix in combination with 4 pcbs a 4 switches, which can easily connected to a midibox-core, im quite happy to take the “digital way” for my next design…:slight_smile:

 

mOnO

The shift registers don’t necessarily have to sit on the same board as the switches. Switch boards could be interconnected with ribbon cables. I don’t think your design considerations are a major hindrance for the “matrix approach”.

well, i know that the matrix approach is a good option, if you want to read switches or output to leds in a very quick manner on midibox, not only because of the dma-controller of the stm32f4, but also because of how it is supported by mios32. When i was looking at the diagram for the first time, i couldnt figure out straightaway, how to that in a way, i described before. i will certainly keep that in mind, when i do my next design for buttons/leds. in the meantime i would appreciate any suggestions on doing this anyway…:slight_smile:

 

mOnO