0

AVR ISP Programmer Shield and UNO?
Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.

AVR ISP Programmer Shield and UNO?

by atmelino on Sat Mar 10, 2012 2:16 pm

Hello,

is it possible to upload the UNO bootloader to a 328P chip with this shield? I have tried, but not succeeded. I just wanted to know if it is even possible before I continue. I have read a lot about optiboot causing problems.

Thanks.

atmelino
 
Posts: 3
Joined: Wed Mar 07, 2012 4:41 pm

Re: AVR ISP Programmer Shield and UNO?

by atmelino on Sat Mar 10, 2012 6:06 pm

Here are some details:

I soldered the shield according to the instructions from the page "Burning bootloader chips using an Arduino"

http://www.ladyada.net/library/arduino/arduinoisp.html

and checked all the connections three times.

Install the ATmega328P chip that came with the kit in the ZIF socket

Install the shield onto an Arduino UNO

Start Arduino IDE (I use 1.0)

Select Tools→Board→Arduino Uno

Upload the sketch from

https://raw.github.com/adafruit/Arduino ... noISP2.pde

(Link to this sketch on the "Burning bootloader chips using an Arduino" under "Load the Code")


Select Tools→Programmer→w/Arduino as ISP

Select Tools→Burn Bootloader

I get the following error message:


avrdude: stk500_getparm(): (a) protocol error, expect=0x14, resp=0x14

avrdude: stk500_getparm(): (a) protocol error, expect=0x14, resp=0x01
avrdude: stk500_initialize(): (a) protocol error, expect=0x14, resp=0x10
avrdude: initialization failed, rc=-1
Double check connections and try again, or use -F to override
this check.

avrdude: stk500_disable(): unknown response=0x1

atmelino
 
Posts: 3
Joined: Wed Mar 07, 2012 4:41 pm

Re: AVR ISP Programmer Shield and UNO?

by skub on Tue Mar 13, 2012 8:42 am

I am also receiving an error using the AVR shield and the UNO.

I have quadruple-checked the connections, but I'm not completely ruling out a rookie mistake being the issue. I'm pretty new to Arduino.

I followed this tutorial: http://www.ladyada.net/library/arduino/arduinoisp.html and I have also tried adding the button, the line from the S1 breakout to analog 1, and the buzzer on analog 3 and the ground rail - this is the 'stand alone' configuration. Nothing. No beeps and the button does nothing. (Zee goggles Zay do nothing!!!)

The red and green leds on the shield do light up briefly during power-up and while uploading the sketch in the tutorial above. (https://raw.github.com/adafruit/ArduinoISP/master/ArduinoISP2.pde)

My environment is Windows 7 64 bit, but I have also tried OS X 10.7 Lion with the same results. So, I'm going to rule out OS environment at this point.

Code: Select all | TOGGLE FULL SIZE
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


Image
Image

I do know that the Arduino Uno *does not* have the ability to burn chips directly - something about wrong/bad opticode.

skub
 
Posts: 37
Joined: Sun Mar 11, 2012 10:55 pm

Re: AVR ISP Programmer Shield and UNO?

by adafruit on Tue Mar 13, 2012 2:41 pm

we had no problems running it on our UNOs but you could also try the standalone example - does that work?

adafruit
 
Posts: 12151
Joined: Thu Apr 06, 2006 4:21 pm
Location: nyc

Re: AVR ISP Programmer Shield and UNO?

by skub on Tue Mar 13, 2012 3:24 pm

I'm going to give it another try tonight; recheck connections, and attempt the stand alone configuration.

Maybe I'm missing something elementary.

Is the correct procedure?:


After this, the chip in the ZIF on the shield should have the Arduino boot loader burned to it.

skub
 
Posts: 37
Joined: Sun Mar 11, 2012 10:55 pm

Re: AVR ISP Programmer Shield and UNO?

by skub on Tue Mar 13, 2012 10:16 pm

This thread would have been more helpful two days ago... haha.
http://forums.adafruit.com/viewtopic.php?f=31&t=26129&start=15

I had the same issue, I was following the old tutorial and didn't pick up on the need to bridge pin 1, but I figured it out by tracing the ZIF pins to their associated breakout pins. So, that was mistake #1 - not ensuring all of the wires were landed to the ZIF socket.

Mistake number #2 was the I was expecting to be able to use Tools > Programmer > Arduino as ISP and expecting the shield to program the chip. I was unaware (and I didn't see it documented) the I had to open the serial monitor and hit the G button to program them.

After I figure out how to get the standalone version working, all I need to figure out is how to put the UNO flavored boot loader on to the chips and everything will be kittens.

skub
 
Posts: 37
Joined: Sun Mar 11, 2012 10:55 pm

Re: AVR ISP Programmer Shield and UNO?

by wbp on Wed Mar 21, 2012 7:20 pm

If you are trying to use the "ArduinoISP2.pde" sketch from Github and you are running Arduino IDE 1.0 (or later?) it will not work. There are several changes in the IDE that cause it to fail, including a smaller serial buffer (64 bytes instead of 128), and changes that cause Serial.print() to work differently.

I have spent a couple of days on this and now have a working sketch. I will post it here for now in case anyone needs it.

There are a couple of differences in this version. For one, I eliminated the "heartbeat" logic that ran the brightness on a 3rd LED up and down to show that it was "active". Instead it will now pulse the red LED very briefly every second or so if it's idle and waiting for commands. I also added support of the Piezo speaker that comes with the kit, wired to pin A3 as shown in one of the tutorials. It will beep and chirp at various times to let you know it's working and make longer bleeps if there are errors.

I hope you find this useful.

William
Attachments
ArduinoISP2.zip
ArduinoISP2.ino for IDE 1.0
(4.83 KiB) Downloaded 236 times

wbp
 
Posts: 246
Joined: Mon Mar 07, 2011 1:18 pm

Re: AVR ISP Programmer Shield and UNO?

by wbp on Wed Mar 28, 2012 8:26 pm

The Arduino ISP sketch on Github has now been updated to work on IDE 1.0.

https://raw.github.com/adafruit/ArduinoISP

William

wbp
 
Posts: 246
Joined: Mon Mar 07, 2011 1:18 pm

Re: AVR ISP Programmer Shield and UNO?

by skub on Sun Apr 01, 2012 5:22 pm

I believe I used this one: https://github.com/sowbug

Is there a standalone version of yours?

skub
 
Posts: 37
Joined: Sun Mar 11, 2012 10:55 pm

Re: AVR ISP Programmer Shield and UNO?

by TopNotchMach07 on Sun Jul 14, 2019 4:21 am

@wbp

Thanks , You had saved my day. I have been going through lot of forums about burning arduino bootloader. None of them helped. Finally I came across this thread and able to burn the bootloader to arduino successfully using your code ArduinoISP2.zip file.

Thanks again for helping out.

Cheers.

TopNotchMach07
 
Posts: 1
Joined: Sun Jul 14, 2019 4:18 am

Please be positive and constructive with your questions and comments.