Shop OBEX P1 Docs P2 Docs Learn Events
Keyboard socket to USB socket? — Parallax Forums

Keyboard socket to USB socket?

PhilldapillPhilldapill Posts: 1,283
edited 2008-01-08 22:47 in Propeller 1
I've been thinking about getting the Prop accessory kit. I really want to get it now that I had an idea about how to store virtually limitless amounts of data for very little money. It seems that an SD card socket is fairly expensive and bulky inside a case. If you've ever gotten a new keyboard that was USB, you'll notice that it comes with a PS/2 to USB adapter. You just plug the adapter into your PS/2 socket on your computer, and plug the keyboard into that and presto! PS/2 to USB! Why not use this same adapter and plug it into the keyboard/mouse socket on the accessory kit? It SEEMS like an easy, cheap way to interface all sorts of USB devices... like flash drives.

Can this be done?

Comments

  • Paul BakerPaul Baker Posts: 6,351
    edited 2008-01-08 04:23
    No it can't, it only works because some mice and keyboards are programmed to communicate both usb and ps/2, so it's ps/2 data being communicated through the adapter, not usb.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Paul Baker
    Propeller Applications Engineer

    Parallax, Inc.
  • Mike GreenMike Green Posts: 23,101
    edited 2008-01-08 04:28
    No.

    The PS/2 to USB adapter you're describing is just a plug adapter. The keyboards that come with this are specially designed to interface to either a USB connection or a PS/2 connection. Most newer keyboards don't come with this adapter because the keyboard itself isn't designed for the PS/2 protocol.

    An SD card socket is relatively expensive ($18 on a breakout board from Spark-Fun). There was a posting some months ago about a do-it-yourself SD card socket.
  • PhilldapillPhilldapill Posts: 1,283
    edited 2008-01-08 04:30
    Yeah, I figured as much(well, maybe not the precise technical details). I looked around on wikipedia and saw how they differ. Darn.

    Do you know of any USB solutions that can be interfaced to the prop? I know there is the prop plug, but is that strictly for programming the propeller?
  • PhilldapillPhilldapill Posts: 1,283
    edited 2008-01-08 05:20
    I've been thinking about this more. What is so difficult about interfacing the prop to USB? It's not a voltage difference, is it? If so, can't that easily be overcome in hardware? Is it software?
  • Mike GreenMike Green Posts: 23,101
    edited 2008-01-08 05:31
    The USB protocol is quite complicated. Someone here has been working on a USB "stack". You might try searching for it.

    There are several USB host devices that can be interfaced to a Propeller. Parallax has its Memory Stick Datalogger which can attach mass storage devices, keyboards, mice, and serial adapters via a serial or SPI connection. This uses the same chip as the VDrive2 and VMusic2 from Vinculum (FTDI).

    GHI Electronics also has a USB host interface, their USBwiz. This can interface to both an SD card and a USB device, either a mass storage device, or a keyboard / mouse / serial adapter / printer. It can connect via serial / SPI / I2C.
  • hippyhippy Posts: 1,981
    edited 2008-01-08 19:24
    As Mike says, "it's complicated". There are two different sides to USB, slave devices which plug into a PC and can act as keybaord, mouse, joysticks, modem, serial link, memory storage ( thumb drives ), etc ( that has been the focus of the prior USB work on the Propeller ) and host controllers which can interact with USB slave devices ... that's a much tougher proposition.

    Thus a Propeller can act as a USB keyboard, but it's not so far possible to connect a USB keyboard to a Propeller, a Propeller could act as a Memory Stick but could not use a Memory Stick unless it's via a separate device/interface/product which allows that connection to be made.
  • PhilldapillPhilldapill Posts: 1,283
    edited 2008-01-08 22:36
    Alright. You guys seem to know what your talking about so I guess I'll take your word for it for now. USB has become so common place that I just figured it was really simple. I'm assuming when you say it's complicated, you're talking about the software side of it? I mean come on! It's only 4 wires on the darn thing!(joking)
  • Paul BakerPaul Baker Posts: 6,351
    edited 2008-01-08 22:44
    The reason it has become so ubiquitous is that it is very flexible and has several different ways to communicate on the bus and more than one slave device can be connected to the same bus, also the plug and play device enumeration which takes place adds a layer of complexity, as well as power management. It's this complexity and "ease of use" by the end consumer which makes implementing USB so difficult. As a slave you only need to understand a subset of the USB protocol, but to be a full featured host you must implement all of the USB protocol.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Paul Baker
    Propeller Applications Engineer

    Parallax, Inc.
  • PhilldapillPhilldapill Posts: 1,283
    edited 2008-01-08 22:47
    Wow. That makes a lot of sense with it being easy to use, but hard to develop. Thanks guys for the clarification.
Sign In or Register to comment.