2
\$\begingroup\$

I've an ATmega328 chip (without a bootloader), and I want to burn it with my Arduino Uno as ISP, so I can have a spare ATmega328 with an Uno bootloader.

I'm trying to follow the instruction in Using an Arduino as an AVR ISP (In-System Programmer), but there is a note that said:

Currently, you cannot use an Arduino Uno as an ISP programmer because the optiboot bootloader does not support this sketch. A revision for this is in progress.

So how do I do it?

\$\endgroup\$
7
\$\begingroup\$

As of now, you can. Actually, apparently the big problem with the Uno is the auto reset - if you put about a 120 ohm resistor from reset to 5 V on the Uno then it'll work.

Load the ISP sketch, disable the auto reset with the resistor, and then follow the normal directions.

(I just burned three chips last week from my Uno - so I know this works.)

\$\endgroup\$
  • \$\begingroup\$ sorry. I commit a mistake. Thank you. But it deserves +1 anyway. \$\endgroup\$ – Daniel Grillo May 20 '11 at 16:45
  • \$\begingroup\$ Dang it, now I want to upgrade my Duemilanove to an Uno. It is such a pain programming the thing if the current sketch is trying to use the serial port. \$\endgroup\$ – captncraig Jul 27 '11 at 18:05
2
\$\begingroup\$

This is working flawlessly for me: https://github.com/WestfW/OptiLoader Main advantages: - Doesn't require any resistors/capacitors. - It programs the chips automatically when it's powered on.

\$\endgroup\$
  • \$\begingroup\$ works flawlessly :) \$\endgroup\$ – Kishore Relangi Jun 26 '16 at 5:06
1
\$\begingroup\$

The resistor pulled high is one solution, but some people have had luck with a 10uF capacitor to GND on the reset line also. The 10uF value isn't critical, I used a 47uF cap and have programmed blank chips with my Uno without any issues.

\$\endgroup\$
1
\$\begingroup\$

The resistor/capacitor trick didnt work for me (Arduino UNO R2) and also no luck with a parallel programmer so I built my own "optiLoader shield" to do the job.

I have documented it here.

Circuit:

enter image description here

Breadboard layout also included if you don't want to solder something.

\$\endgroup\$
  • \$\begingroup\$ Thanks for the writeup. You made my day. Tried all other methods like used pull up resistor and capacitor nothing worked. But optiLoader worked like awesome. May be this is the final destination for those facing difficulties burning the bootloader to new atmega breadboard chips. \$\endgroup\$ – Kishore Relangi Jun 26 '16 at 5:08
0
\$\begingroup\$

I faced the same problem, but I got a solution after searching on the Internet. Please use How to upload a bootloader in an ATmega328.

Connect the Arduino board as shown in the blog post. Follow these steps:

  1. Load the ArduinoISP program from the examples
  2. Choose a serial port.
  3. Select programmer "Arduino as ISP"
  4. Go in menu Tools and select Burn Bootloader.
\$\endgroup\$
-2
\$\begingroup\$

The resistor pulled high between Reset and 5 V, nor a 10 µF capacitor between Reset and GND worked for me. But this did... I put a 10 kΩ resistor between Reset and 5 V, AND, I put a 0.1 µF capacitor between my Uno's pin-10 and the target chip's Reset pin.

Pin 10 is the slave reset pin used by the menu FileExamplesArduinoISP sketch. For an exceptional site covering stuff like this, check out http://www.gammon.com.au (this is where I got the capacitor idea). My configuration is an Arduino Uno rigged to a ATmega328P-PU on a breadboard (with clock, etc.), with the lines/circuit noted in comments near the top of the ArduinoISP sketch (plus the capacitor and resistor).

Arg... I can't seem to delete my comment here and re-editing is not working. Anyway, got faked by the upload, still failing at burnBootloader... I will update if I get this going...

Entry later in the day: I got the ArduinoISP sketch, running on a Uno R3, to burn bootloaders onto a slave ATmega328P chip on a breadboard. It didn't need capacitors or resistors on the Uno's reset pin.

Ultimately, I found burning bootloaders with this method unreliable. It only worked once in a while. I ended up using OptiLoader. The OptiLoader sketch worked every single time! Never an issue. The source code is clean. The dude that wrote it knows what he's doing, no doubt.

BTW: I ignored pin 9 for power and supplied my own. So in the end I'll be using OptiLoader to burn boot loaders. I'll use the ArduinoISP sketch really only for uploading normal sketches. It seems to be fairly reliable for that, but not for burning bootloaders (at least in my experience over the last day).

\$\endgroup\$
  • \$\begingroup\$ There's no real reason for a difference in behavior between writing to the reserved bootloader blocks of a target chip, vs writing a "sketch" to the non-reserved blocks, unless your PC side software is not issuing the correct commands in one case. \$\endgroup\$ – Chris Stratton May 7 '13 at 15:42
  • \$\begingroup\$ Voting to delete this as it's just a litany of confused experiences, not an answer \$\endgroup\$ – Chris Stratton Jun 16 at 12:34