Duemilanove upload issues

I recently got a Duemilanove with a ATMEGA328P-PU and was programming with no issues. Then I made sort of a dumb mistake and plugged in the USB cable while I was powering the board externally with a 12 V power supply (DERP). After that I started having issues uploading sketches.

At this point this is what happens: I plug in the USB cable, the green power LED turns on and the TX and RX lights flash together briefly. Then the computer detects the device like normal and my COM port becomes available in Arduino 0022.

When I go to upload a sketch (using the blink example) the RX LED will blink 3 times there will be a pause, RX will blink one more time and then I'll get the dreaded ...

"avrdude: stk500_getsync(): not in sync: resp=0x00 avrdude: stk500_disable(): protocol error, expect=0x14, resp=0x51" ... error.

I've performed a loopback test by connecting TX and RX pins together and I get everything returned perfectly.

At this point I figured maybe I damaged the ATMEGA chip so I got a new one with the bootloader pre-loaded. Unfortunately the board is acting exactly the same with the new chip (also an ATMEGA328P-PU). I've tried multiple computers and USB ports / cables and they all act the same. Short of getting another board, is there anything else I can try? Should I even bother messing around with replacing components on the board or should I just abandon it?

Thanks

Now that is indeed very odd.

Shot in the dark: try it as admin.

Gave it a shot, no change. I can confirm the serial commands are being received since it does make a connection to the arduino board and does flash the Rx LED when I send characters manually.

I'm trying to think of what else could cause a problem. I would suspect the serial convert chip but since I'm getting replies all perfectly that seems unlikely (though I guess it's still possible).

I checked all the voltages and they seem fine as well. The only other hint I have is that no programs loaded onto the ATMEGA chips seem to run and the reset button does nothing. I'm not sure about this being new, but what about the 16 MHZ crystal oscillator? I sort of feel like that would be difficult to damage but isn't it responsible governing the operation of the microprocessor?

I sort of feel like that would be difficult to damage but isn't it responsible governing the operation of the microprocessor?

Yes, if the crystal is bad it would behave much as you are seeing. The fact that the loop back test works fine kind of isolates the problem to the 328p chip and it's direct support components. Does the pin 13 led blink at all when you first power up or press reset? If not it would point to a bad 328p chip (which you already replaced). Do you know for sure that the 328p you bought came with the bootloader installed for sure? If so which bootloader did they say it came with, Uno bootloader or older one. You could try switching the IDE board selection to Uno to see if it might have the Uno bootloader installed instead of the older Duemilanove bootloader. You might want to measure the voltage on the reset pin after you power it up and see if it is at +5vdc. And again the crystal could cause your symptom, but that would be a rather rare failure compaired to the normal problems we see come up.

Good luck and don't throw in the towel just yet.

By the way powering the board with both USB and external power pulled into the external power connector at the same time is not a problem and in itself would not cause a problem unless something else was also wrong.

Lefty

I double checked with where I got the chip from to make sure I got one with a bootloader on it. It says it does and infact specifically says it can be dropped into a Duemilanove board, though obviously that's going to be hard for me to confirm.

I know it didn't do this yesterday, but the L - LED for pin 13 now occasionally flashes but it is irregular and after a few cycles will quit. This also only happens if I use the new ATMEGA chip, which makes sense since my old one no longer had the blink script on it. Pressing the reset button has no effect, this only works if I remove power from the board and plug it back in (either using the USB or a battery pack, doesn't matter). The only thing that I can think of that has changed is that it got cold in this room over the night. Infact, now that it has warmed up it no longer does this.

I think I'm going to see if I can't locate a 16 MHZ crystal oscillator and replace it.

8-Bit: I double checked with where I got the chip from to make sure I got one with a bootloader on it. It says it does and infact specifically says it can be dropped into a Duemilanove board, though obviously that's going to be hard for me to confirm.

Well that doesn't necessarily mean it came with a Duem bootloader or not. A 328p chip with a Uno bootloader can be plugged into a Duem board and work just fine, one just has to select the Uno board in the IDE for it to work. So again I would try uploading a simple blink sketch using both types of boards to see if one type (Uno or Due) works or not. Do you have link to the replacement 328p chip w/bootloader?

I know it didn't do this yesterday, but the L - LED for pin 13 now occasionally flashes but it is irregular and after a few cycles will quit. This also only happens if I use the new ATMEGA chip, which makes sense since my old one no longer had the blink script on it.

Regardless of if there is a sketch loaded or not, pressing the reset button should cause some kind of short blinking sequence on pin 13 led as that is part of the bootload program that is activated on reset and waits a short time to see if the IDE is trying to upload a new sketch, if not and there is a prior sketch loaded it jumps to the sketch, otherwise it just sits and waits for the IDE.

Pressing the reset button has no effect, this only works if I remove power from the board and plug it back in (either using the USB or a battery pack, doesn't matter). The only thing that I can think of that has changed is that it got cold in this room over the night. In fact, now that it has warmed up it no longer does this.

I think I'm going to see if I can't locate a 16 MHZ crystal oscillator and replace it.

The temperature thing could point to the crystal. Just a point of semantics, the crystal on the board is a crystal resonator, a complete 'crystal oscillator' requires both a resonator and a amplifier with feedback, this circuitry is provided by and is internal to the AVR chip.

Lefty

Ah, my bad. I'll start referring to it as a crystal resonator, I didn't realize the difference.

I went ahead a tried selecting the Uno board and didn't get any response. I got the replacement micro controller from here http://iteadstudio.com/store/index.php?main_page=product_info&cPath=41_43&products_id=213

Well that's all I got. Try a new crystal if you can find a 16Mhz one.

Lefty