Go Down

Topic: Help burning bootloader (Read 5000 times) previous topic - next topic

ZakAttack92

Have an atmel chip on a breadboard. Following the arduino tutorial to load bootloader and getting following error:

Code: [Select]
Arduino: 1.6.11 (Mac OS X), Board: "Arduino/Genuino Uno"

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=0x12
Error while burning bootloader.


How can I resolve this? Thanks!

zhomeslice

Are you using the USBasp for your programmer?
If you are I have found this software to be useful in setting up Atmega328p chips

Download page for eXtreme Burner on the eXtreme Electronics page is found here:
http://extremeelectronics.co.in/avr-tutorials/gui-software-for-usbasp-based-usb-avr-programmers/

you can use it to see if you can communicate with the chip and it can also help you set fuses for your configuration. you can copy and load the flash and eeprom with it also.

Burning a bootloader is only needed if you are using a serial port for programming at a later time. If you plan on loading you program through the "Upload using programmer" though the ICSP port you will only need to make sure your fuses match what you chip wiring configuration is set to.

Please show us your schematic  and let us know which programmer you are using. for us to help you more.
HC

ZakAttack92

#2
Sep 04, 2016, 07:41 am Last Edit: Sep 04, 2016, 07:51 am by ZakAttack92
I am trying to use an arduino uno to program a chip on a breadboard.

I am literally following this tutorial to a tee.

https://www.arduino.cc/en/Tutorial/ArduinoToBreadboard

zhomeslice

#3
Sep 04, 2016, 08:17 am Last Edit: Sep 04, 2016, 08:19 am by zhomeslice
I'm only seeing 5 wires attached to the uno but the example has Six. 4 for the isp connection with reset and 2 for power
you are either missing power or ground cant quite tell  but it looks like ground is missing.


HC

zhomeslice

If that white wire is the ground  wire and you are powering the breadboard with an external source the reset resistor is attached to ground then. this should pull the reset pin high 
If it is pulled to ground you are constantly in reset.

This example should work and I have done this exact same thing many times. 
HC

6v6gt

#5
Sep 04, 2016, 12:03 pm Last Edit: Sep 04, 2016, 12:04 pm by 6v6gt
I've used this tutorial also successfully.
True is the that the quality of the tutorial is appalling (a) with a blurred Fritzing diagram where you can hardly see what is connected to what and with pin numbering obscured (b) a missing schematic and (c) no table of pin numbers leaving the user to try to count on the breadboard image or refer to the data sheet.
Having said all that, it is certainly better than nothing.

ZakAttack92

So with all the wires connected exactly as in the fritzing diagram I am still getting this error message when I try to burn the bootloader:

Code: [Select]
Arduino: 1.6.11 (Mac OS X), Board: "Arduino/Genuino Uno"

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=0x12
Error while burning bootloader.
Invalid library found in /Users/Landon/Documents/Arduino/libraries/Arduino-master: /Users/Landon/Documents/Arduino/libraries/Arduino-master
Invalid library found in /Users/Landon/Documents/Arduino/libraries/Arduino.app: /Users/Landon/Documents/Arduino/libraries/Arduino.app
Invalid library found in /Users/Landon/Documents/Arduino/libraries/ArdunioMAVLink: /Users/Landon/Documents/Arduino/libraries/ArdunioMAVLink
Invalid library found in /Users/Landon/Documents/Arduino/libraries/mavlink-master: /Users/Landon/Documents/Arduino/libraries/mavlink-master

zhomeslice

#7
Sep 04, 2016, 04:29 pm Last Edit: Sep 04, 2016, 04:41 pm by zhomeslice
so our hookup is 100% correct... the problem is either with software or components. bad crystal or other issue

What version of the Arduino software are you using and what site did you get it from arduino.cc or arduino.org?
Do you have a second UNO?
if Yes
for troubleshooting can you try this option:


also I added a pinout sticker for everyone :)

(attached file below is in full resolution and not limited to the height cap of 500 pixels)
HC

6v6gt

The picture is certainly better and it is now very clear that the 10K pull-up resistor goes from pin 1 (Reset) on the ATMEGA328P  to  the '+' rail.

ZakAttack92

What version of the Arduino software are you using and what site did you get it from arduino.cc or arduino.org?
Using 1.6.11 and I got it from arduino.cc

Tried replacing the crystal as suggested. No luck.

Trying to burn the bootloader using the second arduino and am getting this error message:

Code: [Select]
Arduino: 1.6.11 (Mac OS X), Board: "Arduino/Genuino Uno"

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=0x12
Error while burning bootloader.

zhomeslice

Does it give the same error with or without the arduino uno (with the ArduinoISP sketch uploaded) connected to the chip or does the error change?

goal is to see if the ArduinoISP on the UNO is communicating with the atmega328P chip on the breadboard.

HC

ZakAttack92

#11
Sep 05, 2016, 06:40 pm Last Edit: Sep 05, 2016, 06:56 pm by ZakAttack92
So I just tried burning the bootloader with arduino uno connected to the second uno, the error code I am getting now is this:

Code: [Select]
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 1 of 10: not in sync: resp=0x00
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 2 of 10: not in sync: resp=0x00
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 3 of 10: not in sync: resp=0x00
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 4 of 10: not in sync: resp=0x00
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 5 of 10: not in sync: resp=0x00
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 6 of 10: not in sync: resp=0x00
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 7 of 10: not in sync: resp=0x00
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 8 of 10: not in sync: resp=0x00
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 9 of 10: not in sync: resp=0x00
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 10 of 10: not in sync: resp=0x00


The uno connected to atmel328p-pu on breadboard and with the uno connected to nothing except the usb cable provide the original error message from my post above. :smiley-confuse:

I'm guessing this means the connection is not leaving the arduino at all. A bad cable? A bad chip? Most likely scenarios in this case?

Thanks again for all the help!

zhomeslice

Quote
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 2 of 10: not in sync: resp=0x00
The programmer Uno that you have loaded ArduinoISP isn't communicating with the computer. try re-upoading that Uno again with ArduinoISP sketch and see if the error changes. otherwise check to see which serial port you are connected to.
HC

ZakAttack92

Reprogammed it. Added a #define USE_OLD_STYLE_WIRING and it completed burning the bootloader onto my chip. Stuck it into my arduino and no luck.

Uno to uno is getting this error code now:

Code: [Select]
Arduino: 1.6.11 (Mac OS X), Board: "Arduino/Genuino Uno"

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=0x12
Error while burning bootloader.

zhomeslice

I checked the code and the USE_OLD_STYLE_WIRING. This will work even when not using an Uno. (On an Uno this is not needed). What this does is force the SPI interface to use these pins. By default the UNO has these pins as a hardware SPI interface.


I've attempted to recreate your error but I am failing.


I have a sketch that might help It was make by Nick Gammon back in 2012
it uses the same hookup you are using for the uploading of the bootloader

Serial is set to 115200 after hooking up the chip just reset the uno that you load this schetch and it will attempt to read the chip
on success i get:

Quote
Atmega chip detector.
Entered programming mode OK.
Signature = 1E 95 0F
Processor = ATmega328P
Flash memory size = 32768
LFuse = FF
HFuse = DE
EFuse = FD
Lock byte = FF
Clock calibration = B1
Bootloader in use: Yes
EEPROM preserved through erase: No
Watchdog timer always on: No
Bootloader is 512 bytes starting at 7E00
HC

Go Up