USB host controller? - Page 1
Forum section: electronics / projects

author: Unknown
author_rank: Unknown
timestamp: June 13, 2013, 07:50:34 pm
content: 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.

author: millerb
author_rank: Regular Contributor
timestamp: June 13, 2013, 08:06:55 pm
content: 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=UMFT220XBOn 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.

author: Unknown
author_rank: Unknown
timestamp: June 13, 2013, 08:11:54 pm
content: 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.

author: Circuitous
author_rank: Unknown
timestamp: June 13, 2013, 08:13:59 pm
content: Quotethat 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.

author: Unknown
author_rank: Unknown
timestamp: June 13, 2013, 08:20:10 pm
content: 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.

author: marshallh
author_rank: Unknown
timestamp: June 13, 2013, 09:17:17 pm
content: http://www.digikey.com/product-detail/en/PIC32MX210F016B-I%2FML/PIC32MX210F016B-I%2FML-ND/2772062$2 or so. Can't beat it

author: mikeselectricstuff
author_rank: Super Contributor
timestamp: June 13, 2013, 09:34:57 pm
content: Quote from: marshallh on June 13, 2013, 09:17:17 pmThere are also some PIC24's with USB host, some even in DIL!.Microchip also have some libraries & examples, with source code.

author: mazurov
author_rank: Frequent Contributor
timestamp: June 13, 2013, 09:46:18 pm
content: This will give you USB host capability ->https://www.circuitsathome.com/arduino_usb_host_shield_projects.

author: Unknown
author_rank: Unknown
timestamp: June 13, 2013, 09:56:23 pm
content: 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.

author: mikeselectricstuff
author_rank: Super Contributor
timestamp: June 13, 2013, 10:07:16 pm
content: Quote from: duskglow on June 13, 2013, 09:56:23 pmIf 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.

author: notsob
author_rank: Frequent Contributor
timestamp: June 13, 2013, 10:11:26 pm
content: There is also cypress USB host chips - less than your $11 but not much

author: Unknown
author_rank: Unknown
timestamp: June 13, 2013, 10:11:35 pm
content: QuoteOh, is that what you guys were getting at? That's a pretty good idea, then. Sorry I didn't pick up on that.

author: Unknown
author_rank: Unknown
timestamp: June 14, 2013, 02:56:00 am
content: 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.

author: mikeselectricstuff
author_rank: Super Contributor
timestamp: June 14, 2013, 08:37:59 am
content: Quote from: duskglow on June 14, 2013, 02:56:00 amStart with one of their example applications, then strip out the stuff you don't need.

author: Unknown
author_rank: Unknown
timestamp: June 14, 2013, 11:39:50 pm
content: 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 PCII think that's a bit too involved for a little lightboard controller. So, back to the PIC.Anyone need a GL880?