Project:Programmable Keybord PROPELLER style!
KaosKidd
Posts: 296
Remember the old Gateway programmable keyboards? They were awesome! I was (and in most cases) so sad they stopped making them. So, here I am considering making one.
Getting the keyboard with all the extra keys is not really a problem, and neither is the actual SPIN or PSAM a problem. From what I can see, there are two issues.
#1 is how to connect to the host PC.
Options include USB, PS2 and blue tooth.
#2 is Reasonable options.
Things like Feedback, EEPROM, macro depth (such as permitting one macro to call another, and if so, how many deep?) and macro features.
#3 Would a "glide pad" be a worth while addition?
I was thinking of adding a bio finger reader to it as well, with customized "per user" macros stored on devise. Additionally I was considering adding the ability to save / load the macros from the host PC as well.
Ideas, suggestions, innovations and any features that would make this a "wow, awesome keyboard" project?
KK
Any and all opinions
Getting the keyboard with all the extra keys is not really a problem, and neither is the actual SPIN or PSAM a problem. From what I can see, there are two issues.
#1 is how to connect to the host PC.
Options include USB, PS2 and blue tooth.
#2 is Reasonable options.
Things like Feedback, EEPROM, macro depth (such as permitting one macro to call another, and if so, how many deep?) and macro features.
#3 Would a "glide pad" be a worth while addition?
I was thinking of adding a bio finger reader to it as well, with customized "per user" macros stored on devise. Additionally I was considering adding the ability to save / load the macros from the host PC as well.
Ideas, suggestions, innovations and any features that would make this a "wow, awesome keyboard" project?
KK
Any and all opinions
Comments
The PROP would read the keyboard matrix, encode as needed, then send the scan codes to the buffer (after processing any macros or such), waiting on the PC to ask for them. The commands are discussed Here.
The PS2 to USB converts would handle that aspect of the conversion if need be.
KK
This Document states:
I thought the Propeller could easily generate that fast of a clock on one of it's output pins. Am I wrong?
For starters, I plan on placing the prop between a keyboard and PC. Intercepting as needed. Eventually I plan on removing the keyboard and making my own.
KK
http://www.computer-engineering.org is another resource that has more PS/2 interface details. I've been using that as a reference for my I2C keyboard/mouse project.
That said, please let me know if you make an object. I could really use a PS/2 'keyboard' emulator on my MCU because I often interface with Flash programs on a PC by pretending to be a keyboard. I'd love to be able to send characters that end up in teh keyboard buffer of a pc! It gets expensive because I have to hack a keyboard or use a keyboard encoder like those used for arcade machine emulators.
Good luck!
Robert
Steps :
#1: 5 volt communication between the prop and host: Done!
#2: Basic hardware requirements (output side): Done!
#3: Basic hardware requirements (input side): Researching....
#3: Basic application goal's and layout: Done!
#3-A: Start PSAM Host Code with flag:KInit=True (input side is NOT monitored, but code will respond to HOST requests.)
#3-B: Load LCD module and initialize display.
#3-C: Load SD support for saving / loading profiles.
#3-D: Load Default profile (keyboard map and any existing defined macros)
#3-E: Load Keyboard programming module.
#3-F: Preform INPUT side initialization.
#3-G: Set KInit flag = True (input side is monitored and reported to HOST)
Have I missed anything?
Test Connections
HOST <----> 5v CLK <
> 1k res <---> Prop Pin
HOST <----> 5v DATA <
> 1k res <---> Prop Pin
HOST
> GRND
> ----> BOARD GRND
HOST
> 5v Power
> 3.5V reg ----> BOARD PWR
For now, I'm using the Propeller Demo board's PS2 with a keyboard connected and modifying the PSAM to return the scan codes. I'm working on getting my spin code (to be converted into PASM later) to reply to the HOST via the above connection. The next step is to directly pass the retrieved scan codes to the HOST. Further steps is to scan the incoming scan codes for macros and then pass the macros. Develop the macro record and store code. When this happens, I'll be adding the microSDcard to the project. The reason for this is to permit large and numerious macros to be stored.
Next is to incorporate the LCD into the system. This is to display to the user various information. Lastly is to develop the actual custom keyboard interface to replace the PS2 keyboard on the board.
The final project is to have color or gray LCD under a touch screen so that you can create a totally custom keyboard that would be stored on the macroSD card for any application you want.
Go Go Gadget Keyboard!
KK
PS/2 emulation or USB HID keyboard emulation seems a more elegant solution though...
As for progress... I'm kind of stuck (but haven't given up) on reading the signals from the PC.... I've got a timing issue... I'll get it...
KK
Reading from the PC is the issue. I keep getting trash when I should be getting the init code. I know why, it's just getting my timing loops right. It appears as if I'm missing the first x bit(s) and that's offsetting the received bytes.
I am using the keyboard.spin code as my base line code... understanding how to receive is 50% of the battle...
Fun Fun Fun..
One of these days I'll get that dev pc onto the network so I can share the code and stuff...
http://forums.parallax.com/showthread.php?t=125424
This post in Completed Projects shows a successful implementation of sending data to a PC's PS2 port. Maybe you could examine that for some timing info..?
Vern
I'm getting closer. Right now I believe it's a logic issue with my code that's causing the actual first bit being received being dumped or placed into the wring bit.
It's a fun project... to say the least...
Once I get it so it can and will reply properly with the post coding sequence of the host, the rest is somewhat easier, just tricky. While outputting a given scan code, I have to watch to see if the clock line is pulled low by the host between clock pulses. If it does, then I'm not sending data anymore, I'm receiving a command. Some of what is posing are commands from the Host. Once I get the correct values, then I'll build the reply code.
I looked inside a few keyboards and found that they use a single 40pin chip and a single sided pcb. Would be quite simple to replace the pcb. Of course this does not do everything you are after.
Once you get the PS2 comms running it may be worth a chat to scanlime who did the USB protocol.
I've found that the older, white, PS2, dell labeled "Quiet Key" keyboards have a very nice DIP chip controller in them. I've saved a few as they've got to come in handy for *something*. (Or at least the freebie table at UPE)
Most keyboards I've looked at have a stupid solder blob inside. junk..
OBC
Minor progress...
Time has become a comical entity in my life again.
And yes, I said comical...
KK
How are you going with this? Can I help somehow?
I have an urgent requirement (1 week to make it work, else spend $$$) that could be very neatly solved with this. My application is generating keystrokes from a touchscreen.
Previously I have used a commercial arcade game converter that converted (RS232 or hardwired buttons) into PS2 output stream. It worked fine and if I have to I could source more of these, but a Prop based solution would be very elegant as I already have a prop available doing other tasks.
So, I'm going to go ahead and get everything connected and also fire up that arcade converter in case it yields any helpful info regarding timing etc.
It would be great to get even a "version 1" of this into the Obex as there is nothing at all at present.