Go Down

Topic: Never been able to "burn bootloader" now I actually really need it and need help (Read 931 times) previous topic - next topic

Will4321

I've never been able to  burn the bootloader onto an atmega chip following any guide I have found out there which I have found somewhat frustrating.

Specifically what I'm trying to do now is burn the bootloader onto a board I made myself with a 6 pin ICSP header on it. I thought I could connect it with a 6 position ribbon jumper going from my custom board to the Arduino ICSP header but that is not working after trying many configurations.

I get the common error: avrdude: stk500_getsync(): not in sync: resp=0x00

I have the board set to: Arduino pro mini 5v, atmega328, which is what the chip is, with a 16MHz xtal. And the programmer set to AVR ISP, which is what a guide has suggested doing.

Can anybody help me get this working?

Alternatively can I use it without burning to bootloader somehow?






CrossRoads

Get yourself a real ISP programmer. Best is the Atmel AVR ISP MKii ($34 at mouser.com) but others will work as well.
I used this one from MDFLY for a long time before I got a MKii to deal with '1284 chips.

http://www.mdfly.com/index.php?main_page=product_info&cPath=5&products_id=415
Need to make simple 10-pin to 6-pin adapter to use it (connects +5, Gnd, Reset, SCK, MOSI, MISO from the 10 pins 2x5 layout to the ISCP 2x3 layout)
and a simple 2-line addition to programmers.txt file
Others of similar type exist from several sources: sparkfun, adafruit, nkcelectronics. I've accumulated several types in the last couple of years, never got around to checking them out. Just used the mdfly programmer & USB/Serial adapter (an FTDI Basic) and now just use the MKii becasue I didn't want to dig up 2 sets of cables; had the MKii and its cable out, so I just used that.

My boards all have 16 MHz crystal, two 22pf caps, 10K reset pullup resistor (with diode across it when I remember, anode to +5, cathode to reset, like current Uno), and 0.1uF (100nF) caps on Vcc & Avcc.

Select board type of Uno, and let 'er rip.
I burn the Uno bootloader first to make sure the fuses are set correctly.
Then you can download sketches via USB/Serial adapter after that, or use the programmer and File:Upload Using Programmer, blows away the bootloader and your sketch starts immediately.
Designing & building electrical circuits for over 25 years. Check out the ATMega1284P based Bobuino and other '328P & '1284P creations & offerings at  www.crossroadsfencing.com/BobuinoRev17.
Arduino for Teens available at Amazon.com.

retrolefty


I've never been able to  burn the bootloader onto an atmega chip following any guide I have found out there which I have found somewhat frustrating.

Specifically what I'm trying to do now is burn the bootloader onto a board I made myself with a 6 pin ICSP header on it. I thought I could connect it with a 6 position ribbon jumper going from my custom board to the Arduino ICSP header but that is not working after trying many configurations.

That doesn't work because that just wires reset to reset between the two chips. The programmer, in this case an arduino board running the ISP sketch needs to control the reset pin on the target chip so uses pin 10 to manipulate that signal.

I get the common error: avrdude: stk500_getsync(): not in sync: resp=0x00

I have the board set to: Arduino pro mini 5v, atmega328, which is what the chip is, with a 16MHz xtal. And the programmer set to AVR ISP, which is what a guide has suggested doing.

If you are using an arduino board as the programmer then that is not the proper programmer, but rather Arduino as ISP is the proper choice, but after first you load the arduino board with the ISP programmer sketch. Then you have to select the board type to the selection that matches the chip type and clock speed that your target is using.

Can anybody help me get this working?

Alternatively can I use it without burning to bootloader somehow?







Will4321

Ok, made some progress. Installed the AVR as ISP sketch, and hooked up pins 10,11,12,13,5v,gnd to the 6 pin header on my board.

I'm getting this error when I try to upload a program
avrdude: stk500_getsync(): not in sync: resp=0x1c

And this when I try to burn bootloader:
avrdude: Expected signature for ATMEGA328P is 1E 95 0F
         Double check chip, or use -F to override this check.

I did find a short between reset and sck that showed up and than cleared it.

Still looking for issues, would like to get it solved by today if I can.

Thanks for the help!

Made an edit because I copied the wrong error, the one I had when the USB was unplugged.

retrolefty


Ok, made some progress. Installed the AVR as ISP sketch, and hooked up pins 10,11,12,13,5v,gnd to the 6 pin header on my board.

I'm getting this error when I try to upload a program
avrdude: stk500_getsync(): not in sync: resp=0x1c

And this when I try to burn bootloader:
avrdude: Expected signature for ATMEGA328P is 1E 95 0F
        Double check chip, or use -F to override this check.

I did find a short between reset and sck that showed up and than cleared it.

Still looking for issues, would like to get it solved by today if I can.

Thanks for the help!

Made an edit because I copied the wrong error, the one I had when the USB was unplugged.



Well I've never used an arduino board as a programmer, but I believe the last step you need to perform is to defeat the auto-reset circuit on your arduino board from functioning once you have loaded the ISP sketch into it. That is done with either a proper sized cap or resistor temporarily plugged into the shield reset pin and either ground or +5vdc pin depending if you use the cap or resistor respectively. That way AVRDUDE will be 'talking' to your target chip rather then the arduino board once you start a burn bootloader action from the IDE.

Lefty

CrossRoads

"defeat the autoreset"
Hasn't that been replaced with the ISP sketch now controlling the Reset pin of the part to be programmed?
NickGammon's programmer does it that way.
http://www.gammon.com.au/forum/?id=11635

You're programming a '328 and not a '328P, that's why the signature byte error.
Designing & building electrical circuits for over 25 years. Check out the ATMega1284P based Bobuino and other '328P & '1284P creations & offerings at  www.crossroadsfencing.com/BobuinoRev17.
Arduino for Teens available at Amazon.com.

Go Up