Stumped by familiar error code

OK experts, here's one for you. Known good (and working Uno R3) Connects fine with PC, sketches load, all is well. Figuring I'd use the Uno for development, I swap out the Atmega 328p for use in a project, with a new one (of 5) (tried all 5) presumably with bootloader.

Try to upload sketch, get error: avrdude stk500_getsync() not in sync resp=0x00

No parameters had changed. Not Com port, not Board ID, or anything else. No wiring to the board (pin 0) or anywhere else)

Put original Atmega chip back in.....all is well.

Only other visible symptom: pin13 led flashes several times on power up with original chip, and comes on solid with the power led with the other 5 "new chips".

Thought maybe the bootloader was perhaps not installed, and tried with methods described here, to load the bootloader with worse results. What am I missing?

It does seem as if there's no bootloader. The missing information in your story is what exactly happened when you tried to burn a new bootloader onto these chips...

flagtrax: I swap out the Atmega 328p for use in a project, with a new one (of 5) (tried all 5) presumably with bootloader.

I'm guessing that your presumption is incorrect. By the fact that your attempt to burn a fresh bootloader failed one can guess that you got the wiring wrong, failed to disable auto-reset on the UNO running ArduinoISP, or the chips you got have a fuse set that prevents Serial Programming. Turn on verbose upload logging when you try to burn the bootloader. Post the resulting log.

Thanks all for the replies. Please keep in mind that I am indeed a new user. However also keep in mind that I do have years of experience with other platforms. At this point I don’t know how to disable auto-reset on the UNO running ArduinoISP, or if the chips have a fuse set that prevents Serial Programming. Or how to turn on verbose upload logging when you try to burn the bootloader. .

That being said, I’m trying to get information from all over the www (and world in general). Let me give you all the steps I’ve taken in my foggy journey.

Since my first post, I also posted in the microprocessor section, perhaps incorrectly, as I can’t find it so I assume it was deleted. And since the first post I’ve tried multiple setups to load a bootloader onto these chips. Specifically using the “breadboard” methods shown on this site, even though many have expressed a dislike for it. My first attempt was without xtals, since they were on order but hadn’t arrived. After loading the sketch, choosing the “breadboard” option, checked, double checked, and checked wiring again, I proceeded to execute the burn bootloader option under tools. Things looked like they were/went well. The TX/RX leds on the Uno flashed happily, and in the end. the IDE reported bootloading had finished. I believe now that was not a good thing to do, I didn’t understand the roll “fuses” played in the process, so I think I’ve locked in to the internal timing mode. If I put one of these chips in the Uno, and try to upload a sketch it gives the sync error. I don’t know if that means the clock speed is wrong or if the chip simply still has no bootloader. Or worse yet, bricked! I then tried again with a 16mhz xtal, and again the Uno happily appeared to send the bootloader to it’s rightful resting place. All 5 chips acted like they were taking data. (or maybe I should say the Uno appeared to be sending it, with successful completion of the sketch). But again the chips wouldn’t work in the Uno. So I started researching again and found Nick Gammons pages, and found his sketch for “ID’ing” a chip. Unfortunately my level of understanding is not at the point where I can follow his trail. I’ve read how to install a library in the instructions on this site, but Nick’s libraries appear different to me, in that there is a .h file , but no .cpp file, and neither are in a compressed (zipped) format. None the less I’ve tried to place them where they belong and ran a verify function in the IDE window, with compiler errors that appear to be referencing the library. Has anyone used Nick’s approach? To me it looked pretty darn good, and Nick seems to be an Arduino Guru. I’m just not up to speed enough to use his gracious knowledge.

Burning bootloaders can be very tricky.

If you are setting the chip up to use a crystal clock it will stop responding to serial programming after those fuses are set UNLESS you provide a crystal, resonator, or an external clock. This should not be a problem if you are bootloading a board to use the internal 8 MHz clock.

If you are using the ArduinoISP sketch you will probably need to disable auto-reset on the Arduino running the sketch. Do that by connecting a 1 to 10 microfarad (uF) capacitor between the Reset pin (+) and a GND pin (-). The Arduino UNO bootloader speaks the same protocol as the ArduinoISP sketch (STK500V1) so if the Arduino gets reset the "Burn Bootloader" process will happily talk to the bootloader on your UNO and NOT to the ArduinoISP sketch. You will get mysterious error messages.

If ANY of the wires is not wired correctly you will be able to send commands to the ISP but the results you get back will likely be all 1's or all 0's or random garbage.

If you expect to burn more than a few bootloaders you should probably order a USBasp programmer from eBay. They cost less than $4 but you will need a 10-pin ICSP to 6-pin ICSP adapter which may cost another $4.

Note that if you use an ISP to upload a sketch ("Upload Using Programmer") you will no longer be able to use the bootloader until you write a fresh bootloader ("Burn Bootloader").

On chips like the ATtiny that don't support a bootloader you still need to 'Burn Bootloader' once to set the configuration fuses.

Again thanks John, all that was pretty much understood in my mind, (but maybe not quite so organized :stuck_out_tongue: ). (I'd already done the "reset" disable, I just didn't understand what you were saying. Learning the jargon is part of the learning curve.) All, that is, but the comment "Note that if you use an ISP to upload a sketch ("Upload Using Programmer") you will no longer be able to use the bootloader until you write a fresh bootloader ("Burn Bootloader")." I will definitely keep that filed away somewhere in the grey matter. And thanks too for a couple very good tips!

To fill in the blanks, I'll try to be more specific to the actions that occurred.

I purchased the chips as "bootloader installed". At the time, I hadn't learned yet how ambiguous that statement can be. Meaning if they were loaded with fuses incorrectly set for the Uno, they might work on a breadboard, and still not work on the Uno R3 board.

In my first attempt to load the bootloader, I was using the breadboard method with a minimal setup. Here I learned about the issues with "fuses" setting clock speeds. When my xtals finally arrived, I tried the same method (breadboard) and although the Uno went through the motions, appearing to send the bootloader to the chip, when I put the chip in the Uno it would give "sync" errors when trying to upload a sketch. At that time I wasn't sure if the chip ran on it's own on the breadboard or not.

In an attempt to see what was going on with the chips, I found Nick Gammon's sketch to identify the chips (Thank you Nick), and couldn't figured out how to put it in a usable form in the IDE. At some point after reading from other places, I saw a reference to the IDE. I'm not sure what promped me but I downloaded IDE 1.0.1, and found that Nick's sketch compiled and ran fine within that. (I had been using 1.0.6). This prompted me to try loading using the UNO as an ISP but through IDE 1.0.1.


I don't know why, but all 5 chips loaded smooth as silk; and ran on the Uno board. When I ran Nick's sketch again (on IDE 1.0.1) I could see the changed configuration on the chips. I then looked at one prior to reloading the bootloader, and could see the configuration had changed in the fuses. I also noted that the bootloader area was loaded with 0xff's but there was some code loaded lower in the memory map. This begs the question: Is there an issue with IDE 1.0.6, or my download of it? Has anyone else that has bootloading issues tried 1.0.1? Apparently there are enough differences between them that Nick's sketches wouldn't compile in 1.0.6 (or in my fog of confusion I got lucky in 1.0.1). I am putting all this here in the event that it might aid someone else having issues with loading bootloaders. Thanks for the help, hopefully I will learn and grow enough to help others.