I fried my Sanguino’s AVR chip (the atmega644p) :( [FIXED]

Update: fixed again. Update 2: fried again.

Remembering from the top of my head that I had some PCBs with the silkscreen reversed, with an incorrect measurement I concluded that it must have been the PWM board. The PWM board gives 12 Volts on the -, or so I thought… It actually always gives 12 V on the + (silkscreen and actual) and I thought that this was the minus. This means that I put 12 V on many inputs of the sanguino, rotational sensor’s opto and even the thermocouple PCB! Nooo… the sanguino went really hot. After the damage was done, CPR didn’t work, giving it shocks or reprogramming it with an AVR didn’t work…. Yes, it was dead, forever.

I had a spare AtMega644p just in case the above happened. But programming it was harder than I thought.

My first attempts were various programs that would make an AVR programmer out of an arduino (which was the inspiration for the sanguino). This didn’t work. The software on the arduino couldn’t program this target. Apparently everyone used homemade Parallel programmers (which aren’t that hard to make, I admit) or expensive AVR programmers (too expensive for me!).

After two iterations of making a Parallel programming cable, this one finally worked, but only by issuing a manual command on an old laptop with a LPT port (a.k.a. printer port).

Doing it directly via the Arduino program just caused the software to hang without much information on what went wrong. Using avrdude from the command line yielded more results. After doing it the utterly slow way (waiting 50 minutes for burning a < 1k bootloader to upload) that didn't work, there was a fast way that I should have tried: path-to\arduino-0013-win(2)\arduino-0013\hardware\tools\avr\bin>avrdude.exe -c dapa -i 10 -p m644p -U flash:w:ATmegaBOOT_644P.hex -C “path-to\arduino-0013-win(2)\arduino-0013\hardware\tools\avr\etc\avrdude.conf”

avrdude.exe: AVR device initialized and ready to accept instructions

Reading | ################################################## | 100% 0.00s

avrdude.exe: Device signature = 0x1e960a
avrdude.exe: NOTE: FLASH memory has been specified, an erase cycle will be perfo
rmed
To disable this feature, specify the -D option.
avrdude.exe: erasing chip
avrdude.exe: reading input file “ATmegaBOOT_644P.hex”
avrdude.exe: input file ATmegaBOOT_644P.hex auto detected as Intel Hex
avrdude.exe: writing flash (65382 bytes):

Writing | ################################################## | 100% 42.70s

avrdude.exe: 65382 bytes of flash written
avrdude.exe: verifying flash memory against ATmegaBOOT_644P.hex:
avrdude.exe: load data flash data from input file ATmegaBOOT_644P.hex:
avrdude.exe: input file ATmegaBOOT_644P.hex auto detected as Intel Hex
avrdude.exe: input file ATmegaBOOT_644P.hex contains 65382 bytes
avrdude.exe: reading on-chip flash data:

Reading | ################################################## | 100% 41.22s

avrdude.exe: verifying …
avrdude.exe: 65382 bytes of flash verified

avrdude.exe: safemode: Fuses OK

avrdude.exe done. Thank you.

This was with the Sanguino powered by the USB-to-TTL cable.

And then it was alive again… it’s alive, it’s alive!

Lesson learned: don’t assume that a + output port is actually – (ground). It might actually be 12 V and fry your chips.

Dit vind je misschien ook leuk...