Shop OBEX P1 Docs P2 Docs Learn Events
USB keyboard — Parallax Forums

USB keyboard

Graham StablerGraham Stabler Posts: 2,510
edited 2006-08-27 08:24 in Propeller 1
Lets just say for instance that someone had a really nice micro attache case and the mini keyboard provided by Parallax didn't fit in it. So this person bought a micro keyboard that was even smaller and even though it was USB was sure an adapter could be used. Lets just say for instance that this person was so sure they built an MDF frame to hold the demoboard, micro keyboard and tiny TV screen. They were so sure in fact that they cut the USB cable off the end of the keyboard, shortened the lead and added a PS/2 plug following the pinout of a USB-PS/2 adapter.

Then lets say the same person after hours of work and after even painting his creation actually bothered to try the keyboard and found it didn't work and on investigation discovered that it is probably a USB only keyboard without legacy support.

Suppose that person was me.

Well.....

It was.

So before I jump in the canal, is there any chance of me creating a USB version of the keyboard driver or is that just talking silly?

Graham

Comments

  • Mike GreenMike Green Posts: 23,101
    edited 2006-08-23 00:04
    USB is really a lot more complicated than PS/2. The USBwiz is supposed to be able to support HID USB devices which includes mice and keyboards. You'd have to look at the documentation on it at <http://www.ghielectronics.com/details.php?id=5&sid=6>. It's not expensive and you can also use it to access USB pen drives and SD cards. It can talk serial as well as I2C and SPI.
  • Phil Pilgrim (PhiPi)Phil Pilgrim (PhiPi) Posts: 23,514
    edited 2006-08-23 00:09
    Graham,

    I don't have an answer for you, but plenty of empathy. I can't count the number of times I've "painted the trim before pouring the foundation". It's refreshing to know I'm not alone! smile.gif

    -Phil
  • NewzedNewzed Posts: 2,503
    edited 2006-08-23 00:14
    Phil, it is also very refreshing to know that even the "super gurus" err from time to time.· Makes me feel a bit more "a member of the group".

    Sid
  • Brian RileyBrian Riley Posts: 626
    edited 2006-08-23 00:40
    Hmmmmmmmm, now I have not tried it with keyboards, but in the early days of USB as it was getting off teh ground and USB mouses came out, most of them came with an adapter that had a USB type A female and a PS2 male plug. I have at least 6 of these adapters sitting in a drawer in my shop. One could try that I suppose ... of course that means getting out your tools and soldering that cable back togther <grin> rotsa-ruck! I would be happy to send you one of these adapters if you wish.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    cheers ... brian riley, n1bq, underhill center, vermont
    See the K107 Serial LCD Controller at
    www.wulfden.org/k107/
  • Graham StablerGraham Stabler Posts: 2,510
    edited 2006-08-23 09:27
    Brian, you need to read more carefully. I thought I could use one of those adapters so I hard wired it exactly the same as if it had one. It doesn't work and it looks like the keyboard is definately for USB only with no legacy support.

    Mike, I'm not spending any more money on this even if it is cheap.

    There MAY be light at the end of the tunnel, I was perusing the usb.org site and it seems that most USB keyboards should support a boot mode which allows the lowly bios to talk to the usb keyboard. It seems you just need to tell the keyboard to enter boot mode. Then you get 7-byte-packets containing the key strokes. I haven't read anything about how to send the command or receive the data but I'm thinking this might be the best bet. Do away with any worries about the special features and just key keystrokes.

    Graham
  • hellosethhelloseth Posts: 43
    edited 2006-08-23 15:18
    Graham Stabler said...
    Brian, you need to read more carefully. I thought I could use one of those adapters so I hard wired it exactly the same as if it had one.
    Graham

    Are you SURE that there is no additional converters in the adapter that comes with the USB keyboards? I always assumed that there was more to it than changing the pin-outs.

    Seth
  • Mike GreenMike Green Posts: 23,101
    edited 2006-08-23 15:25
    When USB was new, many manufacturers made their keyboards with firmware that could talk either PS/2 or USB (since both are serial protocols). They only needed the adapter for the connector. Now that USB is the norm, most keyboards come with that only. I hadn't heard about the boot mode though. That may save the day.
  • LoopyBytelooseLoopyByteloose Posts: 12,537
    edited 2006-08-23 15:52
    I have suspected that the PS/2 to USB adapters for mice and keyboards actually exploit the fact the not all of the PS/2 pins are used in their serial mode. I just haven't really had the need to confirm this.

    In other words, the unused pins in the PS/2 provide a second pathway and set of connections to the USB. That is where the adapter comes in. To day I have only seen PS/2 going to USB and never seen USB going to PS/2.

    If that is the case, purely USB would not be backwardly compatible.

    Is USB allow synchronous serial, like the PS/2 OR is it asynchronous?

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    "If you want more fiber, eat the package.· Not enough?· Eat the manual."········
    ···················· Tropical regards,····· G. Herzog [noparse][[/noparse]·黃鶴 ]·in Taiwan
  • Beau SchwabeBeau Schwabe Posts: 6,568
    edited 2006-08-23 16:29
    Kramer,

    I have only seen USB-->PS2 adapter for mice(green dongle), but not for keyboards

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Beau Schwabe

    IC Layout Engineer
    Parallax, Inc.
  • Paul Sr.Paul Sr. Posts: 435
    edited 2006-08-23 16:54
    Beau Schwabe (Parallax) said...
    Kramer,

    I have only seen USB-->PS2 adapter for mice(green dongle), but not for keyboards

    I have a couple of them that I purchased because the most recent Microsoft Keyboard I purchased didn't come with one - and I quickly found out why! The keyboard is a USB ONLY keyboard. Will not work with the adapter on any system I tried it on.

    Thanks Micro$oft.......
  • Graham StablerGraham Stabler Posts: 2,510
    edited 2006-08-23 18:05
    Seth, yes I am sure.

    Mike is right but there are still keyboards that come with an adapter.

    reading the usb specs, I think it might be doable with a bit of help.

    Graham
  • Graham StablerGraham Stabler Posts: 2,510
    edited 2006-08-23 22:50
    Well despite the fact the keyboard isn't functioning it still looks pretty so here are a few shots, sorry for the terrible photography.

    Graham
    800 x 600 - 83K
    800 x 600 - 74K
  • LoopyBytelooseLoopyByteloose Posts: 12,537
    edited 2006-08-25 17:37
    Beau, I think you are right. I have only seen mouse adapters.

    I am using two smaller keyboards. One is a Wintek and the other is a Krone. Both are PS/2 interface.
    Of course, I bought these locally in Taiwan and while there are not that small [noparse][[/noparse]1 foot [noparse][[/noparse]300mm] x 5 3/4 inches [noparse][[/noparse]140mm], they cost about $10US.

    I still prefer PS/2, RS-232, and Parallel interface as the USB is a huge road-block to quickly deploying most of my digital projects.
    I had a girl friend that worked at an advertising agency and she dumped me for being too honest and too generic.

    In fact, I am wondering about using a PS/2 Bar Code Reader with the Propeller.
    Has anyone been involved in such?

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    "If you want more fiber, eat the package.· Not enough?· Eat the manual."········
    ···················· Tropical regards,····· G. Herzog [noparse][[/noparse]·黃鶴 ]·in Taiwan
  • CJCJ Posts: 470
    edited 2006-08-25 19:08
    all the PS/2 bar code readers I'v seen go between the keyboard and the computer, so, I bet they just output a stream of keystrokes

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Who says you have to have knowledge to use it?

    I've killed a fly with my bare mind.
  • Chris SavageChris Savage Parallax Engineering Posts: 14,406
    edited 2006-08-25 21:31
    Graham,

    ·· Are you in the states?· My understanding was that Packard Bell didn't operate in the States anymore.· Not since back in the early 90's.· It's been a long time since I've seen a Packard Bell computer.· Last one I saw was a Pentium 233 MHz.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Chris Savage
    Parallax Tech Support
    csavage@parallax.com
  • Graham StablerGraham Stabler Posts: 2,510
    edited 2006-08-26 21:25
    Kramer, I am using an adapter on one of my other keyboards.

    Chris, I'm in the UK

    Graham

    p.s. I'm aiming at making something that will send/receive commands over USB, that's only half the story but good enough for the boot-mode. Someone could then work on some of the higher level stuff that is the real sticking point of USB, the basic encoding looks "OK".
  • nutsonnutson Posts: 242
    edited 2006-08-27 08:24
    USB adapters for keyboards do exist. I purchased a Trust KB-1400 slimline, and it came with this·violet adapter.· The breadboard·is the 64K EEPROM I use to test Mike Green's OS, connected to the mouse pins.

    Nico
Sign In or Register to comment.