Author Options:

USB, AVR, and PICs! Oh my! Answered


I come from a pretty solid CS background, so I'm trying to wrap my head around the concept of EE projects.  I've got the basics of circuit design down, but I'm getting a little bogged down researching how to interface USB<-->ICs.  While I know efforts like Arduino provide a significant amount of pre-built software and hardware that can accomplish most DIY projects, I would really prefer to learn/have control over the whole software stack (and as much of the hardware stack as possible) from App to Userspace Driver to Kernel Driver (I've written a few, but never actually built my own circuitry to talk to).  I'm looking to learn for some resources on how to interface at a low level.  I wouldn't shy away from writing my own PIC/AVR/??? bootloader if it means I have more control over the communication stack.  I'm sure I'd be re-writing a lot of the Arduino/AVR software that's out there, but hey, I see it as a learning opportunity... right? :)

It seems that FTDI makes some USB/UART(Serial) chips that many of the sparkfun-esque USB->Breadboard adapters are based on.  From what I can tell though, most of the chips do literal USB Full/Low speed->115200 bit/s Serial connection.  This seems like an awfully large downsample of the possible communication bandwidth... Is this how things like printers, external hard drives, and webcams work?

So, in short, if I was going to write my own USB stack/drive/kernel module to go along with a custom IC bootloader, how would I go about it? Are there any resources out there describing how one would go about this?

Thanks for your time! 



7 years ago

The FTDI chips stop you having to mess around with all the guts of the full USB spec, and FTDI can provide MEGAbaud rates, not 115kBaud. Unless you're talking stupid volumes, then I'd stick with FTDI, as a completely solid USB solution, for smalm micros, like the AVR, 8051 etc (although some 8051s and AVRs have USB stacks built in.

However, probably THE space to get into is ARM based stuff, like the LPC1768 - and they have fully integrated USB in them ,as well as a host of other interfaces. For a taster, try the MBED.



7 years ago

Look at the available solutions. Most of the items at sparkfun are open source hardware. So you can easily find the schematics and data sheets on everything. So start looking at the various boards and what interfacing modals they can use. You will see a common thread among them so follow that example.