Shop OBEX P1 Docs P2 Docs Learn Events
Basic stamp between keyboard and PC? — Parallax Forums

Basic stamp between keyboard and PC?

ArchiverArchiver Posts: 46,084
edited 2004-04-01 17:02 in General Discussion
I remember reading in one of the various publications about using a Basic
Stamp with a PS2 keybaord. I can't find a reference to this in the
archives of the site, nor did a quick scan of the "Nuts & Volts of BASIC
Stamps Volume #1" or #2 turn up anything... (course, maybe I didn't look
closely enough! [noparse]:)[/noparse]

Can anyone point me in the right direction for PS2 keyboard to BSII or
BSII to PS2 keyboard port on a PC?

I have a project in mind that could use a device to arbitrate the data
between a PS2 keybaord and a PC....

Vern

PS: Yes, I did see Al's neato little device (PAK-VIa Keyboard
Coprocessor) but I wanted to see if it could be done with just a BSII or
BS2SX...

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

Comments

  • ArchiverArchiver Posts: 46,084
    edited 2004-03-31 16:27
    Since no one else is answering. I have been known to tell people how to
    skirt around needing a PAK for math and other functions. But in this case, I
    don't think a Stamp is fast enough all by itself. The problem is that the
    keyboard or mouse generates a clock and it is pretty fast. You have no way
    to slow it down. I seem to remember someone had schematics for how to read
    the keyboard with an external shift register and a few other components. But
    that adds more components, doesn't buffer, and doesn't translate to ASCII.
    So you have to service the thing constantly and still convert the keys to
    ASCII (you realize the keyboard has no idea of, say, a capital A; a, A, and
    Control+A are all the same key -- you have to track the shift states to
    decide what was really pressed). The PAK-VIa does all of this for you. Plus
    it manages the keyboard LEDs. You can buffer keystrokes, get ASCII
    conversion, and all of that in one package.

    Now, making a BS2 emulate a keyboard -- that's probably more doable although
    I have to admit I haven't done it. The reason is that the PC should adjust
    to your relatively slow clock rate. Even keyboards don't have a fixed rate,
    so the fact that you are very slow shouldn't matter.

    I won't swear it can't be done without hardware. But my opinion (as someone
    who has done it) is that it probably isn't possible to do on a Stamp without
    some kind of external hardware. I am certain it would not be possible if you
    want to do any other processing at the same time.

    Regards,

    Al Williams
    AWC
    *New kits
    http://www.awce.com/kits.htm






    Original Message
    From: Vernon Graner [noparse]/noparse]mailto:[url=http://forums.parallaxinc.com/group/basicstamps/post?postID=XKrspAs8eQ1Sc5gpjNbaF6gvRfcoDZEa4rRvcNY3cv_LmQgBkRxlg4yn_ff-VY7RA8Z571c]vern@t...[/url
    Sent: Wednesday, March 31, 2004 12:09 AM
    To: basicstamps@yahoogroups.com
    Subject: [noparse][[/noparse]basicstamps] Basic stamp between keyboard and PC?


    I remember reading in one of the various publications about using a Basic
    Stamp with a PS2 keybaord. I can't find a reference to this in the archives
    of the site, nor did a quick scan of the "Nuts & Volts of BASIC Stamps
    Volume #1" or #2 turn up anything... (course, maybe I didn't look closely
    enough! [noparse]:)[/noparse]

    Can anyone point me in the right direction for PS2 keyboard to BSII or BSII
    to PS2 keyboard port on a PC?

    I have a project in mind that could use a device to arbitrate the data
    between a PS2 keybaord and a PC....

    Vern

    PS: Yes, I did see Al's neato little device (PAK-VIa Keyboard
    Coprocessor) but I wanted to see if it could be done with just a BSII or
    BS2SX...

    --
    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?" CVLG







    To UNSUBSCRIBE, just send mail to:
    basicstamps-unsubscribe@yahoogroups.com
    from the same email address that you subscribed. Text in the Subject and
    Body of the message will be ignored.

    Yahoo! Groups Links
  • ArchiverArchiver Posts: 46,084
    edited 2004-04-01 17:02
    I was doing some work on an A/B switch between a UNIX and a PC keyboard
    around December (2003) that I had do drop because of other priorities,
    but you are welcome to look at what I have to date. The code is assembly
    but could probably be ported to the SX or some of the Newer BSII's.

    The program below was the first "DEBUG" program I wrote to 'see' what the
    PS/2 keyboard was doing in the PC world after studying the signal on
    a scope first. It will convert a standard PS/2 style keyboard into RS232
    at 19200 baud (<- this is necessary to transmit RS232 in between the PS/2
    keyboard data bursts). ...worked right off the bat, and hasn't changed
    since.
    http://www.angelfire.com/wizard/y2kbc/STAMPS/Keyboard/Kb_232.asm

    The program below is work in progress (version 6)... has some problems
    mostly related to timing of how the UNIX keyboard sends data, but no big
    issues. The Key mapping between UNIX and PC is mostly complete, but
    there are some holes here and there.
    http://www.angelfire.com/wizard/y2kbc/STAMPS/Keyboard/232kb_6.asm

    Hope this helps...


    >I remember reading in one of the various publications about using a Basic
    >Stamp with a PS2 keybaord. I can't find a reference to this in the
    >archives of the site, nor did a quick scan of the "Nuts & Volts of BASIC
    >Stamps Volume #1" or #2 turn up anything... (course, maybe I didn't look
    >closely enough! [noparse]:)[/noparse]
    >
    >Can anyone point me in the right direction for PS2 keyboard to BSII or
    >BSII to PS2 keyboard port on a PC?
    >
    >I have a project in mind that could use a device to arbitrate the data
    >between a PS2 keybaord and a PC....
    >
    >Vern
    >
    >PS: Yes, I did see Al's neato little device (PAK-VIa Keyboard
    >Coprocessor) but I wanted to see if it could be done with just a BSII or
    >BS2SX...
    >
    >--
    >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
    >

    Beau Schwabe Mask Designer National Semiconductor Corporation
    500 Pinnacle Court, Suite 525
    Home: polygon_man@h... Mail Stop GA1
    Work: bschwabe@a... Norcross, GA 30071
Sign In or Register to comment.