ZX device as a USB host

This forum is for posts that might be considered off-topic but that may be useful or interesting to members. Examples include posts about electronics or programming in general, other microcontrollers or interesting devices, useful websites, etc.
Post Reply
Don_Kirby
Posts: 341
Joined: 15 October 2006, 3:48 AM
Location: Long Island, New York

ZX device as a USB host

Post by Don_Kirby »

A project was recently proposed which requires a microcontroller to function as a USB host to a piece of video equipment. The USB command structure is well documented and poses little difficulty in regards to programming. Are there any devices in the current lineup that offer this functionality?

-DK
dkinzer
Site Admin
Posts: 3120
Joined: 03 September 2005, 13:53 PM
Location: Portland, OR

Re: ZX device as a USB host

Post by dkinzer »

Don_Kirby wrote:Are there any devices in the current lineup that offer this functionality?
There are no ZX devices that offer USB functionality. The only AVR chips that provide USB host capability are the AT90USB647 and AT90USB1287 and then only the reduced-function OTG Host capability. There is no direct support in the ZBasic Library for USB functions. The LUFA USB stack may be useful in this regard.
- Don Kinzer
stevech
Posts: 715
Joined: 22 February 2006, 20:56 PM

Post by stevech »

Not much RAM, but couldn't ZBasic native target the ATMEGA32U4? You'd have to find/integrate a USB driver.
dkinzer
Site Admin
Posts: 3120
Joined: 03 September 2005, 13:53 PM
Location: Portland, OR

Post by dkinzer »

stevech wrote:[C]couldn't ZBasic native target the ATMEGA32U4? You'd have to find/integrate a USB driver.
I believe that all of the mega AVRs with USB are client only except for the two that I mentioned. I make this distinction because the OP seemed to be asking about USB host capabilities.

It may be that the XMEGA USB devices support host mode but it appears that the LUFA stack for XMEGA does not.
- Don Kinzer
Don_Kirby
Posts: 341
Joined: 15 October 2006, 3:48 AM
Location: Long Island, New York

Post by Don_Kirby »

The LUFA stack documentation does makes some mention of host management. My limited knowledge of USB would be the limiting factor in this method of implementation though, even if the stack were capable of functioning as a full USB host. 'Biting off more than you can chew' would the appropriate idiom I would think.
dlh
Posts: 395
Joined: 15 December 2006, 12:12 PM
Location: ~Cincinnati

Post by dlh »

There is a limited open source implementation of a low speed USB Host using a Mega32 at...
https://instruct1.cit.cornell.edu/cours ... index.html

From the above link...
This project has yielded a library that can be included from any program written for the Mega32. By using this library, a user can implement USB functionality with their application with minimal fuss. Several compiler options are included for various levels of debugging and verbosity.
The Mega32 is supported under the Generic License. I've no clue as to how doable this may be with ZBasic.
dlh
Posts: 395
Joined: 15 December 2006, 12:12 PM
Location: ~Cincinnati

Post by dlh »

I spent some time researching this a year or two back but I've had to set most of my projects aside due to health issues. Maybe some of the links I found will be helpful to you or others.

If the Mega32 project I posted about earlier does not meet your needs, the MAX3421E can be either host or peripheral and it does both low and high speed USB.

There was an article on the MAX3421E in Circuit Cellar Issue# 202 (May 2007). You can download a PDF copy of the issue for $6 from...
http://www.cc-webshop.com/Circuit-Cella ... 07-202.htm

Circuits@Home sells an Arduino USB Host shield (asssembled or bare board) using the MAX3421E and there is extensive documentation at...
http://www.circuitsathome.com/mcu/light ... hostpart-1

I also found a PIC based USB Host to Serial TTL module on EBay but I cannot find the link now. If I come up with it, I'll post a link later. It used a PIC24xxx and was not very well documented. There is extensive PIC24 documentation on Microchip's web site.

I found the missing link to the PIC24 based USB Host device...
http://www.sureelectronics.net/goods.php?id=1140
Post Reply