Matrix keypad

Hi,

I'd like to connect a matrix 3x4 keypad (as the one on this page -> Arduino Playground - KeypadTutorial). I was just wondering, what kind of IC, or other electronic component(s) could I use, to reduce the amount of digital inputs I would need to use on Arduino? By the looks of it, without using anything I need to use 14 pins on Arduino. Is this correct?

Thanks,
Jerry

By the looks of it, without using anything I need to use 14 pins on Arduino. Is this correct?

No, it's multiplexed so for a 3X4 key matrix you need 3 lines for the outputs and 4 lines for the inputs, a total of 7.
You can reduce this by using logic chips.
A 74LS157 is a data selector and an 74LS139 is a demultiplexer. Use these together and you reduce the pin count down to 4.

Are there any schematics out there, that would help me understand how to connect such keypad to Arduino? Sorry for such dumb questions, but I'm a java programmer, with very limited knowledge of electronics. :slight_smile: