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

    Optical-pick-up-tachometer
    Design and making of the stabilized voltage supply of switch
    Frequency Meter / Frequency Counter 10Hz-60MHz
    EL Lamp Driver Using HV832MG
    A LOW-BATTERY ALARM FOR 13.6 VOLT LEAD-ACID BATTERIES
    Infra/radio remote control encoder/decoder with PIC
    AC arc welding machine transistor load power path from 2
    A hi-fi amp around 01
    Thermistor basic application circuit b
    Audio AD converter circuit configuration
    Monitor circuit diagram with over 555



    Top