Make your own dual programmer in AVRDUDE

Arduino As Dual Programmer_bb

Stephen Wylie tweeted, ¬†“Program two ATmegas w/an Arduino & AVRDUDE without re-cabling in between!”

Those of you who have programmed an Arduino through the Arduino or AVR Studio IDE may have noticed the utility that is really doing the work: AVRDUDE (AVR Downloader/UploaDEr). ¬†This is a powerful program that can facilitate programming new sketches on top of a bootloader, load a brand new bootloader or chip image, capture the current firmware programmed on the chip, and set fuse bits (which can render your chip unusable without special tools if you’re not careful).

Via twitter.

Join the Conversation

2 Comments

  1. Gah, my mistake. The top V+ wire on the right chip should be moved to the right one space (pin 20). The absent pins on the +/- lines of breadboards are always the bane of my existence. :-P

    One other thing I just observed is that you need to remove your on-board ATmega chip if you don’t intend to program it. As such, the “SMD edition” Arduinos will fail to properly program any external chip that happens to share the RST line with the SMD chip (including any external chip plugged into the “RST” ICSP header as illustrated here, or the Arduino “RESET” pin). The two chips will be programmed at the same time, and that always causes problems. Usually when this happens, the chips start talking over each other loudly enough to make AVRDUDE fail. In this case, AVRDUDE passes but the program on the external chip will be all screwed up.

    To circumvent this, if you have an SMD-edition Arduino, you’ll need to find (or perhaps write) yet another function in AVRDUDE to control a pin *besides* DTR and RTS. You could pick the TXD pin (which leads to pin 3 / SCK on the ICSP header) or CTS (which goes to ICSP pin 1 / MISO). Of course, there’s no need to take these precautions if you’re looking to program the SMD chip and one external chip; just make sure the external chip’s reset is only hooked up to RTS (ICSP pin 4 / MOSI).

    It’s good to keep that in mind anyway, since with those extra functions to utilize TXD & CTS, you could program up to four ATmegas (or 16 if you wanted to get fancy with combinational logic).

Leave a comment

Your email address will not be published. Required fields are marked *

Notify me of followup comments via e-mail. You can also subscribe without commenting.