Solving the USB Only Chicken or Egg Problem

Posted on Feb 5, 2014

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.

Solving the USB Only Chicken or Egg Problem
Click here to download the full size of the above Circuit.

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. USB defines a device reset state, where a hub shorts both data lines to ground for 10 milliseconds. USB hubs also implement a disable feature, where no data is routed to the disabled port, and both data lines are kept at high impedance. Devices contain a pullup resistor, which is used by the hub to detect device arrival, at a disabled port. Normally these features are managed automatically by your operating system. But by taking control of a hub and keeping its ports disabled, each port can be used as a single bit input, and/or a momentary active-low "open collector" pulsable output. Two pulsable outputs can drive a set-reset latch to create a single steady-state output. These I/O capabilities are sufficient for AVR ISP programming! 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...

Leave Comment

characters left:

Related Circuits

  • New Circuits



    Popular Circuits

    Remote Control using DTMF
    Arduino Retro Computer with SD card and LCD
    2800w high power audio amplifier
    Enhanced TCA440 detector
    1.5v to 9v battery tester
    shootable simon game
    PIC18F2550 Pinguino
    optoisolated adapter
    Variable PIN Attenuator
    Variable DC Power Supply Circuit
    5-channel low-power programmable sensor signal processor with AD7714 circuit
    Tape monitor the direction of movement