Did I fry my arduino? Need a pro's input!

Have done tons of uploads, w/o issue. Now, when I go to upload the bootloader starts (13 blinks), but after a few seconds the old code starts to run again, and I get the following protocol error:

stk500_getsync(): not in sync: resp=0x00

stk500_disable(): protocol error,expect=0x14, resp=0x51

I believe this simply means the computer isn’t talking to the arduino. Connections are right, re-installed the drivers, port is selected right… Guess I am at a bit of a loss, and wondering if I somehow shot the ATMega328?

I have the sparkfun breadboard version of the arduino - ATMega328. Have cap between RTS and reset. Board selection is arduino duemilamove or nano w/ atmega328. Using USB to breadboard FTDI cable as connection.

Any advice? Is my board shot?

Here is the verbose:

Using Port : \.\COM3

Using Programmer : stk500v1

Overriding Baud Rate : 57600

avrdude: ser_open(): setting dtr

avrdude: Send: 0 [30] [20]

avrdude: Send: 0 [30] [20]

avrdude: Send: 0 [30] [20]

avrdude: Recv:

avrdude: stk500_getsync(): not in sync: resp=0x00

avrdude: Send: Q [51] [20]

avrdude: Recv:

avrdude: stk500_disable(): protocol error, expect=0x14, resp=0x51

avrdude done. Thank you.

Try removing the AVR and plugging it back in, the socket might have developed a poor contact.

If that doesn’t fix it, something might have happened to the AVR chip. If you have access to an AVR programmer you could try reloading the bootloader, otherwise buy a replacement chip with the bootloader installed. Most Arduino suppliers stock them.

I’ll try reseting the AVR. Purchased another w/ bootloader so I can also try to swap to see if it is indeed the chip.

I was in the process of loading some code I found on the internet to play with my new RFID reader. Code below. Now, I am a newbie, so although I believe this is a silly thing to ask I am going to ask anyhow. Everything was working great before I tried to upload this. This is the first time I have used the Serial.read command. Is there any chance this could be part of my issue?

/* RFID ID12
*/

char val = 0; // variable to store the data from the serial port

void setup() {
Serial.begin(9600); // connect to the serial port
}

void loop () {
// read the serial port

if(Serial.available() > 0) {
val = Serial.read();
Serial.print(val, BYTE);

}
}

Well I never say never, but it’d be pretty unusual for code to cause hardware damage. Serial functions get used a lot, and the code you posted looks innocuous enough. Nothing else happened to the Arduino that might cause the odd behavior? Not sure what you mean by the “Sparkfun breadboard version” … Exactly which model do you have, is it an Uno or Duemilanove, or something else? If you have an Uno, the board selection in the IDE is incorrect.

Seen this happen before where the bootloader initializes too quickly and the serial port gets opened by the code before the IDE has a chance to upload.

When this happens to me, I’ve usually managed to get it to upload by closing the IDE, plugging the Arduino into a different USB port, and trying again. Or, press the reset button on the Arduino and immediately afterwards click the Upload button.

I’d suggest uploading the BareMinimum sketch first.

arduino breadboard from sparkfun = http://www.sparkfun.com/products/10184

Tried resetting immediately post upload; no good. I replaced the AVR with a new one. Works fine. So it’s the chip for sure. Will try to reload the bootloader and see if that was corrupt, or if the chip got damaged somehow…

and… guessing I have confirmation the AVR is toast. Setup the arduino as ISP to load the bootloader. Here’s the error I got:

avrdude: Yikes! Invalid device signature.

Double check connections and try again, or use -F to override

this check.