Using 74HC595 Shift Registers in a matrix #594
Replies: 1 comment 4 replies
-
The button matrix class switches the row pins between input and output mode, it doesn't switch from high to low, which is why you cannot use a shift register (as it is always in output mode), see lines 24 and 38: Control-Surface/src/AH/Hardware/ButtonMatrix.ipp Lines 23 to 39 in e654266 That's not to say that you cannot do this using a shift register, of course, but you'll have your own variant of the button matrix class. Keep in mind that you have to use diodes in this case, otherwise you will short something out when pressing multiple buttons (this is the main reason why the provided button matrix code does not support it). |
Beta Was this translation helpful? Give feedback.
-
this... might be off base. I know just enough to get dangerous ideas.
I know using SIPO shift registers as part of a matrix can be done--where you write outputs to the register(s) and listen on one or more pins--and my (likely rough) understanding of Control Surface's button matrix implementation is that rows are all set as output while columns as input, so I thought I might be able to do this:
but that doesn't seem to be the case. When connected to my promicro I get 0 messages if the diodes are one direction, and if I swap the diodes around any button will send all notes at the same time. I tried enabling debugging to see if that shed any light on the matter, but no debug messages display on the serial monitor, so I may be doing that wrong too 🤷♂️
Is there an issue with my code (or maybe my wiring? I can take a pic of the breadboard or make a diagram), or is this just something the library's not able to do right now?
Beta Was this translation helpful? Give feedback.
All reactions