Author Topic: USB host controller?  (Read 6303 times)

0 Members and 1 Guest are viewing this topic.

duskglow

  • Guest
USB host controller?
« on: June 13, 2013, 07:50:34 pm »
I wavered between "beginners" and here, but I'm going to pick here, because it's not really a beginner question.

I am in the process of designing my first PCB board.  It is going to contain an atmel atmega2560 (I just ordered a few so I can prototype).  This board is going to plug directly into my lightboard display board so that I don't have to build an external box.

I want to add a host controller, so that I can plug in a custom VFD display client (USB to serial, to begin with) and a USB keyboard for programming.

I was looking at host controller chips and the Maxim MAX3421E looks attractive, but it's rather costly, at about $11 a pop to begin with.  I found another project out there that let me do the USB emulation in software.  It's much cheaper, but puts more load on the MCU.

My question is:  Do you know of any comparable, but cheaper host controller chips (I looked around and found one, but it's not available anywhere), and what do you think about the approach of doing it in software?  I really am not sure I want to do that because I've already got the interrupt routines doing a hell of a lot just in doing the row-scanning housekeeping and determining what goes where.

Oh, and the board gets an easter egg.  :)
« Last Edit: June 13, 2013, 07:53:33 pm by duskglow »
 

Offline millerb

  • Regular Contributor
  • *
  • Posts: 71
  • Country: us
Re: USB host controller?
« Reply #1 on: June 13, 2013, 08:06:55 pm »
I've been using an FT220X usb interface IC with an attiny88 and I'm really liking it. the FT220X is around 2 dollars and very easy to work with. You can also get a pre made development device for this chip for next to nothing -> http://apple.clickandbuild.com/cnb/shop/ftdichip?op=catalogue-products-null&prodCategoryID=156&title=UMFT220XB

On the PC side of the fence you can use their d2xx library and it takes all of 10 lines of C code to talk to the thing. I've used it with MSVC on Windows, but supposedly FTDI ships drivers and the shared library for Linux and OS X as well.

If you end up using it and need some pointers on talking to it with the AVR, PM me and I'll send you my routines.

 

duskglow

  • Guest
Re: USB host controller?
« Reply #2 on: June 13, 2013, 08:11:54 pm »
Hmm, thanks.  I'll take a look at that.

On a side note, I do find it amazing that I can do with one atmega2560 chip what took a microcontroller, a custom FPGA, and external sram and rom to do just a few years ago.
« Last Edit: June 13, 2013, 08:13:29 pm by duskglow »
 

Offline Circuitous

  • Supporter
  • ****
  • Posts: 237
  • Country: us
    • Corgi-Tronics
Re: USB host controller?
« Reply #3 on: June 13, 2013, 08:13:59 pm »
Quote
I've been using an FT220X usb interface IC
that chip appears to be a slave, OP is looking for a host.

I've had a similar need and found the same $11 chips.  I was going to use a modest PIC18F for my project, but to get USB host capability I'm just upgrading to a PIC32, cheaper and less space than adding another chip.

duskglow

  • Guest
Re: USB host controller?
« Reply #4 on: June 13, 2013, 08:20:10 pm »
I'm not going to commercialize this so if I need to use the $11 chips I will, I'd just rather avoid it if at all possible, I'm going to need more than one for prototyping, etc.
 

Offline marshallh

  • Supporter
  • ****
  • Posts: 1462
  • Country: us
    • retroactive
Verilog tips
BGA soldering intro

11:37 <@ktemkin> c4757p: marshall has transcended communications media
11:37 <@ktemkin> He speaks protocols directly.
 

Offline mikeselectricstuff

  • Super Contributor
  • ***
  • Posts: 13987
  • Country: gb
    • Mike's Electric Stuff
Re: USB host controller?
« Reply #6 on: June 13, 2013, 09:34:57 pm »
http://www.digikey.com/product-detail/en/PIC32MX210F016B-I%2FML/PIC32MX210F016B-I%2FML-ND/2772062

$2 or so. Can't beat it
There are also some PIC24's with USB host, some even in DIL!.
 Microchip also have some libraries & examples, with source code. 
Youtube channel:Taking wierd stuff apart. Very apart.
Mike's Electric Stuff: High voltage, vintage electronics etc.
Day Job: Mostly LEDs
 

Offline mazurov

  • Frequent Contributor
  • **
  • Posts: 524
  • Country: us
Re: USB host controller?
« Reply #7 on: June 13, 2013, 09:46:18 pm »
This will give you USB host capability -> https://www.circuitsathome.com/arduino_usb_host_shield_projects .
With sufficient thrust, pigs fly just fine - RFC1925
 

duskglow

  • Guest
Re: USB host controller?
« Reply #8 on: June 13, 2013, 09:56:23 pm »
I'm not going to use a PIC on this project, full stop, though I do appreciate the input and may use one at some further point in time.  I started prototyping this on an Arduino Mega2560 and will see that through to completion, even if it's a bit more expensive - I've already invested a lot of time in getting the code to work properly on that platform.  The host controller project looks interesting, mazurov, and I might swipe some of the circuitry, but one of the requirements for this project is that everything be on the same board, and it looks like it uses the $11 chip I was trying to avoid.

So, $11 chip it is.  :)

Even though I'm using an Atmel, I'm not doing this as an arduino or shield - this is a completely custom project with custom headers.

And yes, maybe PIC is cheaper, I get it, there's just too much inertia and I don't want to have to redo everything.
 

Offline mikeselectricstuff

  • Super Contributor
  • ***
  • Posts: 13987
  • Country: gb
    • Mike's Electric Stuff
Re: USB host controller?
« Reply #9 on: June 13, 2013, 10:07:16 pm »
I'm not going to use a PIC on this project, full stop, though I do appreciate the input and may use one at some further point in time.  I started prototyping this on an Arduino Mega2560 and will see that through to completion, even if it's a bit more expensive - I've already invested a lot of time in getting the code to work properly on that platform.  The host controller project looks interesting, mazurov, and I might swipe some of the circuitry, but one of the requirements for this project is that everything be on the same board, and it looks like it uses the $11 chip I was trying to avoid.

So, $11 chip it is.  :)

Even though I'm using an Atmel, I'm not doing this as an arduino or shield - this is a completely custom project with custom headers.

And yes, maybe PIC is cheaper, I get it, there's just too much inertia and I don't want to have to redo everything.

If you want your thing to be AVR based, why not just use the PIC as a smart peripheral, offloading all the code to support the USB stuff and presenting a nice easy to use interface (SPI or UART) to the host AVR.

With the Maxim chip you'll have a lot of code running on your main processor, consuming space, RAM and processing power.
Youtube channel:Taking wierd stuff apart. Very apart.
Mike's Electric Stuff: High voltage, vintage electronics etc.
Day Job: Mostly LEDs
 

Offline notsob

  • Frequent Contributor
  • **
  • Posts: 705
  • Country: au
Re: USB host controller?
« Reply #10 on: June 13, 2013, 10:11:26 pm »
There is also cypress USB host chips - less than your $11 but not much
 

duskglow

  • Guest
Re: USB host controller?
« Reply #11 on: June 13, 2013, 10:11:35 pm »
Quote
If you want your thing to be AVR based, why not just use the PIC as a smart peripheral, offloading all the code to support the USB stuff and presenting a nice easy to use interface (SPI or UART) to the host AVR.

With the Maxim chip you'll have a lot of code running on your main processor, consuming space, RAM and processing power.

Oh, is that what you guys were getting at?  That's a pretty good idea, then.  Sorry I didn't pick up on that.
 

duskglow

  • Guest
Re: USB host controller?
« Reply #12 on: June 14, 2013, 02:56:00 am »
I just ordered some PICs (three DIP packages) for prototyping.  Thanks for the suggestion.

Now I have to figure out how to program them.. :)  All my experience is on AVR.
 

Offline mikeselectricstuff

  • Super Contributor
  • ***
  • Posts: 13987
  • Country: gb
    • Mike's Electric Stuff
Re: USB host controller?
« Reply #13 on: June 14, 2013, 08:37:59 am »
I just ordered some PICs (three DIP packages) for prototyping.  Thanks for the suggestion.

Now I have to figure out how to program them.. :)  All my experience is on AVR.
Start with  one of their example applications, then strip out the stuff you don't need.
Youtube channel:Taking wierd stuff apart. Very apart.
Mike's Electric Stuff: High voltage, vintage electronics etc.
Day Job: Mostly LEDs
 

duskglow

  • Guest
Re: USB host controller?
« Reply #14 on: June 14, 2013, 11:39:50 pm »
So I was taking a look over my scrap boards and found one with USB ports, and it had a USB controller on it.  A GL880.  So, thinking "hey, maybe this could work for me", I looked up the specs.

It's a PCI chip.  A really full featured host controller, yes, but PCI :P

I think that's a bit too involved for a little lightboard controller.  So, back to the PIC. :)

Anyone need a GL880?  :D
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf