USB Host?

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

Reply to
Nick
Loading thread data ...

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.

Reply to
larwe

Thanks. This is indeed a small app from the MCU's perspective (8-bit is fine).

Reply to
Nick

Take a look at this product :

formatting link

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.

Reply to
Mike Harrison

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

Reply to
Noone

The USBwiz looks pretty much exactly what I'm looking for. Thanks.

Reply to
Nick

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.

Reply to
Noway2

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 :-)
Reply to
John Jardine.

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.
Reply to
Hans-Bernhard Broeker

I like the section in their docs on USB Mythology!

Reply to
dan.ellis

Huh? Maybe I'm just tuned to the wrong frequency, but how does that section qualify as describing mythology?

--
Michael N. Moran           (h) 770 516 7918
5009 Old Field Ct.         (c) 678 521 5460
Kennesaw, GA, USA 30144    http://mnmoran.org

"So often times it happens, that we live our lives in chains
  and we never even know we have the key."
The Eagles, "Already Gone"

The Beatles were wrong: 1 & 1 & 1 is 1
Reply to
Michael N. Moran

I was wondering the same thing. Maybe dan.ellis likes it because it gives a fairly comprehensible explanation of the USB Black Magick. ;-)

Cheers! Rich

Reply to
Rich Grise

ElectronDepot website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.