Shop OBEX P1 Docs P2 Docs Learn Events
BS2 - keyboard encoder — Parallax Forums

BS2 - keyboard encoder

Jayguy5000Jayguy5000 Posts: 139
edited 2006-12-10 01:28 in BASIC Stamp
Is it possible to use a BS2 to do the same job as a keyboard encoder? meaning can I connect a ps2 port to a basic stamp, conntect it to a computer then have the stamp send out a signal that would be the same signal comming from a keyboard encoder to create a letter on the screen?

Comments

  • Bruce BatesBruce Bates Posts: 3,045
    edited 2006-12-08 07:26
    Jayguy5000 -

    No, but there are off-board processors that can do that sort of thing. Ask if you want to know more about them.

    Regards,

    Bruce Bates

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    <!--StartFragment -->
  • Chris SavageChris Savage Parallax Engineering Posts: 14,406
    edited 2006-12-08 15:48
    Jayguy,
    ·
    ·· The BASIC Stamp isn’t fast enough to read the keyboard, but I believe I have seen examples of someone sending keycodes to the computer with it.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Chris Savage
    Parallax Tech Support
  • Jayguy5000Jayguy5000 Posts: 139
    edited 2006-12-09 00:55
    could I connect a real keyboard encoder to the parallax usb oscilliscope and read the signals on the screen?
  • PJAllenPJAllen Banned Posts: 5,065
    edited 2006-12-09 01:35
    It's a data-burst, a pulse train --·so there's nothing regular for the o'scope to sync/trigger on.· If you could rig up the keyboard to activate a key at a regular interval, you could use that as your trigger on Channel 1 and see the "key-code" (result) on Channel 2.

    Maybe somebody has already noted the "codes."· Try researching that a bit.

    ** Post Edit **· I don't think the Clock line is going to make it, as a trigger.· The sync would be the key-strike (ne c'est?).· I assume that you don't have a DSO, so you need to repeatedly hit the key (regularly.)


    Post Edited (PJ Allen) : 12/9/2006 1:52:10 AM GMT
  • Chris SavageChris Savage Parallax Engineering Posts: 14,406
    edited 2006-12-09 01:38
    Hello,
    ·
    · ··Yes, you could see the keyboard signals on the scope.· The keyboard signal is kind of an SPI type signal.· Connect one channel to the Clock line and the other to the Data line.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Chris Savage
    Parallax Tech Support
  • Jayguy5000Jayguy5000 Posts: 139
    edited 2006-12-09 01:43
    Great, and what about a mouse? Can the basic stamp send out the proper signals to a pc to make a mouse curser move? and can the mouse signals be detected and displayed with the osciliscope?
  • Chris SavageChris Savage Parallax Engineering Posts: 14,406
    edited 2006-12-09 01:55
    JayGuy,
    ·
    ·· All of this is assuming the devices are PS/2 (and/or serial, in the case of the mouse).· I would recommend looking up the signals on Google.· There are plenty of sites which tell how keyboards and mice work.· Take care.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Chris Savage
    Parallax Tech Support
  • Harrison.Harrison. Posts: 484
    edited 2006-12-09 03:17
    Here is an example keyboard emulator program for the bs2 I stumbled on a few years ago. (I have no idea how I remembered what to search for to find it on google.)

    www.mbhs.edu/~ojenkins/wearable/fiddler/keybtst.txt

    www.mbhs.edu/~ojenkins/wearable/fiddler/keybtst.bs2

    Harrison
  • bennettdanbennettdan Posts: 614
    edited 2006-12-09 05:11
    Hey check out this add on to interface a USB keyboard, USB mouse to a stamp this might let you understand how the interface sends signals to the stamp from them then you can use that to figure how to send data to the PC from the stamp through USB.

    Can I ask why you would want to send the data to the PC from the Stamp this way?

    Post Edited (bennettdan) : 12/9/2006 5:19:17 AM GMT
  • Jayguy5000Jayguy5000 Posts: 139
    edited 2006-12-10 00:21
    I just get involved in little experiments or projects and like to figure things out for fun.
  • bennettdanbennettdan Posts: 614
    edited 2006-12-10 01:28
    Thats cool let me know if i can help....
Sign In or Register to comment.