Go Down

Topic: Confused over ISP Programmer (Read 2147 times) previous topic - next topic


Feb 08, 2012, 04:59 pm Last Edit: Feb 08, 2012, 05:09 pm by GregM Reason: 1
I've got a sketch I developed on a Uno which I then uploaded to a atmega328 on my breadboard which is running with a 8mhz xtal - all working fine. Now I've build my project on pcb and find out I now need to reflash the atmega with some new code. Instead of taking the chip out each time to reprogram I would like to use the isp.

This is where I'm not sure of how it works. I want to use my Uno to program the atmega328 on my pcb via isp. I can so this right?

I've connect sck, reset, miso, mosi from the atmega to my Uno (From this http://arduino.cc/en/uploads/Tutorial/BreadboardAVR.png)

I then tried to program the chip by setting programmer/arduino as isp and programming.

Am I supposed to be following these instructions?

To use your Arduino board to burn a bootloader onto an AVR, you need to follow a few simple steps.
Upload the ArduinoISP firmware (in Examples) to your Arduino board.
Wire your Arduino board to the target as shown in the diagram below.
Select the item in the Tools > Board menu that corresponds to the board on which you want to burn the bootloader (not the board that you're using as the programmer). See the board descriptions on the environment page for details.
Use the Burn Bootloader > Arduino as ISP command.

What am I missing? It says  "to burn the bootloader" - I'm not burning the bootloader though?


Send Bitcoin tips to: 1G2qoGwMRXx8az71DVP1E81jShxtbSh5Hp


avrdude: stk500_getsync(): not in sync: resp=0x00


On your Arduino that you are using as the ISP do you have a 120Ohm resistor between +5 and reset?
There is another option using a capacitor to ground, but I am using my Arduino board as an ISP with the resistor.

Problem is this, you have to disable the Reset on the Arduino board, otherwise it resets and doesn't run the ArduinoISP at the proper time and AVRDude doesnt get the responces from the chip you are trying to program.


Thanks - no, don't have that resistor in place. I'll add it in and report back.


you might have to change or add an entry to boards.txt to use avrisp or arduinoisp, or you can get the hex file and just use avrdude


Should you be able to use arduino to program it? I've added the resistor and get the same error.

When I program the code should I be using the upload button, or the program bootloader button.

Also should the atmega328 be in the the Uno when I program it. I've tried it with it in and when I program using the upload but I think its flashing the atmega on the Uno rather than on my PCB.


I havent tried with an UNO but you will upload a sketch to the arduino (which is included) that makes it into an avrisp programmer, you hook that up to your target and program though the arduino to your second board/chip


Anyone successfully used the Uno to do isp? Just can't seem to get it working.


Yes, you can use the Uno as ISP. You need to disable the auto reset using either the resistor or the capacitor (both work). However, the ArduinoISP sketch as shipped with Arduino 1.0 doesn't work under Arduino 1.0 (it did under Arduino-0022). I now use TinyISP (kindly supplied by CodingBadly) instead. I've heard that the latest version of ArduinoISP hosted on github also works, but I can't confirm that.
Formal verification of safety-critical software, software development, and electronic design and prototyping. See http://www.eschertech.com. Please do not ask for unpaid help via PM, use the forum.


Ahh thanks. After reading your statement I think I'm confusing myself. You program the Uno with ArduinoISP/TinyISP and then I presume to use that to program your code to the atmega328 on my PCB. So I have to have the ISP code running on the Uno.

What I"m looking for is the following. I want to do development work on my Uno and test my code each time by uploading it to the atmega on my PCB.  With the above I would need to keep on re-loading the ISP sketch and then program my code?

Coding Badly

With the above I would need to keep on re-loading the ISP sketch...?

No.  Once you have the ISP code installed on your Uno and auto-reset properly disabled your Uno will act as a programmer indefinitely.  There is no need to re-load the ISP sketch.

When you are ready to do something else with your Uno, simply remove the resistor / capacitor (re-enable auto-reset).


Cool - thanks.

Where can I get a copy of your TinyISP referenced above? I'm using Arduino 1.0

Coding Badly


This is driving me absolutely mental!

I've uploaded Coding Badly's TinyISP to my Uno. Then on the Uno I've put a 120R between the 5V and Reset pins and a 10uF from Reset to GND. Then I've wired it up to my atmega328 using this:


On my Arduino 1.0 I've set the programmer to Arduino as ISP and set to the board to Arduino Deimilanove /w atmega328 (Also tried Arduino Uno) and  clicked on "upload using programmer" (I only just discovered that!)

I now get this error:

Binary sketch size: 1026 bytes (of a 32256 byte maximum)
avrdude: stk500_program_enable(): protocol error, expect=0x14, resp=0x50
avrdude: initialization failed, rc=-1
         Double check connections and try again, or use -F to override
         this check.

avrdude: stk500_disable(): protocol error, expect=0x14, resp=0x51


Go Up