Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

We can do this directly from a parallel port - this just involves connecting the right pins on the parallel port to the right pins on the Mini:

Image Added

The above design is taken from here. The tool we use for programming, AVRDude, calls this design dapa.

...

We can use the control signals from a serial port similarly (reset=rts sck=dtr mosi=txd miso=cts). The serial port outputs +-12V, so we need a few zener diodes to transform this to 0V/5V:

Schematic: Image Added
My version: Image Added Image Added (bigger images attached)

AVRDude calls this design dasa. It also supports dasa2 and dasa3, which are similar, but with slightly different pinouts. dasa2 is reset=!txd sck=rts mosi=dtr miso=cts. dasa3 is reset=!dtr sck=rts mosi=txd miso=cts. I am including the design for dasa, since it is the only one I have used. The claim is that the dasa3 design may have better performance on some serial ports, since DTR was not designed to toggle quickly.

...

  • The simplest one consists of an ATTiny2313 chip and a few passives. Very nice design. I have not used this.
  • A more complex one uses a USB-to-serial converter chip. I have not used this one either. This one has two advantages over the simple one above (which probably do not make up for the added complexity):
    • The hardware design is similar to the Mini, so with this guy's firmware, it may be possible to use one Mini board to program another
    • It implements the full STK500 spec, so it is possible to do things like timer calibations
  • In addition, Atmel makes the AVRATAVRIPSMKII programming cable, available from Digikey. It's fairly inexpensive (~$30), and works well. It uses a 6-pin header (Atmel's standard) instead of the 5 pin header we use (standard on hobbyist boards). The 6th pin takes VCC, which we need to run from the main header. I've used this to program the Mini. I just ran 5 hookup wires from the plug on the MKII to the header on the Mini, and so that I wouldn't forget the configuration, I put hot glue around the wires. The sixth wire goes to the VCC pin on the Mini:
    Image Added

Footnotes

1.

Anchor
usbspeed
usbspeed
USB is moderately high latency (the numbers I've seen for low latency USB devices are order of magnitude is 1-30 ms, depending on device). Assuming AVRDude waits for each operation to finish before the next one, sending one bit requires 3 bit flips (3-90 ms). Sending one byte requires 24 bit flips (24-720ms). This gives ballpark of 1-42 bytes/second. What I saw when using a dasa cable with a USB-to-serial converter (5 bytes/second) was close to the middle of that, so I believe that was my problem. The adapter uses an FTDI USB-to-serial chip, most of which are designed to also be able to bit bang with the RS232 control pins, so I doubt choice of dasa lines was the problem - it ought to be able to flip all of them comparably quickly. The same dasa adapter worked at normal speed when it used an actual motherboard with a serial port.