Forums

USB Host?

Started by Nick January 22, 2006
I need to write data to a USB device (a printer) from a MCU. I believe I
need a USB host controller to do this, so USB-enabled PICs etc. won't be
suitable.

This is purely a one-on-one configuration, there will be no other USB
devices or hubs connected, and the make/model of printer will be
predetermined.

What might be the easiest way to achieve this? It's for a commercial
application, though production qty will be low (100s).

Thanks,
Nick


Nick wrote:
> I need to write data to a USB device (a printer) from a MCU. I believe I > > What might be the easiest way to achieve this? It's for a commercial
Depends on the scale of the application. If it already requires a 32-bit MCU then you could go with a PPC or ARM part that has USB host on-chip. If you're trying to do it "writ small", look at USB and USB-On-The-Go controllers from Cypress, Atmel et al.
On Sun, 22 Jan 2006 12:38:30 -0800, larwe wrote:

> > Nick wrote: >> I need to write data to a USB device (a printer) from a MCU. I believe I >> >> What might be the easiest way to achieve this? It's for a commercial > > Depends on the scale of the application. If it already requires a > 32-bit MCU then you could go with a PPC or ARM part that has USB host > on-chip. > > If you're trying to do it "writ small", look at USB and USB-On-The-Go > controllers from Cypress, Atmel et al.
Thanks. This is indeed a small app from the MCU's perspective (8-bit is fine).
On Sun, 22 Jan 2006 20:31:02 +0000 (UTC), Nick <nick@privacy.net> wrote:

>I need to write data to a USB device (a printer) from a MCU. I believe I >need a USB host controller to do this, so USB-enabled PICs etc. won't be >suitable. > >This is purely a one-on-one configuration, there will be no other USB >devices or hubs connected, and the make/model of printer will be >predetermined. > >What might be the easiest way to achieve this? It's for a commercial >application, though production qty will be low (100s). > >Thanks, >Nick
Take a look at this product : http://www.ghielectronics.com/USBhost.htm For low volumes it's probably the only viable solution as there is a lot of software involved in doing USB host. Also look at USB On-The-Go (OTG) stuff, e.g. from Philips.
Nick wrote:

> I need to write data to a USB device (a printer) from a MCU. I believe I > need a USB host controller to do this, so USB-enabled PICs etc. won't be > suitable. > > This is purely a one-on-one configuration, there will be no other USB > devices or hubs connected, and the make/model of printer will be > predetermined. > > What might be the easiest way to achieve this? It's for a commercial > application, though production qty will be low (100s). > > Thanks, > Nick
Nick; This is not so difficult as it might appear. Since you are supporting only one device, it is relatively easy. You will need to get a USB analyzer (borrow, rent, buy) and simply log the data exchange between the device an a PC. You will need to capture the enumeration sequences and the data transfer sequences. Attach a USB host chip (like the Cypress HS811) to your uC and then program the chip to elicit the same data exchanges as observed on the PC. The learning curve will be mostly getting familiar with the USB Host chip structure, configuration and usage. We have done this with a number of devices. Blakely
On Sun, 22 Jan 2006 21:09:50 +0000, Mike Harrison wrote:


> Take a look at this product : > http://www.ghielectronics.com/USBhost.htm > > For low volumes it's probably the only viable solution as there is a lot > of software involved in doing USB host. > > Also look at USB On-The-Go (OTG) stuff, e.g. from Philips.
The USBwiz looks pretty much exactly what I'm looking for. Thanks.
I have used the Philips isp1161A1, OTG controller.  It has a few quirks
but it does work.  I would also suggest that you try to find a
reference schematic implementation as this will show you some of the
finer details of implementing a design that works, ie where to put the
various filter capacitors, etc.  I would also recommend that you find a
specification on PCB layout for the USB host controller.  I believe
that Intel has published one for geared towards high speed USB, which
is backwardly compatible with full speed devices like the 1161.

"Nick" <nick@privacy.net> wrote in message
news:dr0q25$gnj$1@nwrdmz02.dmz.ncs.ea.ibs-infra.bt.com...
> I need to write data to a USB device (a printer) from a MCU. I believe I > need a USB host controller to do this, so USB-enabled PICs etc. won't be > suitable. > > This is purely a one-on-one configuration, there will be no other USB > devices or hubs connected, and the make/model of printer will be > predetermined. > > What might be the easiest way to achieve this? It's for a commercial > application, though production qty will be low (100s). > > Thanks, > Nick > >
Don't know if this is relevant to your particular printer but standard USB printers generally assume that their supplied PC driver software will be doing all the bit image graphic calculations for driving the print head and platten etc. The printer companies will not supply this info (I've tried). [Rant mode ON ... For non PC use, USB is a f****** grade #1, software abortion. And thinking about it for a mS ... even for PC use. There, I feel better now :-)
In comp.arch.embedded John Jardine. <john@jjdesigns.fsnet.co.uk> wrote:

> Don't know if this is relevant to your particular printer but > standard USB printers generally assume that their supplied PC driver > software will be doing all the bit image graphic calculations for > driving the print head and platten etc.
This would be relevant, if it weren't so blatantly wrong. The majority of consumer printers being too dumb to do their own rendering exhibits a random temporal coincidence with them having USB ports, at best. So-called "GDI printers", a.k.a. "Windows printers" have existed longer than USB has been the de-facto only printer port. The sanity of a printer's control protocol has next to nothing to do with its communication technology, with only one major exception: real honest-to-god network printers still tend to have usable programming languages, like PostScript. -- Hans-Bernhard Broeker (broeker@physik.rwth-aachen.de) Even if all the snow were burnt, ashes would remain.
On Mon, 23 Jan 2006 18:26:27 +0000, Hans-Bernhard Broeker wrote:

> In comp.arch.embedded John Jardine. <john@jjdesigns.fsnet.co.uk> wrote: > >> Don't know if this is relevant to your particular printer but standard >> USB printers generally assume that their supplied PC driver software >> will be doing all the bit image graphic calculations for driving the >> print head and platten etc. > > This would be relevant, if it weren't so blatantly wrong. > > The majority of consumer printers being too dumb to do their own > rendering exhibits a random temporal coincidence with them having USB > ports, at best. So-called "GDI printers", a.k.a. "Windows printers" > have existed longer than USB has been the de-facto only printer port. > > The sanity of a printer's control protocol has next to nothing to do > with its communication technology, with only one major exception: real > honest-to-god network printers still tend to have usable programming > languages, like PostScript.
Indeed. GDI-type (actually WMF is probably a better descriptor) printers are usually not networked for one factor only: "Cheap". Anyway, this is not an issue for me, thanks.