• Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

PIC PS/2 Keyboard Circuit and Code - 5 Keys Only

Not open for further replies.


New Member
This is similar to what's been discussed in this thread: http://electro-tech-online.com/viewtopic.php?t=1136

I want to use a PIC. I already have a PIC16F84A. I only have 5 inputs (5 Keys or Buttons) and 4 outputs (a PS/2 keyboard usually has 6 leads, but only 4 are used, which I can see by looking at the end of the PS/2 plug of my keyboard cord).

Once 1 of the buttons are pressed, the PIC will send out a "signal" to the Keyboard port on the motherboard side. As I've been reading, I guess there are keyboard scan codes that are being sent out.

However, there is one exception, which might be the hardest part. One of the keys I need must send out a string. This string says: qv r:/*.avi . So in actuality, I'm using 4 keyboard keys (which will become buttons), and 1 button that will send out a line.

In summary, when 1 button is pressed, it will tell the PIC to send out a specific "scan code" or a string.


4 Keys:
1- Esc
2- Space Bar
3- Left arrow
4- Right arrow

1 Button:
1- sends out a string

any advice? thanks.


New Member
I've looked at that website, and it's very useful. However, there's a lot of "other" stuff, and it's difficult to say what I need and what I don't need for my *specific* application. Can anyone give me some more advice? Thanks.
Not open for further replies.

Latest threads

EE World Online Articles