Computing > Embedded Computing

Parallel Arduino 4x4 keypad.

(1/1)

IY3775:
Hey! Will this configuration work properly?

4x4 keypad, has 4 rows and 4 columns, total 8 pins.

The keypad pins from 2 to 8 will be connected to an Arduino Mega 2560 digital pins 2 to 8, and keypad column 1, row pins 5, 6, 7, 8 will be connected to an Arduino Uno/ Nano digital pins 2 to 6. (This leaves ABCD keys from Mega and connects them to the Uno).

Both will have a sketch that uses 'keypad' library. (Searches for keypress in the matrix).

My question is, will it cause any problems with some keypad pins as mentioned above are connected to both Arduinos?

Sent from my Mi A1 using Tapatalk

jlmoon:
I believe without using any style of gating, you're going to have output/input pin contention.  If the two processors have different bus voltages ie. 3.3  / 5 V you're going to damage the devices.  This keyboard is designed as a matrix array, generally during your keyscan program  you set a column or row at a constant level and then scan the rows for a equivalent level.  Then you repeat using another column and row scan again until you have gone through the entire 16 combinations.  If your going to multiplex that keyboard, you will need to gate the multiplexed lines through a configuration of  addressable multiplexers, and with timing considered enable one set of columns and rows and look for keys, then switch multiplexers to the other processor.  Probably going to require a interrupt scheme to keep everybody happy.  In summary, in native form it will be quite difficult to tie two platforms to one keyboard. 

 

IY3775:

--- Quote from: jlmoon on March 14, 2019, 05:21:06 am ---I believe without using any style of gating, you're going to have output/input pin contention.  If the two processors have different bus voltages ie. 3.3  / 5 V you're going to damage the devices.  This keyboard is designed as a matrix array, generally during your keyscan program  you set a column or row at a constant level and then scan the rows for a equivalent level.  Then you repeat using another column and row scan again until you have gone through the entire 16 combinations.  If your going to multiplex that keyboard, you will need to gate the multiplexed lines through a addressable multiplexers, and with timing considered enable one set of columns and rows and look for keys, then switch multiplexers to the other processor.  Probably going to require a interrupt scheme to keep everybody happy.  In summary, in native form it will be quite difficult to tie two platforms to one keyboard.

--- End quote ---
Both will have 5V at the digital pin.

Sent from my Mi A1 using Tapatalk

viperidae:
You will still need a method to stop both micros driving different columns at the same time. If they do you'll get the wrong keys detected.

tooki:
I think it’d be wiser to have the Arduino Mega run the keypad, and then send commands to the Uno via serial or I2C or whatever.

Navigation

[0] Message Index

There was an error while thanking
Thanking...
Go to full version