PS/2 Keyboard input
Aaron193
Posts: 27
Okay, I already had one question answered here involving serial data and the telephone. Now I have another (probably silly) question about PS/2 Keyboard input to a BS2. I have already attempted and failed with opening up a keyboard, cutting the wires, and connecting them to the basic stamp (with a generic wiring diagram). What I got was a series of strange ASCII characters when the data was debugged. Is there any way that I can connect a keyboard and program the Basic Stamp to take the "scancodes" as proper ASCII Characters? My point is to try to·keep the costs down·(like not buying Propeller Chips). Thanks.
Comments
Parallax Propeller Proto Board, $19.95· http://www.parallax.com/detail.asp?product_id=32212
Wait a little, save a lot?· You decide.
That's a lot of work for a Stamp that may have to do other things as well. Hence the external adapter.
PJ Allen has a great suggestion in that the software for the Propeller already exists to do the keyboard decoding and transmitting and receiving serial data. All you need is the "glue" Spin program and a Propeller Protoboard. Admittedly, the Multilabs adapter is now cheaper, but the Propeller can also handle a mouse and generate VGA video (or TV video).
Post Edited (Mike Green) : 1/17/2007 1:19:52 AM GMT
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Have Fun
TR
If I used a serial to parallel shift register and a counter circuit, would it work if I were to allow the keyboard to shift in the serial data, then when the 11 bits are in, the counter goes high to let the stamp know to read the parallel bits?
1. keyboard shifts in serial data to register (while counter keeps track of bits coming in)
2. when 11 bits have been shifted in, digital counter goes high (while the stamp is in a loop waiting for the high)
3. stamp reads all the bits from the parallel outputs of the register, then goes back into a loop waiting for the next high
Would that work?
It doesn't need a counter because it uses the inverted start bit for flow control.
I posted it on the completed projects forum:
http://forums.parallax.com/showthread.php?p=629467
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Have Fun
TR