USB communication without FTDI serial chip?

Hi all,

I would like to use the arduino board to develop a very small, very simple circuit. I want to be able to send simple high/low commands over USB to turn LEDs on and off. They will be status lights for computers in a test environment.

I'm going to make something about the size of a USB flash drive with three LEDs, a microcontroller, and not much else. This is a very basic prototype of it (basically just an led + resistor on the power rails of the USB connector).

The electronics portion of it will be simple, I've already got it worked out. But since I'm going to make a bunch of them, I want to save cost by not including the FTDI part. Is there example code for USB communication without it?

I'd also like to leave the crystal off and use the ATMega168's built-in oscillator. Think this will be a problem?

Thanks!

You could do this with an FTDI chip ONLY (no AVR.) In addition to the serial pins, the FTDI has several "general purpose IO pins" and support to fiddle with them. Alternately, you can look into the AVRUSB software. See:

http://www.arduino.cc/cgi-bin/yabb2/YaBB.pl?num=1204833437
http://www.arduino.cc/cgi-bin/yabb2/YaBB.pl?num=1202757173

Very interesting about the FTDI chips having GPIO. Looks like the cheapest they can be had is around $4 each, so maybe I should stick to the AVR. The AVR-USB software looks great! I'll try that out. I think it will even work on an ATtiny11, which is well under $1. Excellent.

Thanks!

Using something like the PowerSwitch demo software with AVRUSB would probably give you more than what you want already.

Would you want it to work from the Arduino IDE/libraries?

I can get around to uploading the schematic for the Arduino mini-expansion shield if you like, or look at the PowerSwitch schematic.

I think the lowest supported crystal is 12MHz, but the EasyLogger uses an internal 16.5MHz oscillator somehow.

--Phil.

I think it will even work on an ATtiny11, which is well under $1.

Throw that idea out of the window.

The USB code is too big for 1kb and the ATtiny11 doesnt have any ram. :wink:

I'd look at a ATtiny48.
4kb of flash and its nearly completely compatible with the 168 that the Arduino uses.
Use the TQFP or MLF chip to save space.

ATtiny45 with 8 pins only is a good one too (2$ digikey).

Nicolas