Emulating a matrix keypad with a stm32 microcontroller
Good morning Stm32 community,
I am designing a matrix keypad emulator to control a musical keyboard. I need a 16x16 keypad for the music keys and a 8x8 keypad for the control buttons.
The idea is to swap the existing keypads connected to the existing processor with the keypad emulator (because I do not have access to the existing firmware and a programming environment) and do the matrix scanning and control of the keypad emulator with an additional stm32 microcontroller, which I can program myself.
Now, you can build such a keypad emulator with either discrete components, such as analog switches, diodes and shift registers with will cost me around 100 Euro's for the components only or... you can use a microcontroller for that, which would be much cheaper and flexible. The following blog I found says it all I guess,
https://www.eevblog.com/forum/beginners/simulate-a-matrix-keypad-with-a-microcontroller/
Using a micro controller to emulate a keypad directly is a bit tricky because you need to be fast enough to be within the wait time of the original firmware when a scan line is activated, or, what just came to me this morning, I could maybe do a "Master Slave FF like approach" and anticipate for the next scan line going high and already put the code word for the next scan line ready in the current scan line cycle, after... a sufficient delay to be past the wait time of the original firmware but I can control that delay myself, which I think could work reliably.
I just wanted to ask whether anyone has experience with this, and would like to share his or hers ideas on this.
Thanks.
