How to connect USB keyboard to embedded device? - Page 2

Do you have a question? Post it now! No Registration Necessary

Translate This Thread From English to

Threaded View
Re: How to connect USB keyboard to embedded device?


Quoted text here. Click to load it


Well he did a function, not a host, but I still tip my hat to anybody
who can bit-bang a USB device.  Dang!


Re: How to connect USB keyboard to embedded device?

Quoted text here. Click to load it

Dang, you are right. I had another ...cesko... link that I THOUGHT was
a host, but it is now a dead link. I am very aware of the diffence
between a host and a device. Sorry for the noise on the newsgroup.


There is no "x" in my email address.

Re: How to connect USB keyboard to embedded device?

Quoted text here. Click to load it

Yes, but then it wouldn't be USB.




Re: How to connect USB keyboard to embedded device?

Quoted text here. Click to load it

Well, if I understand the OP's need, it doesn't matter so long as it
works with a USB keyboard.  There's no need for supporting multiple
devices, no need for supplying full hub power capabilities, etc.  They
need the physical connector, the electrical physical signaling and
power so far as one keyboard is concerned, and the only that higher
level protocol support that is specifically required by USB keyboards.

AIUI, anyway.  

Jon

Re: How to connect USB keyboard to embedded device?
Quoted text here. Click to load it

Well, color me stoopid, but I fail to see any reason somebody wants
to use a complex USB system, with attendant reliability, protocol,
and maintenance problems at both ends, rather than the simple, well
tested, readily available PS2 interface for a keyboard.

You will have no problem finding PS2 keyboards for 2 to 3 USD at
your local Salvation Army or Goodwill store.  Other countries may
need to look elsewhere, but they should still be more easily found
(and cheaper) than USB keyboards.

--
"If you want to post a followup via groups.google.com, don't use
 the broken "Reply" link at the bottom of the article.  Click on
We've slightly trimmed the long signature. Click to see the full one.
Re: How to connect USB keyboard to embedded device?


Quoted text here. Click to load it

I can't say I've ever noticed any reliability, protocol or maintenance
problems with any USB keyboard I've used.  Is that really a problem
with USB keyboards?  Anyway, my question is not really about the
complexity of USB, but about the complexity of using chips (and
attendent vendor code) designed to do USB.  I'm hoping that the state
of the USB-chip art is such that they can now do their complex thing
(in particular, their USB keyboard thing) with a minimum of our
engineering fuss.  I mean, we can put a man on the moon... :-\

As for PS/2 keyboards, I should look into the possibility.  Technically
they would be an easy solution.  What is the likelyhood, however, that
they will be available new (please, no Goodwill stores!) say, 10 years
from now?
Quoted text here. Click to load it

But we would have a problem including them with our product and
expecting the customers to send us money, much less expecting them to
buy more of our products in the future.


Re: How to connect USB keyboard to embedded device?

Quoted text here. Click to load it

Mike,

I think its hard to look ten years down the road see what's going to be
available, USB or not. I don't think that much of anything that was around
ten years ago is too easy to find today, EXCEPT for the PS/2 keyboards.

Serial keyboards will certainly be around for another three or more years.
If the product does well and you're still in business, and PS/2 keyboards
start going out of style, you will still have an opportunity to buy a ton of
USB to PS/2 converters, which will buy you plenty of time to redesign your
product.

Right now, the PS/2 solution is simple, affordable, reliable and a good
business decision. IMHO, USB was designed by the big boys to try and keep
the small guy from getting a piece of the pie.

[OT] Are you of any relation to Jose?

Mike



Re: How to connect USB keyboard to embedded device?



Quoted text here. Click to load it

Yes, you're right of course, choosing PS/2 keyboards now does not lock
us into them forever.  At the same time, at least for my own knowledge,
I need to pursue the USB angle a little more just to get a better feel
for it.  I got'sta know, as the man said.
 
Quoted text here. Click to load it

Nope, afraid not.


Re: How to connect USB keyboard to embedded device?

[Snipped]

Quoted text here. Click to load it

I have an IBM PS/2 Keyboard that was manufacured in 1980.  So this
specific protocol has been around for 25 years. You might have to
order from a higher level supplier than Joe's Cheapest Computers down
the road.
One can buy the better keyboards from industrial suppliers with all
sorts of interfaces.

[Snipped]

Quoted text here. Click to load it

I think as long as you can supply the neede keyboard as an option,
most people should be able to source a cheap PS/2 keyboard without
to much problems for the next 10 years. If you force your customers to
buy an "expensive" keyboard when they can get a US$2 around the corner
will piss them off. Giving them the option keeps everybody happy.
Just make it very clear in your spec overview that the keyboard is a
stock standard PS/2 keyboard.

Regards
  Anton Erasmus






Re: How to connect USB keyboard to embedded device?

Quoted text here. Click to load it

I'd much rather support a PS/2 or standard AT keyboard connector.
However, as you may have noticed, the old larger-diameter AT keyboard
connector type keyboards are getting harder to find.  Especially new.
A *lot* of USB keyboards, some PS/2 -- and a few of the PS/2 ones will
include one of those adapters in them for the old connector.

Where does one buy an ISA bus system anymore??  And I like them for
building protos of my own.  I don't have the ability to work with PCI,
as reflection wave bus design with 1 and 2 nanosecond clock to data
skews, etc., are out of my hobbyist league.  Plain and simple.

I guess these things are why I didn't question the OP's direction and
instead took it on face value and went with it.

Quoted text here. Click to load it

But for how long?  Do you know where to go to get an ISA floppy disk
controller?  Or an ISA hard disk controller?  Or one of those
multi-I/O controllers for the ISA?  I've got them still in boxes here,
but there is no way I could source one commercially, these days.

When planning products for long term availability, I can understand
someone desiring to look at the current situation and extrapolate a
bit to see what is changing and to plan for it.  At least, within
reasonable bounds.

The question, I suppose, is whether or not planning in a USB keyboard
connector is within reason.  There probably would be no argument from
you or others, were it the case that USB hosting was easy to do.  The
only reason there is an argument here is simply because there are real
risks and so folks quibble over that choice in the context of various
alternatives.  Ultimately, the OP is going to have to decide.  All we
can do is kibitz.

Jon

Re: How to connect USB keyboard to embedded device?
Quoted text here. Click to load it

Jonathan keeps asking the following:

Quoted text here. Click to load it


No. USB was designed to make the client relatively simple at the cost
of making the host's job very tough. The expectation was that PC style
device you serve as the host.

I wonder about that USB to PS2 adapter though.

Quoted text here. Click to load it

Doesn't work like that. There was supposed to be such a simpler spec in
the USB-on-the-go. But both devices have to participate for it to work.

If there were an easy host pare-down, then all of the micro manufacturers
would have done it a long time ago.

BAJ

Re: How to connect USB keyboard to embedded device?
On 15 Jul 2005 20:12:10 -0400, snipped-for-privacy@cc.gatech.edu (Byron A Jeff)

Quoted text here. Click to load it

I am glad for a direct answer (well, not so glad myself, but more
vicariously for the OP.)  But I have a hard time accepting this
assertion without the details.  Why?  It just seems that keyboard
support cannot possibly require every single feature of a general
purpose USB host.  I mean, each and every single one??  Really???

Quoted text here. Click to load it

Hmm.  Okay, so there was some thought to the idea.  Just didn't
happen?

Quoted text here. Click to load it

Well, there's a point.  The only thing that comes to mind to perhaps
dispute this is that micro manufacturers don't know how their USB host
support is going to be used by a customer, so they *need* to supply a
general purpose support in order to reach a broader audience.  And
restricting the design they offer to some tiny, single purpose would
also too narrowly restrict their customer base and make it
unprofitable.

Jon

Re: How to connect USB keyboard to embedded device?
On Sat, 16 Jul 2005 03:16:48 GMT, Jonathan Kirwan

[...]
Quoted text here. Click to load it

Not really.  Download the USB HID (Human Interface Device) spec, and
look up "Boot Protocol."  IIRC, it's a minimal USB interface that
keyboards must support to allow BIOS keyboard interface.

Regards,

                               -=Dave
--
Change is inevitable, progress is not.

Re: How to connect USB keyboard to embedded device?
On Tue, 19 Jul 2005 12:22:48 GMT, snipped-for-privacy@hotmail.com (Dave Hansen)

Quoted text here. Click to load it

I'm not into USB just now, but I might just look that up on your
recommendation, anyway.  But before I do, your last sentence here
suggests you are talking from the perspective of what a keyboard must
support.  Presumably, this is also what the host side must also
support?  But that makes me wonder if the host side must also provide
this (the idea being that although it *may* be a requirement for the
keyboard to support it, it may not be the case that keyboards insist
that the host go through these steps in order to function -- keep in
mind that I don't believe our OP needs to support identification of
device/subdevice for driver loading, etc. -- so while all that might
be necessary in general for Windows, it isn't necessary as I read it
for the OP.)

Can you address yourself to this?  Or should I just go look and see
for myself, anyway?

Thanks for the comments, by the way.

Jon

Re: How to connect USB keyboard to embedded device?

Quoted text here. Click to load it

Mike:

This takes some work, but not much.  First you need a USB Host chip. We
have used the Cypress 811HS and a microcontroller.  The micro controller
typically would have a UART. Since this is the only device that you would
be bringing on line, you need only monitor the enumeration with an USB
analyzer and emulate the same data exchanges with your uC/811HS.  We have
done this for USB printers.  We have a little board that takes serial data
and packages it into USB packets and delivers it to the printer. We service
a 4 endpoints.

From a development viewpoint, there are some idiosyncracies with the 811HS,
but it yields without too much hair pulling.    Doing this development
without an USB analyzer however would make it a lot tougher.

Blakely

Blakely LaCroix
Wrenchman, Inc.
Minneapolis, Minnesota, USA

"Design is Art in practice"


Re: How to connect USB keyboard to embedded device?


Quoted text here. Click to load it

Thanks a bunch for your comments.  I've got the 811HS data open in
another window right now, and I just saw another thread where somebody
had it more-or-less working with a PIC.

I will also definitely take your USB analyser copy-what-works advice to
heart.


Re: How to connect USB keyboard to embedded device?

Quoted text here. Click to load it

It won't be quite that simple. All you need to do is read the USB HID
spec. Unless you want to allow only ONE mfg/productid keyboard to be
your (perpetually available) keyboard, you will need to parse the HID
descriptors and figure out which key code goes to which key.

Regards ~Steve

There is no "x" in my email address.

Re: How to connect USB keyboard to embedded device?
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


Re: How to connect USB keyboard to embedded device?

Quoted text here. Click to load it

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.


Re: How to connect USB keyboard to embedded device?
Quoted text here. Click to load it

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 ( snipped-for-privacy@physik.rwth-aachen.de)
Even if all the snow were burnt, ashes would remain.

Site Timeline