PC Keyboard In/Out of the basic stamp?
Vern Graner
Posts: 337
Recently, I came across a need for the ability to intercept/interpret the data from a PC keyboard before it was then passed along to the PC. I was wondering if anyone had done this already and had code that would read a standard PS2 style keyboard and also would allow the stamp to send PS2 keyboard compatible keystrokes to the PC? The hookup I envision would look something like this:
PC Keyboard--->BSII--->PC
Ideally, I would like to have the BSII "Watch" the input for keystrokes and simply pass them through to the keyboard jack on the PC unless the stamp sees a keystroke (or keystroke combo) that triggers a reaction such as:
Vern
PS: before someone points out the obvious that this could be done with a utility program in DOS or Windows, this is not an option as the I/O is being sent to a machine while it is in the BIOS screen, before any OS is operating..
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Post Edited (Vern) : 6/9/2005 9:27:47 PM GMT
PC Keyboard--->BSII--->PC
Ideally, I would like to have the BSII "Watch" the input for keystrokes and simply pass them through to the keyboard jack on the PC unless the stamp sees a keystroke (or keystroke combo) that triggers a reaction such as:
- BSII Sees "A", BSII sends "A"
- BSII Sees "f", BSII sends "f"
- BSII Sees "4", BSII sends "4"
- BSII Sees "CTRL-R", BSII sends "ALT-Q"
- BSII Sees "CTRL-C", BSII sends "CTRL-C"
Vern
PS: before someone points out the obvious that this could be done with a utility program in DOS or Windows, this is not an option as the I/O is being sent to a machine while it is in the BIOS screen, before any OS is operating..
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Vern Graner CNE/CNA/SSE | "If the network is down, then you're Senior Systems Engineer | obviously incompetent so why are we Texas Information Services | paying you? Of course,if the network http://www.txis.com | is up, then we obviously don't need Austin Office 512 328-8947 | you, so why are we paying you?" ©VLG
Post Edited (Vern) : 6/9/2005 9:27:47 PM GMT
Comments
·· There used to be a device available called the KeyVerter that allowed you to connect a PC keyboard to the Stamp and read key presses.· You might be able to find a used one on eBay.· That would allow you to obtain the keystrokes.· As for sending them, I have heard of people doing that directly from the Stamp Module.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Chris Savage
Parallax Tech Support
csavage@parallax.com
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Sid Weaver
Need a bezel for your LCD?
Newzed@aol.com
Post Edited (Newzed) : 6/9/2005 10:47:39 PM GMT
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
I just edited the post.· Thanks, Paul.
Sid
Wow! That handily solves the "keyboard in" part.. now how about the keyboard out? Of course, I'm still curious if the stamp could do this w/o an external piece of hardware...?
Vern
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Here is a direct link to the PAK-6 Co-Processoer, if you want to learn more about it:
http://www.awce.com/pak6.htm
Regards,
Bruce Bates
I think I gave up trying to be sneaky around.. hmm lets just say "over 40"! What I'm looking for is a way to bulk-program BIOS setups w/o having to do a bazillion keystrokes. In this particular application, certain settings need be done by hand, per machine, others are common for all machines. So, if I had one of these an operator could hit a "combo" keystroke and dump a string of keystrokes into the PC using a sort of "macro". Thus, reducing setup time and speeding production. Necessity being a mother and all that..
Frankly, if I wanted a keystroke logger, there are plenty of those around and they would take considerably less brain power for me to implement than this idea!
Vern
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
If the systems are all identical, would you consider using a bios copy/restore utility that boots off of a floppy or cd???
A lot of the newer mobs do support this option.
Good luck!
Bob N9LVU
start:
serin 14, baud, [noparse][[/noparse]STR keyin\20\13
for x = 0 to 19
if keyin(x) = 0 THEN
debug cr
goto start
ENDIF
debug keyin(x)
next
I·can a string of 20 charcters to the debug screen or I can press one key then Enter and the screen will display the key I pressed.
I wrote another routine:
if key(x) = "A" then
serout 16, baud, [noparse][[/noparse]"1234", cr]
When I press A on my little keyboard followed by Enter the debug screen displays 1234.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Sid Weaver
Need a bezel for your LCD?
Newzed@aol.com
·
Though a good idea, and one that was considered, there is some data that is specific to each machine. I need the ability to have the system non-interfere with regular keystrokes, but then "jump into action" when it sees the command it is supposed to replace with a string of digits.
The "input" portion to the stamp seems to be solvable with a couple of hardware solutions (though I'm still curious if it could be done software-only). At this point all I would need would be a routine that would allow the Stamp to send PS2 keyboard formatted text out.
Does anyone know if this is possible through software on the stamp or through hardware (i.e. a serial->ps2 keyboard adapter)?
Thanks for the idea though.. we might be able to use this to pre-set the bios and then maybe have the operators just change the specifics... hmm might merit exploration. Only stumbling block I can see is these are custom single board PCs w/o any floppy or CDROM...
Vern
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Thanks for this little "Proof of concept" of the intercept and replace idea! Very cool! Now I just have to figure out how to get serial data turned into PS2 acceptable signals...
Vern
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Sid
I mean the output of the stamp needs to be plugged into the PS2 keyboard port of a PC and generate signls the PC will accept as if the PC were simply "seeing" a PS2 keyboard. i.e. {PC Keyboard}--->{BSII}--->{PC} The end result being an "insert" between a "regular" x86 PC and a "regular" PS2 style keyboard. Does that help?
Vern
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Sound logical?
Sid