Home Getting Started My Stamp Projects Electric Eng. Projects My Robots My PIC Projects PIC Mircontrollers Downloads Links Email


Interfacing a 4X4 keypad to a BS2 using a 74922 encoder chip.

Parts needed- 9 pin Keypad, Basic Stamp, 74C922 keypad encoder IC, 2 capacitors, and a LCD display.

Downloads - Schematic - code - Data sheet for 74C922

This is a pretty basic project, I had a little trouble understanding how the 74922 worked but I after an hour or so of looking at the data sheet and using my logic probe I understood completely. Here is a brief description of how the 74922 works. The chip scans the keypad waiting for a keypress. When a button is pressed pin 11 of the 74922 goes high. Then a 4 bit binary number corresponding to the button press is sent to pins 14-17 of the IC. The programming is pretty straight forward, use the button command to read the state of pin 11 of the 74922. When its high read the states of pin 14 to 17 and save it. Now you have to convent the 4 bit binary number to a decimal number. Then use a bunch of if statements to do what you want with each pin of the keypad. The two capacitors are for scanning and debouncing times. Pin 5 is for scan and pin 6 is the debounce. They dont have to be .1 uf and 1uf. If you want a faster auto repeat go with a .1uf cap. Here is a picture of the keypad i used. Both the 74C922 and the keypad can be bought from Jameco. Here is a truth table i made up for the output of the 74922 using this keypad. Zero starts at the up arrow and it goes from right to left the whole way down.





Home Stamp Projects EE Projects PIC projects Downloads Getting Started Links Robots

Last update: March 17/2001
Questions or comments email me at shaunwilson19@yahoo.com or

Put your comments or whatever on my message board