USB – the Universal Serial Bus – is pretty neat. It’s the future, but it’s here now. I’m learning about it so I can make Lua talk to my PICkit2 programmer, but in the process I’ve realized that making little gizmos that can talk USB opens interesting possibilities.

An example is the CREATE USB interface. This is an HID (Human Input Device) that can read digital and analog values in the “real world” and report them back via USB. It has been used as an input to, among other things, the MAX/MSP programming environment. (It could easily be made to work with pd (Pure Data) as well, if it hasn’t been already.)

With an interface like this it’s possible to trigger and control a multimedia environment (for performance or installation pieces, eg) from any kind of analog or digital transducer, and without the hassle speed issues of MIDI.

That’s just one possibility. Another is to build a USB-to-parallel converter so that folks can use, for example, EPROM programmers (aren’t those obsolete yet?) that are driven by the PC parallel port, on modern machines that lack “legacy” serial and parallel ports. USB-to-serial converters exist already; probably USB-to-parallel converters do as well.

In the interest of making USB development accessible and affordable, I’ve documented several interesting microcontrollers and USB dev boards.

First, the chips. I’ve found two 8-bit and two 32-bit microcontrollers that seem interesting:

For my money, the PIC and the LPC214x are the best bets. Both have 32 endpoints and decent Flash endurance – the PIC is good to 100k cycles and 40 years; the LPC, 100k cycles and 20 years. The LPC2141 – the smallest one, with 32k Flash and 8k RAM, costs about $5 – competitive with the PIC, but with ten times the performance, and a much nicer architecture.

The Atmel chips are endpoint-challenged (6 on AVR, 4 on SAM7S). The AVR is reasonably fast, has lots of memory, 100k cycles Flash endurance; if its (relative) lack of endpoints isn’t a problem, it could be a good choice. The SAM7S, in addition to a dearth of endpoints, has awful Flash endurance: 10k cycles and only 10 years. If I build something I want it to last more than ten years! It’s unforgivable that they have built-in obsolescence this way.

Next, the boards.

These are all under $50 and any of them would be fun to play with.

I have an Olimex board for the LPC2138 – they make the two Sparkfun ARM products listed above – and it’s really nice. I bought it from Sparkfun and they were great. I opted for US Postal service shipping; it arrived in Portland (from Colorado) in two days. Shipping cost: $2. ;-)