Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

Question about PS/2 keyboard wiring and pins

Status
Not open for further replies.

JHarmon

Newbie level 3
Newbie level 3
Joined
Jul 2, 2012
Messages
3
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
1,306
I'm trying to work with data from a keyboard and design some little logic circuits for it. I stripped off the PS/2 connector, then used an ohm meter to find which wire corresponded to which pin. I then stripped the wires, soldered some solderless-breadboard-friendly wires on, and plugged them into my little breadboard. I have voltage wired to +5V, ground to 0V, and I'm connecting the clock wire to the clock pin of a 74LS161 binary counter (datasheet if you'd like).

So when I press and release a key, my counter should count to 32 (31, 32, or 33, not quite sure from the reading I've been doing)...
However, it does not change when I press a key.

Does anyone have experience with PS/2 keyboards? I can't find what's wrong with my circuit :-?
 

Re: PS/2 Keyboard Wiring

Show your circuit. Schematic and/or pictures will help.

You need to pull the clock and data lines high or the keyboard won't transmit. Throw a 1k-10k pullup resistor between clock and +5V and another with data. See http://pcbheaven.com/wikipages/The_PS2_protocol/ or electrical interface section at http://www.computer-engineering.org/ps2protocol/ (the transistors are only to pull the lines down to send commands to the keyboard, which you may or may not be doing) , or **broken link removed** or Google results for "PS/2 device protocol".

Things that could have made your life easier in terms of not having to experiment with pins, not destroying keyboard, and not dooming yourself to redo the work if you have to use a different keyboard (e.g. yours breaks):
- http://www.cablestogo.com/product.asp?cat_id=104&sku=21726 and stick your wires in the holes, or
- http://www.mouser.com/ProductDetail...09Sz5t5voW%2btDTp54o1clIUJE3uu89vAjz7U0UgxNk= and put it on your breadboard, or
- http://www.cablestogo.com/product.asp?cat_id=138&sku=01744 and wire it up.

Are you sure you identified the correct pins?

Are you sure you are using the binary counter correctly? Have you tested your usage by supplying your own clock input to the chip instead of using the keyboard?

Also consider using a microcontroller.

There are also cool chips like this one: **broken link removed** that can handle ps/2 input, output, have built in character buffering, output pins for caps/scroll/num lock, etc. (see recommended circuit on page 17 of datasheet). $2.50 in a dip package: http://www.newark.com/jsp/search/productdetail.jsp?SKU=53M7845&CMP=AFC-GB100000001
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top