10
\$\begingroup\$

Can you use the Arduino as an AVR programmer?

\$\endgroup\$
2
  • 2
    \$\begingroup\$ Did you have a look at this page? Btw, I found it by googling the exact title of your question. \$\endgroup\$
    – PetPaulsen
    Sep 19, 2012 at 10:17
  • \$\begingroup\$ Great. Thanks found it. So I have put the cables in and I am goiong to use Minimal Circuit (Eliminating the External Clock) form the arduino.cc/en/Tutorial/ArduinoToBreadboard \$\endgroup\$
    – Mr Men
    Sep 19, 2012 at 10:55

5 Answers 5

6
\$\begingroup\$

I use the mega-isp solution mentioned above - the Arduino avrisp sketch is here

http://code.google.com/p/mega-isp/downloads/list

I do not use the shield they have - I made up a simple cable using two 6 pin dual-in-line header sockets to fit the programming ISP connector on your Arduino. (I did not have two dil sockets so I used standard single in line and superglued two 3 pin sockets together.

You then need a piece of ribbon cable or some wire.

Arduino 6 pin ISP

Connect each pin on one socket the the corresponding one on the other, with the exception of pin 5 = Reset. Connect one end of the cable to pin 5 - this is the end that will connect to the target AVR that you wish to program. Connect the other end of the pin 5 wire to a floating pin connector.

To use connect the cable to the arduino by placing over the ISP programming connector and connecting the floating lead to digital 10, connect the other end to the target ISP connector. You need to ensure that the pin 1's match up.

Cable overview cable detail

Program with avrdude using

avrdude -P com7 -p t2313 -c avrisp -b 19200 -U flash:w:fred.hex

where
com7 - the com port that the Arduino based programmer is on
t2313 - the type of AVR you wish to program (m328 for ATMega328).
fred.hex - the name of the hex file you wish to progam into the target.

I have used this to program Tiny2313 with no problems.

Note: The cable will carry 5v to power the target - if the target is already powered then do not connect pin 2 of the cable.

\$\endgroup\$
1
  • \$\begingroup\$ FYI: The mega-isp sketch is now included with the Arduino software as of version 0018 and no longer needs to be downloaded separately; it's located under File|Examples, named ArduinoISP. \$\endgroup\$
    – esm
    Mar 3, 2010 at 4:20
5
\$\begingroup\$

This solution works great too: Kimio Kosaka avrdude-serjtag method

If you have assembled you own computers you may have spare case mounted USB cables/connectors that often come with new moherboards. Just wack off the USB end and you can use the motherboard connector as the ISP connector.

A batch file like this can be used: (This is for the 328 chips, will set the fuses for high speed transfer and then upload the bootloader, and setting the lock bits when finished.

avrdude -c diecimila -P ft0 -p m328p -B 4800 -U lock:w:0x3F:m -U efuse:w:0x05:m
-U hfuse:w:0xDA:m -U lfuse:w:0xFF:m

avrdude -c diecimila -P ft0 -p m328p -U flash:w:ATmegaBOOT_168_atmega328.hex -U
efuse:w:0x05:m -U hfuse:w:0xDA:m -U lfuse:w:0xFF:m -U lock:w:0x0F:m
\$\endgroup\$
3
\$\begingroup\$

Yes, you can use the Arduino as a AVR programmer!

Take a look at the mega-isp project.

\$\endgroup\$
3
\$\begingroup\$

If you need hi-voltage programming (you have an otherwise dead chip) you can try this solution http://www.mightyohm.com/blog/2008/09/arduino-based-avr-high-voltage-programmer/

\$\endgroup\$
2
\$\begingroup\$

The answers from 2009 are a bit outdated now that the standard Arduino IDE includes ArduinoISP which was based on Mega-ISP but is now officially supported by Arduino.cc.

enter image description here

\$\endgroup\$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.