µ[micro]electronics info

A weblog focused on interesting circuits, ideas, schematics and other information about microelectronics and microcontrollers.




Because I have not tested all electronic circuits mentioned on this pages, I cannot attest to their accuracy; therefore, I do not provide a warranty of any kind and cannot be held responsible in any manner.

My e-mail

My website

Direct connecting: AVR to USB, no HW converters

Some techniques to connect AVR-based device to USB without a specialized HW, just only in the SW way.

If you want to connect your embedded device to USB, you've a few different ways to do it. At first, you can use special chips like FTDI. At second, you can choose a microcontroller with built-in USB interface. Or at third, you can use some SW solution. Every way has its own advantages and disadvantages.

Let's introduce the SW methods. SW methods are very simple (they needs minimum of external devices) and cheap. But they are limited on speed (only low-speed, 1.5Mbit/s) and advantages.

The first solution ever was (as far as I know) the IgorPlug USB by Igor Češko. His solution uses the AT90S2313 or AT90S2323, overclocked at 12MHz.

The second one is the USB Tiny by Dick Streefland. He's using the ATtiny2313 with 12MHz xtal.

The third one, IMHO the most complex solution, is the AVR USB by Objective Development. It's open-source solution (GNU GPL), but a commercial license is available too. Some of the other advantages are:

- Fully USB 1.1 compliant low-speed device, except handling of communication errors and electrical specifications.
- Supports multiple endpoints: one control endpoint, two interrupt/bulk-in endpoints and up to 7 interrupt/bulk-out endpoints.
- Transfer sizes up to 254 bytes by default, more as configuration option.
- Comes with freely usable USB identifiers (Vendor-ID and Product-ID pairs).
- Runs on any AVR microcontroller with at least 2 kB of Flash memory, 128 bytes RAM and a clock rate of at least 12 MHz.
- No UART, timer, input capture unit or other special hardware is required (except one edge triggered interrupt).
- Can be clocked with 12 Mhz, 15 MHz, 16 MHz or 20 MHz crystal or from a 16.5 MHz internal RC oscillator.
- High level functionality is written in C.
- Only about 1200 to 1400 bytes code size.

So - if you plan to build some small USB-compatible device, why not try to use one of these solutions?

Powered by Drupal - Design by Artinet