Continue to Site

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.

  • 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.

Computer Keyboard Schematics

Status
Not open for further replies.

Electric Rain

New Member
I can't stay, so I'll make this quick and to the point. I need schematics for a standard PS/2 computer keyboard. 102 keys, 105, I don't really care. I'd like it to be microcontroller-less, but I'll use one if I must. It must include the code though. Thanks.

Rain
 
Electric Rain said:
I can't stay, so I'll make this quick and to the point. I need schematics for a standard PS/2 computer keyboard. 102 keys, 105, I don't really care. I'd like it to be microcontroller-less, but I'll use one if I must. Thanks.

I doubt any PC keyboard is microcontroler-less, even if it's called a keyboard-controller IC, it's certainly going to be a micro.

However, I doubt you would be able to buy the pre-programmed micros, far better to simply buy a keyboard and strip it if you need a really strange shape or something.
 
I agree, Nigel. Here is an application for interfacing of the cheap kbd to I2sbus. Maybe give some startpoint...
 

Attachments

  • pckbdtoi2sbus.pdf
    54.9 KB · Views: 2,107
Well, first off I'd like to thank Sebi, for the PDF document. It could come in handy.

My reasoning behind this: Interfacing video game controllers to your PC is something many video gamers like to do. This is because they like and are used to the feel of their XBox, PS2, GC, DC, N64, NES, SNES, ect. controllers and don't want to use a PC controller. (One of my favorites [which I've already built an adapter for] is the SNES controller. You gotta love it, even though it's got no analog stick. PS2 is second.) Because of this, many schematics to interface different types of video game controllers to your PC are out on the net; usually to the Parallel Port. USB types are most commonly the ones found on the market and the schematics for them are very hard to come by. Probably because of the extreme difficulty and expense of the design and parts. I thought a USB device would be compatible with more games. I mean honestly, supporting a controller on the printer port can't be very high on the priority list of many PC game programmers. So, the cheaper price of a pre-made, 2 controller, USB adapter over the price on the components needed to make a USB or parallel port adapter made me deside to buy one from eBay. It was for PS2 controllers. While the SNES controller adapter that I made was actually more compatable, neither of the controllers were compatable enough for me. Especially for games that were made on a... well, a lower budget. :lol: Plus, there's the JAVA games, or older games, that don't support joysticks.

What I'm asking for computer keyboard schematics for: From what I know, all computers that have a PS/2 port support any standard PS/2 keyboard you plug into it with no software required. (Keep in mind, I don't like hacking stuff. I like my work to be more professional looking.) So, what I was thinking, is, what better way to increse the compatibility of controllers, than to combine it with what every computer knows? PS/2 keyboards! That way, I can use the controllers with whatever supports the keyboard. Plus, with the large amount of buttons on a keyboard, multipule controllers could be supported. (But, computers only support a few buttons at a time from a keyboard... right?) But, lately I've been thinking, you have to decode the buttons of the controller input into single lines for each button anyway. Then, you'd have to change the wires around if you had to re-configure it to different keyboard buttons for some reason. Unless you hack it, but then you can't use it on your system. So I'd need a micro-controller anyway. So, my new plan, consists of a micro-controller, and some type of RAM for the base, and another micro-controller and jack for the controller input. The secondary micro is used for decoding the input from the controller and sending it to the primary microcontroller at the base. (The reason for a secondary micro is so that it can be programmed for different types of controllers and sent to the base as the same type of code for each type of controller, rather than having to build a whole new system for each type of controller.) The base, will take input from a keyboard, store it as hex code in the RAM, take input from the secondary micro, and send all of this as hex to the computer as if it were a keyboard.

The way this all ties in together, is as follows: Setting up: Main micro, enter setup mode. A button it pressed on the controller, decoded by the secondary micro and sent to the main micro. A button is then pressed on the keyboard, and is decoded as hex by the main micro. The main micro stores the button pressed on the controller and the respective hex code from the keyboard in the RAM (EEPROM or whatever. Don't know much about it.). This is done for each button. Exit setup mode. Now, what we have, is the decoding of the controller into... I don't know what, by the secondary micro and sent to the main micro, then a read from the RAM, to tell the micro what hex code the user set to be sent to the computer by pressing a button on the controller, then, the main micro sends the hex code to the computer.

I'm very sorry if this was hard to understand. I'm kinda thinking out loud. But that's my plan anyway. Converting analog sticks into the signal that mice use is also something I'm thinking about, but a totally different story. If anyone can help me on the matter, or wants to gloat about getting through this post, let me know. :) :lol: :p

Rain
 
Electric Rain said:
I'm very sorry if this was hard to understand. I'm kinda thinking out loud. But that's my plan anyway. Converting analog sticks into the signal that mice use is also something I'm thinking about too, but a totally different story. If anyone can help me on the matter, or wants to glote about getting through this post, let me know. :) :lol: :p

The main problem is that you asked a totally different question originally, all you want to do is send signals into a PS2 keyboard port!.

If you'd asked that. it would have been a lot easier!.

The UK magazine EPE has recently published an article on EXACTLY that, using a PIC to communicate with PS2 keyboard and mouse ports.

Have a look at **broken link removed** to download the software.

You might also look at **broken link removed** a simple game which uses a PS2 mouse to control it.
 
PC adapter for games controller

So, if I understand you correctly ...
A 'box' is connected in-line with the keyboard, a joypad (or whatever also connects into this 'box'.
The 'box' enters PROGRAM mode,
... this could be by pressing the keyboard's 'F10' or something?

You press a key on the keyboard,
... the 'box' decodes this and memorises the scancode
You press a joypad button
... the 'box' reads this and allocates the previously stored scancode to it
You repeat the above for each joypad button

The 'box' leaves PROGRAM mode - maybe via 'F10' ?
If the 'box' is in PROGRAM mode it does NOT send anything to the computer, otherwise it simply forwards all keyboard activity AND any (suitably translated) joypad activity.

If I am correct then you want the PS2 scancode table (this appears at the end of Sebi's .pdf) rather than its circuit.
The above sounds like a 90% software project to me - a brilliant (and versatile) PIC project ?
 
Re: PC adapter for games controller

mechie said:
So, if I understand you correctly ...
A 'box' is connected in-line with the keyboard, a joypad (or whatever also connects into this 'box'.
The 'box' enters PROGRAM mode,
... this could be by pressing the keyboard's 'F10' or something?

You press a key on the keyboard,
... the 'box' decodes this and memorises the scancode
You press a joypad button
... the 'box' reads this and allocates the previously stored scancode to it
You repeat the above for each joypad button

The 'box' leaves PROGRAM mode - maybe via 'F10' ?
If the 'box' is in PROGRAM mode it does NOT send anything to the computer, otherwise it simply forwards all keyboard activity AND any (suitably translated) joypad activity.

If I am correct then you want the PS2 scancode table (this appears at the end of Sebi's .pdf) rather than its circuit.
The above sounds like a 90% software project to me - a brilliant (and versatile) PIC project ?

Perfect. That's exactally what I want to do. But keep in mind, I also want to be able to use other types of video game controllers. That's the reasoning behind the secondary PIC. It's "detachable."
 
Keyboard protocol and scan codes are well documented. Reverse engineering your joystick signals require trial-and-error though.
By the way, if the joystick protocol is also serial, then tough luck for you.
 
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top