Shop OBEX P1 Docs P2 Docs Learn Events
Need help with 74HC165/Keypad arrangement — Parallax Forums

Need help with 74HC165/Keypad arrangement

GumbyGumby Posts: 24
edited 2006-03-11 23:30 in BASIC Stamp
Hi,
I made a circuit with a 74HC165 and connected it to a 16 keys keypad matrix (8 lines).
All 8 lines from the keypad have a pullup resistor (10K) connected to +5V . These lines connect to the HC165 inputs with a 330 Ohm resistor for zap protection.
The HC165 is otherwise connected to the BS2 as per StampWorks Experiemnt#24, that is pin 8-15 to ground and pin 16 to +5V. Pin1 load and pin 2 clock.
I am using the 'Shiftin' command:

'..
Read_165:
PULSOUT Load, 5 ' grab the switch inputs
SHIFTIN DataIn, Clock, MSBPRE, [noparse][[/noparse]switches\8] ' shift them in
RETURN
'
I connected the data pin to pin 7 of the HC165 and nothing happened. I saw another schematic using pin 9 still nothing.

All my connections test Ok.

Any suggestions as to why I am not getting any input from the keypad. Any incorrect connections?
Thank you in advance for your help.
Gilles freaked.gif

Comments

  • ForrestForrest Posts: 1,341
    edited 2006-03-11 21:07
    The schematic for SW Experiment #24 is to connect 8 individual switches, not a keypad. Keypads are typically interfaced is a different manner - using inputs and outputs. Nuts and Volts #22 www.parallax.com/html_pages/downloads/nvcolumns/Nuts_Volts_Download_V1.asp shows a 4 x 4 keypad connected to a BS2 and the program operates by setting 1 column to output and reading the 4 row inputs to determine if any have changed. The next column is set to output and the 4 rows are read again, etc. You can probably accomplish the same thing by using a 74HC595 (SW Experiment #23) connected to the 4 columns and a 74HC165 connected to the 4 rows.
  • ForrestForrest Posts: 1,341
    edited 2006-03-11 21:31
    There are simpler methods for interfacing a keypad - see this thread that includes a schmatic that uses just resistors and a capacitor by Beau Schwabe http://forums.parallax.com/showthread.php?p=570329
  • Chris SavageChris Savage Parallax Engineering Posts: 14,406
    edited 2006-03-11 23:30
    Gilles,

    ·· 4X4 Matrix Keypads are meant to interface with 4 output lines and 4 input lines typically.· A recent thread shows that there are many ways to skin a cat (err, keypad).· EDIT: I just noticed Forrest posted that thread.



    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Chris Savage
    Parallax Tech Support
    csavage@parallax.com
Sign In or Register to comment.