I managed to kill an Arduino yesterday by plugging a wire into a pin from another device without connecting the grounds first. The Mega328 got very hot and made a loud crackling sound.
So I pulled out a spare Mega328 chip and plugged it into the board, hoping it was just the chip that was dead. I connected up my USBtinyISP and tried to program it but all I get was the dreaded: "avrdude: initialization failed, rc=-1"
After a lot of messing around I pulled the chip out and put it on a breadboard. It programmed perfectly. Put it back in the Uno, it fails to program. Back to the breadboard, works perfectly again...
Can anybody explain this? I thought I should be able to just connect to the ISP header and program it. I've tried different power, check the PCB connections from ISP connector to chip, nothing. I tried another Arduino Uno out of paranoia, same thing.
Has anybody else managed to program an Uno via the ISP header?
Yes, I've been able to burn a bootloader on the Arduino UNO (R2) with a USBasp ISP device. Perhaps one of the lines necessary for ICSP has gotten fried.
johnwasser:
Yes, I've been able to burn a bootloader on the Arduino UNO (R2) with a USBasp ISP device. Perhaps one of the lines necessary for ICSP has gotten fried.
That's what I thought but I tested the lines between ISP connector and the Mega328 socket and they seemed OK (and it wasn't one of those pins I killed, it was digital pin 3).
I also tried a different Arduino Uno, same result.
I'm sure somebody must have done it of there wouldn't be a connector on the Uno PCB. It just doesn't work for me and I have no idea why. I use the programmer almost on a daily basis (and it managed to program the exact same Mega328 chip on a breadboard) so I don't see how it's that.
CrossRoads:
Maybe reset pin fried on the 16U2 and is preventing programming. Its the only thing in common between the 2 device re: ICSP programming.
It seems to be working just fine with the new chip...
Aha! Some light...
Ok, I just got my other Arduino Uno out to give it another try (check if I really am going insane):
I used avrdude to look at the device info and it worked! I could swear it didn't work earlier, but whatever.
I went back to the board I zapped and I get "avrdude: initialization failed, rc=-1"... so there must be something bad on the board. I held down the reset button, ran avrdude again and it got the device signature. Looks like CrossRoads is right, something is preventing the reset line from going low when I use the programmer.
The RESET connection from the ISP header to the Mega328 chip is good, it must be something else.