View Full Version : Questions about connecting a 4 x 4 matrix keypad to I/O pin of BS2p40

08-14-2005, 05:57 PM

Anybody have tried interfacing such a keypad to a BS2p40 I/O pins before? If so, what keypad scanning technique did you use? I am trying to implement a "Walking Zero" continous polling keypad scanning system with the keypad that I'm using. I'm also wondering if theres any need to connect the rows and the columns of the keypad to ground, while connected to the I/O pins?


08-14-2005, 06:31 PM
I don't know if this would be of any help, but when I interface my 4x4 keypad matrix, I'll be using one of these:

jameco.com/webapp/wcs/stores/servlet/ProductDisplay?langId=-1&storeId=10001&catalogId=10001&productId=171969 (http://jameco.com/webapp/wcs/stores/servlet/ProductDisplay?langId=-1&storeId=10001&catalogId=10001&productId=171969)

This way the keypad data is serial, and my BS2's, can get to it when they have a chance. (Window of aprox 50 ms, should be plenty of time. :) )


08-14-2005, 07:24 PM
Yes, you can easily interface a 4 x 4 keypad to a Basic STAMP, but you'll need 8 pins to do it and some pullup (or pulldown) resistors. Check out Nuts and Volts #22 for more info www.parallax.com/html_pages/downloads/nvcolumns/Nuts_Volts_Download_V1.asp (http://www.parallax.com/html_pages/downloads/nvcolumns/Nuts_Volts_Download_V1.asp)

Chris Savage
08-15-2005, 02:26 AM

I have used the E-Labs chip many times for keypad decoding. Nice to use 2 pins instead of 5 or 8.


I have also used the same concept as in the N&V article you linked. In fact, using old C=64 keyboards we used to do 8 X 8 decoding of 64 keys using 2 8-bit I/O ports (Pre BS2 days).

Chris Savage
Parallax Tech Support
csavage@parallax.com (mailto:csavage@parallax.com)