atmega328 sync issues

I built a project that worked fine. I placed an new ATmega328 chip in my Ardunio Uno board and programed it. the project works fine, but now when I put the old ATmega328 chip back into the Arudino Uno I get the following message "avrdude: stk500_getsync (): not in sync: resp=0x00"

Does anyone know what that means and how I can reset the clock to fix the sync issue?

Help, please


That is the error message when the Arduino IDE can't connect to the board at all.

Did the serial port show, when you connected the Arduino to the computer ? If so, the usb-serial chip is working. Perhaps that ATmega chip is broken, or the bootloader is not correct. You can try to burn a new bootloader into it.

Thanks for the response Peter. Yes, the com port is recognized and along with the proper board. I even tried to reinstall the boot loader and received the same error message. I think that I changed the timing of the chip by placing it in the Uno board, programming it, pulling it for my project , pulling it from the project and reinserting it back into the Uni board. The goal of the project was to see if I could place a new ATmega328 chip in the Uno board, program it, pull it and use it in a project elsewhere.

I believe that I screwed up by placing the new chip in the Uno, programed it, pulled it and run it independently in the project, pulling it from the project and reinserting it back into the Uno. When I reinsert it into the project, it runs fine. Is it possible that by running the chip in the project with a 16mhz clock somehow changes the synchronization of the chip where it is no longer in sync with the Uno board?

I'm new to electronics and micro controllers and I may not be expressing the problem in proper terms and/or describing the issue correctly so it makes sense to others.

Has anyone tried doing this or is this a common practice for making stand alone controllers for projects? I got tried of pulling all my projects apart to make new ones and thought this an easy solution, ha, yeah right.

Thanks for the assistance, greatly appreciated,

Perhaps some static electricity damaged the chip, or the bootloader was corrupted somehow.

When your project has a 16MHz crystal, you can program the ATmega in the Uno and put it in your project. That's normal to do. You can put it back into the Uno and into your project, that should not be a problem. There is no sync that can wrong.

Perhaps you can try to burn the bootloader with a programmer or ArduinoISP.

I’ll have to try it. weird, both the old chip and the new chip have the same issue. Regardless of what chip I insert into the Uno I get the same error message and can’t upload anything to the chip. The software recognizes the board and the port so it is talking to the chip. I tried reburn the boot loader to no avail, I got the same error message.

The reset on the board does nothing and I have a green power light and the led connected to pin 13 on the board is steadily lit. I can’t recall if that is standard for the led or not.

Funny that it is happening with both chips. Neither chip had any issues the first time round, meaning I put them in accessed and uploaded. They both ran the program installed. This message only started after I reinserted them into the Uno. I’m not sure I understand the error message “avrdude: stk500_ getsync (): not in sync: resp=0x00”, what does that really mean? Does it have something to do with the timing for the chip, I thought that that would be controlled by the on board crystal, the same on the project, both are operating at 16mhz. The only thing I can think of is borrow another Ardunio Duemilanove with a ATmeg228 in it and see if it will recognize either chip or will I have the same issues. I’ll pull the chip from the Duemilanove and put it in the Uno and see what happens. Two chips going south at the same time is highly unlikely, you agree?

The 'stk500 not in sync' means that the Arduino IDE can not communicate with the Arduino board, or in your case, the Arduino IDE can not communicate with the bootloader in the ATmega chip. Forget about 'stk500' and 'sync', those are only confusing.

Are you mixing Uno and Duemilanove ? I don't know anymore what the difference was, perhaps something with the auto-reset ?