Building a pad

I am well known to computers (Ok ok, they are well known to me), and I have some understanding of electonics (though not much). Also know some programming.
What I wonder is how easily one can bild, connect, and program a with five buttons that simulates the lettesr z,x,c,v,b beeing pressed? It has to foll Windows into acceping the keystrokes in any porgram, not just the one I write, like a background application.
The intent is to give myself something to work on and try, to bulid a controlpad for the well known program WinAmp. Just to see if I can, and in the process, giving me even more understanding of computers, electronics etc.
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

The easy way to do it is to get a keyboard and rebuild it's electronics into a smaller case, then wire up the right rows and columns for the keys you want.

The hard way to do it is to learn about digital electronics, microcontrollers, maybe 80c51 assembly language, and blowing Eproms. This is not a bird project, it daunts the experienced hobbyist.

The difficult bit for both is making the keyboard work in parallel with your pad, making sure they are both synchronised with the computer, or one will lock up the other. Possibly the easiest way round is to get 2 identical keyboards, one to rebuild and one to use with it. Then the timing is the same on both, if you are lucky they sync the same at power on.

To learn more about interfacing the PC keyboard, look here.....

Actually since I last looked that link has gained some info on using PICs which are easier to play with than 80c51s, think those are for reading it, not emulating it, mostly though.

this link gives a good overview of the signals output by the keyboard and protocols it uses...
see sections 3.26 and 3.27 (right at the bottom)


Road Warrior

That's a pretty tough project for a first timer.  You've got both hardware and software issues that are non-trivial.

First, you can either hook into the keyboard port on the computer which is not exactly simple as you must be transparent most of the time but do the right thing when your keypad is active.  Alternatively, you could use the serial or parallel port to drive your keypad (and this is a lot easier since you can design your own protocol) but then you have a software problem.

If your keypad doesn't use the standard keyboard interface, you must write a device driver to hook it in to the keyboard driver.  This is a non-trivial activity and probably way beyond what I'd suggest for a beginner.
I think I have seen a joystick driver that can be programmed to emulate keystrokes in win 95, that would make things easy. Am looking for it.
Well this takes some of the fun away because it does most of the tricky work for you, it is a driver/adapter project that uses many available console game pads, and has drivers that EMULATE KEY STROKES in dos and in win 95. The Atari 2600 stick that the project supports is a basic 5 switch digital stick that would be easy to make a keypad version of, so that covers your 5 key requirement. Though the driver supports combos, so you could get extra functions using the fire button as a "shift" for 8 keys.

An atari stick uses 5 bits and a ground for a parallel interface, so you can rig up diode matrices to give you 32 different output values, don't know if the driver will support assigning a key to all 32 though (would be fun to build a pair for 10 bits and make a 10 fingered keyboard, hold down the ascii values you wanna type!) Anyhow, the data lines on the stick are 2,3,4,6 and 8, the return is pin 5, power is on pin 1 but shouldn't be necessary. I am not sure now the order of the data lines, but it should be easy enough to figure, I think pin 8 is the fire button though. I used to build this sort of thing for the Kempston interface on my Sinclair Spectrum (Timex 2000) but it seems a long time ago now.

So, the main page for this project is at ....
as you can see it began as a support for SNES joysticks.
You will probably get more out of the manual at...
which has the details for wiring the various gamepads to the PC and how the drivers are used.

The driver package itself is downloadable from a link on the top of the main page,


Road Warrior


Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Oooops, like I said, it was a long time ago, I found a diagram of a 2600 joystick, the thing is though that it makes the connection details for SNESkey look a little suspect, however, here it is...


Road Warrior
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today

From novice to tech pro — start learning today.