EmbeddedRelated.com
Forums
The 2024 Embedded Online Conference

How to connect USB keyboard to embedded device?

Started by Mike Silva July 15, 2005
Mood wrote:
> I understand how designing a USB host that will support multiple > devices like a PC would is a daunting task indeed. But after designing > a few USB devices, it would seem a USB Host that only supports a > specific device (like a keyboard) wouldn't be incredibly difficult. > > Host would have to: > -Wait for device detection (change of state on the D+ and D- lines) > -Read out descriptor from endpoint > -if (Endpoint != Keyboard) > - Ignore > -else > - start polling the endpoint where the keyboard data comes out. > > The only BIG problem I see is the physical interface electronics, > because no one makes a physical interface only. In addition, no one > makes a simple host uC with the physical interface built in. Any > thoughts or comments on this?
How about the makers of pxa270, at91rm9200 and ep9315? Are they nobody making no USB hosted micro?
> > -J
On 2 Aug 2005 12:31:48 -0700, "Mood" <JimMood@gmail.com> wrote:

>I understand how designing a USB host that will support multiple >devices like a PC would is a daunting task indeed. But after designing >a few USB devices, it would seem a USB Host that only supports a >specific device (like a keyboard) wouldn't be incredibly difficult. > >Host would have to: >-Wait for device detection (change of state on the D+ and D- lines) >-Read out descriptor from endpoint >-if (Endpoint != Keyboard) >- Ignore >-else >- start polling the endpoint where the keyboard data comes out. > >The only BIG problem I see is the physical interface electronics, >because no one makes a physical interface only. In addition, no one >makes a simple host uC with the physical interface built in. Any >thoughts or comments on this? > >-J
Could a small CPLD device do the stuff that needs to be in hardware? - I don't know how complicated it needs to be but the Xilinx 95xxXL CPLDs are very cheap. Remember though that a lot of USB devices like keyboards and mice actually speak both USB and PS/2, and come with a simple pinout adapter (I dont know if the pin mapping from USB to PS2 is standardised for these devices), so you may be able to get away with the much simple PS2 interface, even if the device has a USB plug on it.
Mood <JimMood@gmail.com> wrote:
> I understand how designing a USB host that will support multiple > devices like a PC would is a daunting task indeed. But after designing > a few USB devices, it would seem a USB Host that only supports a > specific device (like a keyboard) wouldn't be incredibly difficult.
The key word being "a" keyboard. What exactly is that supposed to mean? Do you expect to only work with one specific model of keyboard? If so, you wouldn't have gained much over having a dedicated batch of PS/2 or whatever interface keyboard produced for the specific application, so the whole USB stuff would be just a seriously wasteful detour. If you want to support all more-or-less standard USB keyboards, I suspect you'd find that implementing this gets you halfway to the full-complexity USB host implementation already. Which means restricting yourself to keyboards doesn't save enough work to outweigh the limitations --- why implement a half-cooked USB host and then add another interface for mass storage devices, e.g.? -- Hans-Bernhard Broeker (broeker@physik.rwth-aachen.de) Even if all the snow were burnt, ashes would remain.

The 2024 Embedded Online Conference