XMOS + Android

New to XMOS and XCore? Get started here.
JohnRobert
Active Member
Posts: 34
Joined: Fri Nov 02, 2012 8:10 am

XMOS + Android

Postby JohnRobert » Mon Apr 22, 2013 12:16 am

G'day,

I'm planning on putting an Android phone on my new robot, and I've been looking into the best ways of doing this (please note I'm quite new to this stuff). I've found the following video:

http://www.youtube.com/watch?v=P_amY1MNpu4

And Repo:

https://github.com/xcore/sc_android_aap

The thing I'm wondering about though is how to put a USB port on my XMOS Dev Board. It's an XC-1A. Would I just hook up the RX/TX to IO's, and power to power, etc? And then try loading on the Android Accessory stuff? Or what?

Any other ideas are welcome, I'm really stuck on what to do.

-John

[EDIT]

Could I modify a USB cable to have two USB B-Mini male heads (both board and phone use b-mini connectors), and just use "provided" programming port on the XC-1A?
User avatar
Ross
XCore Expert
Posts: 768
Joined: Thu Dec 10, 2009 9:20 pm

Postby Ross » Mon Apr 22, 2013 11:29 pm

You will need a USB transceiver.

No you can't just use the programming port, that is just hooked up to an FTDI USB->Serial device.
User avatar
segher
XCore Expert
Posts: 843
Joined: Sun Jul 11, 2010 1:31 am

Postby segher » Tue Apr 23, 2013 2:15 am

You can use that UART, if a slow interface is all you need.
User avatar
Ross
XCore Expert
Posts: 768
Joined: Thu Dec 10, 2009 9:20 pm

Postby Ross » Tue Apr 23, 2013 10:51 am

Ah cool, the android device will enumerate the FTDI in host mode? I guess you need a force host cable.

btw the video shows XMOS in USB host mode.
JohnRobert
Active Member
Posts: 34
Joined: Fri Nov 02, 2012 8:10 am

Postby JohnRobert » Wed Apr 24, 2013 12:49 pm

It shows the XMOS in host mode, but how can I acheive host mode? Is it a software implementation? And what do you mean by a slow interface? Is it because it has to first go through the FTDI chip, that will slow down the connection? And if so, what kind of baud can I expect? 9600? 19200? 57600? 115200?

I hope you don't mind all the questions, I really know nothing about hooking up to the serial port :P

Just an overview, would I:

1) Get 2 USB B-Mini (for example) cables, and hook them up
2) Plug one end into the Android, and the other into the XMOS
3) Code it

Could I use: http://github.xcore.com/sc_android_aap/02_aap.html: for example?

If any of these questions are covered in any of the docs I've mentioned, just say so, I'll go look over them in detail, I haven't yet had time to look at them in full.

Cheers for the help!

-John
User avatar
segher
XCore Expert
Posts: 843
Joined: Sun Jul 11, 2010 1:31 am

Postby segher » Wed Apr 24, 2013 3:41 pm

First of all, I have no idea how to do anything with an Android
phone (or tablet, or whatever).

The XC-1A has an FT2232 chip on it: this is a USB device, not
a host. It gives two serial interfaces; the first is wired up to the
JTAG on the XMOS chip, the other is wired up as UART (only TX
and RX, no flow control etc.) You can do 3Mbaud on it. You
will want to do flow control and error control on top of it, esp.
if you use a high speed.

It's a very convenient interface for e.g. debug printf()s, but I
wouldn't recommmend it for much more than that.

Who is online

Users browsing this forum: No registered users and 4 guests