Minimal I/O line 4x4 Keypad

hippy

Technical Support
Staff member
Here's a novel way of interfacing a 4x4 keypad using just 4 I/O lines.

It requires being able to make all the I/O lines input or output and won't work with a pre-assembled 4x4 keypad with just row and column lines coming out from it. With an 18X using the Shadow TRISB register to turn the Outputs into Inputs, a few current limiting R's and using SERTXD for comms a 64-key to serial keypad could be created.

I cannot take credit - That belongs to Elektor ...

http://books.google.com/books?hl=en&id=rZDbnQ0siCYC&dq=308+circuits&printsec=frontcover&source=web&ots=sKIHHZvieV&sig=GRV3t4ORjfAhY23E-J06wytFwmE&sa=X&oi=book_result&resnum=3&ct=result#PPA61,M1

And credit for the online link goes to Nick McClick on another forum ...

http://forums.parallax.com/forums/default.aspx?f=25&m=282160

It would probably make sense to add some pull-downs or pull-ups on the I/O lines or use internal weak-pull-ups if available ( which I think this circuit may rely on ).
 

Attachments

Last edited:

westaust55

Moderator
An alternative is the 74C922 which is basically a 16 keyswitch encoder but with a few diodes and a logic gate can be expanded to 32 keys.

This chip has a data available signal, which does need an extra line. That signal can be used as an interrupt rather than the PICAXE programming always having to poll the inputs.
 

Attachments

Top