Many excellent ISP (In System Programming) designs exist for 8 bit AVR microcontrollers. However, most require a pre-programmed microcontroller, or the “Chicken or Egg” problem: you can’t program microcontrollers unless you have one already programmed.
Parallel Port or Serial Port solutions have existed, but many modern computers no longer have these ports. The FTDI USB-to-serail chip can be used as well. Until now it’s been widely thought impossible to solve the Chicken or Egg problem using only USB, without preprogrammed or specialized USB chips.
HUB ISP can write an AVR chip using only a USB hub, one cheap/common logic chip, and a few resistors.
Not For Beginners, or Anyone Who Values Their Time
If you are just getting started with AVR microcontrollers, ISP programming is not a good place to begin, even if you buy a ready made programmer, and certainly not by trying to build your own!
Ready-to-use boards like Teensy (yes, a shameless plug, as I make this one) or Arduino just plug into any USB port and are ready to go, with easy to use software tools. Troubleshooting electronics and software can be taxing even for experienced engineers, so it’s highly recommended to start with a foundation that’s as trouble-free as possible. HUB ISP is, well… not.
HUB ISP is certainly not a viable replacement for regular “chicken or egg” AVR ISP programmers, which are much faster and more reliable, and maybe even cheaper… eg, Teensy running the ArduinoISP code (yup, another shameless plug).
However, if you love to tinker or you’re just curious how this could possibly work with only USB and no programmable chip, without even any parts designed for USB, only logic gates and resistors, then read on!
Or “we don’t need no steenking programmed chips!”
|1||USB Hub + Cable (if not part of the hub)|
|4||Expendable USB Cables|
|1||74HCT00 or 74HC00 chip (HCT=best, HC=ok)|
|2||Resistors, 330 ohm (220 to 470 would work just fine)|
|2||LEDs – for testing|
|1||Crystal + 2 capacitors (only needed for reprogramming chips)|
|1||Pushbutton (or you can momentarily touch reset pin to +5 volts)|
|1||Breadboard + Wires, or some way to connect stuff|
|1||Cardboard and double-stick tape|
|1||PC running Linux, with a USB port of course!|
Step 1: Compile Code with HUB ID Numbers
First, download the source code. GPLv3 License.
Update: charliex has attempted a HUB ISP port to Microsoft Windows. It’s untested so far.
Before compiling, plug in your hub and type “lsusb” to find its vendor and product ID numbers.
For more detail: HUB ISP – Solving the USB-Only “Chicken or Egg” Problem using ATMEGA328P