USB AVRs

Atmel makes many USB controller AVRs (AT90USB series and ATmega8u2 types), the former being used as a USB2Serial converter on the uno. I am wondering if it is possible to program either of these devices in C. I was hoping to have a USB-Serial and AVR combined into 1 small chip. I know that the usb-serial code has been programed for the 8u2, but can it be done in C? Also, is it easy-ish to implement a USB to serial converter code?

Thanks a lot!

baum

I was hoping to have a USB-Serial and AVR combined into 1 small chip

Yup. It's called a Teensy. :wink:

http://pjrc.com/teensy/teensyduino.html

But there is no standalone chip (prefereable DIP) that I can get?

As far as I know (which isn't too far) the USB ones are not available in a DIP package. I don't recall seeing one in SOIC clothing either.

Alright... As for the teensy, is there any way in which I could put that uC on my own board, then load USB->Serial code onto it, along with my own code? The reason is that I am trying to make a USB-ICSP programmer for AVRs... I was hoping I could get a chip with USB to Serial, then modify the ArduinoISP code for said uC.

Thanks a lot!
baum

Something like this?

(ironically, they used a PIC processor)

Or this one, actually uses an atmel AVR. I use it to bootload '1284s for my Bobuino
I can tell you which chip specifially when I get home.

http://www.mdfly.com/index.php?main_page=product_info&cPath=5&products_id=415

Those 2 are exactly what I was thinking of. Which one is easier to code/implement/has the fewest ext. components? I am willing to code in BASIC, I know a bit. So... pic or avr? All i need is a usb 2 icsp chip. (though none actually exist...)

baum

For me, AVR is a better choice. I've had very good luck with the Arduino ISP sketch. Including modifying it to better support ATtiny development.

is there any way in which I could put that uC on my own board, then load USB->Serial code onto it, along with my own code?

I believe this will get you the USB->Serial part...

I dloaded that, it includes an AVRISPMKII demo, however it is only the code... it will not be as easy as I had hoped.

MDFly uses ATMega8A with 12MHz crytal.

You play with ATTiny2313 don't you?
adafruit has a design that might interest you


http://www.ladyada.net/make/usbtinyisp/download.html

Note that the USB AVRs require CODE to run something like serial/USB translation on the USB port. that means that if you want to write a sketch that communicates with the pc over usb/serial, you have to write things so that your sketch and some sort of background process capable of doing the usb/serial work can run at the same time, which is not a trivial task.

exactly. I had another idea... while not what I had originally hoped for, I can get a usb to serial ic, in addition to a small ATtiny running a modded arduinoisp.

baum

Looks like that could work... attiny2313 would probably be good. Anyone no of any small usb2serial ICs? I would hope for soic or tssop, etc, so that I can solder it at home. FT232RL would work, but I was hoping for something maybe a bit smaller.

baum

Baum,
I have been looking for the same, there was another thread going on just that.
I just bought some USB to serial cards similar to Sparkfun's FTDI-Basic, I wanted something inexpensive I could add to a board for a USB interface without having to solder an FT232RL onto a board. These boards use the CP2102 IC in what looks like a little 28-pin, have no crystal, have 3 resistors, 3 caps, fuse & a diode according to the markings on it. Do you have a reeeaally fine tip on your soldering iron?

Okay, just plugged one in, got a red power LED on, and Windows went out & found the driver from Silocon Labs and downloaded & installed all by itself! Hot dang!
Okay, now for retrolefty's trick of cutting the reset trace and jumpering in the DTR signal instead ...

I don't have a Really Fine tip, however I could get one from amazon...

Looking at the cp2103 (http://www.sparkfun.com/products/199) there are 4 gpios which I can use... could I bitband these for ICSP? Or is it pretty hard to do so? 4 would be perfect: MOSI, MISO, RST, SCLK

In addition, if I could use the GPIOs, I could experiment with SFE's board instead of having to solder my own...

baum

baum:
I don't have a Really Fine tip, however I could get one from amazon...

Looking at the cp2103 (SparkFun USB to Serial GPIO Breakout - CP2103 - BOB-00199 - SparkFun Electronics) there are 4 gpios which I can use... could I bitband these for ICSP? Or is it pretty hard to do so? 4 would be perfect: MOSI, MISO, RST, SCLK

In addition, if I could use the GPIOs, I could experiment with SFE's board instead of having to solder my own...

baum

I know that someone document how to do ICSP bit banging with a FTDI chip, but haven't yet seen one for the cp2103 chip or even the arduin 8u2 chip yet.

http://www.geocities.jp/arduino_diecimila/bootloader/index_en.html

Lefty

I think I'll stick with the usb2serial + attiny2313.

as mentioned the teensy 2++ sounds to be what your looking for, as a positive it can be programmed in regular c, or it can even be programmed in ardunio.. I'd recommend being careful about the stock boot loader is is proprietary code making a small .5kb bootloader called halfkay Its very good and small, but can be replaced with another.. many people that switch the stock boot loader wish they had not..

Alrighty!

Thanks a lot!