Author Topic: Parallel Arduino 4x4 keypad.  (Read 3264 times)

0 Members and 1 Guest are viewing this topic.

Offline IY3775Topic starter

  • Newbie
  • Posts: 9
Parallel Arduino 4x4 keypad.
« on: March 13, 2019, 04:11:28 pm »
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

 

Offline jlmoon

  • Supporter
  • ****
  • Posts: 609
  • Country: us
  • If you fail the first time, keep trying!
Re: Parallel Arduino 4x4 keypad.
« Reply #1 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 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. 

 
« Last Edit: March 14, 2019, 02:39:11 pm by jlmoon »
Recharged Volt-Nut
 

Offline IY3775Topic starter

  • Newbie
  • Posts: 9
Re: Parallel Arduino 4x4 keypad.
« Reply #2 on: March 14, 2019, 05:28:03 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.
Both will have 5V at the digital pin.

Sent from my Mi A1 using Tapatalk

 

Offline viperidae

  • Frequent Contributor
  • **
  • Posts: 306
  • Country: nz
Re: Parallel Arduino 4x4 keypad.
« Reply #3 on: March 14, 2019, 09:20:37 am »
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.
 

Offline tooki

  • Super Contributor
  • ***
  • Posts: 11341
  • Country: ch
Re: Parallel Arduino 4x4 keypad.
« Reply #4 on: March 14, 2019, 02:43:56 pm »
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.
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf