Page 1 of 2

USB Host

Posted: Tue Nov 01, 2011 5:54 pm
by Faniel
I am working on a project, where I am trying to connect USB Webcam to XK-1A Development Kit like a USB Host device and take one picture using the processor. But I dont understand how the usb is working here. Can I made an usb connector via port/pin table in XMOS USB Device (XUD) Library.pdf and it will be working right wirh XS1-L1 128TQFP or I can use the development tool which has already USB connector for connection the camera.
Or if you have some other suggestion I will be glad. Thanks

Re: USB Host

Posted: Tue Nov 01, 2011 9:38 pm
by rp181
I haven't seen a USB host implemented yet on XMOS, although it should be possible. I would be worried about RAM first for the actual image.

Re: USB Host

Posted: Tue Nov 01, 2011 9:54 pm
by Faniel
Yes RAM is one issue too, but i am interested now in the USB solution. I really need advice how is woking the usb in XMOS.

Re: USB Host

Posted: Tue Nov 01, 2011 10:15 pm
by Bianco
https://www.xcore.com/forum/viewtopic.php?f=8&t=1466

This thread might be of your interest.
XMOS has a bitbanged USB Full Speed (12mbit) host implementation that is not released.

Re: USB Host

Posted: Wed Nov 02, 2011 9:09 am
by Berni
Yeah there is no dev board that has USB host on it, alto those ULPI PHYs work for both device and host.

Well xmos did play around with USB host on that ipod dock but none of it is released and im guessing it would be very difficult to make that code talk to a webcam.

If your project requires a camera go look at places like sparkfun they can sell you a raw camera module that spits out the image on a parallel bus and that can be fed in to a xmos chip no problems.

Re: USB Host

Posted: Wed Nov 02, 2011 10:57 am
by phalt
Berni has given the best advice here.

Faniel: I've flagged this post so an XMOS employee should get in contact and tell you how best to achieve your goal.

When it's finished be sure to put it up on XCore as a showcase project, it sounds really good! Definitely Project of the Month potential.

Re: USB Host

Posted: Wed Nov 02, 2011 9:24 pm
by Faniel
Thanks for responses

First I really need to know if it is possible to connect the webcam, I found some documentation of pins for ULPI transceiver and if I understand that according to this table of pins for ULPI phy there can be connect the usb connecor am I right? and than I want to use some opensource linux driver and try to modify for xmos. But first I need to know If Xmos is the right device for that. Mainly the usb. Does anyone see some projects with usb port at XK-1?

Re: USB Host

Posted: Wed Nov 02, 2011 10:42 pm
by Berni
Well most don't attempt it cause its very difficult working with USB. But if you want a quick dev board for USB you can use the XTAG-2 debuger because that has a L1 on it with ULPI so if you solder in a blank L1 chip on there you got a mini usb dev board.

Also you have to be careful when porting something from linux because the xmos chips have very limited memory. Since you need to store the program code in RAM too those 64KB per core quickly disappear while it can be quite difficult to split code to work over multiple cores.

If you know linux well its probably easiest to get a board with some big ARM and run everything under linux on there

Re: USB Host

Posted: Wed Nov 02, 2011 10:47 pm
by nisma
I have implemented low speed interface usb host on xmos as customer request.
To respond to you´r question, no it´s not the right device for the intended purpose.
I have tested this camera with Xmos, http://www.pollin.de/shop/dt/NTA4OTE0OT ... U_85B.html 48 frame/sec at vga resolution.
and external cellular ram (sram). The only two things that works on xmos is sending compressed jpeg
out from the camera using usb, same as webcam,
or buffering the image using a 256Kbit spi sram that allow qvga resolution for
snapshoots and qcif for real word usage, useful for some things, but only if minimal space is required.
And to respond why i have used Xmos, i have used it to test the camera and it´s interface before disigning
the layout and the components because.

Re: USB Host

Posted: Wed Nov 02, 2011 11:44 pm
by Faniel
nisma wrote:I have implemented low speed interface usb host on xmos as customer request.
To respond to you´r question, no it´s not the right device for the intended purpose.
I have tested this camera with Xmos, http://www.pollin.de/shop/dt/NTA4OTE0OT ... U_85B.html 48 frame/sec at vga resolution.
and external cellular ram (sram). The only two things that works on xmos is sending compressed jpeg
out from the camera using usb, same as webcam,
or buffering the image using a 256Kbit spi sram that allow qvga resolution for
snapshoots and qcif for real word usage, useful for some things, but only if minimal space is required.
And to respond why i have used Xmos, i have used it to test the camera and it´s interface before disigning
the layout and the components because.
So if I undestand you, you succseed in usb host implementation, which device you used for that? My target is to connect some cheap webcam and take just one picture, no video, eg just one compressed jpeg. You already tried to connect the webcam over usb as you write that it works sending compressed jpeg or you just heard about it?