why ATmegas die..

Go To Last Post
5 posts / 0 new
Author
Message
#1
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

So, I joined the camp of bitter folks who have experienced this - all out of a sudden the ATmega (mega8L, at 3.3V if that may affect anything), stopped responding. I'm not going to be sorry for too long, as cynical as it is I already bought a new one..

But I'm really curious, what could have caused this? And what kind of death is it, if it is possible to find out.

So here are some facts, superstitions first:
-- it was a generally crappy day - a day before a big fire at a transformer station took out electricity from a major part of the city, cell phone operators, internet providers, even hospitals were unoperational for a while; this happened day after that, so it could be some weirdness in the power lines. my soldering iron behaved strangely too;
-- i'm using a very simple lpt programmer, stk200-alike with avrdude. Sometimes it gives errors, but they have never been fatal before - at least it has never yet happened so that fuses got programmed instead of flash or vice versa;
-- the programmer (line transciever chip, hc245) is sharing the same power source as the atmega8;
-- I haven't been touching fuse memory at all, avrdude is explicitly set to only write to flash section of memory;
-- the programmer works fine, I checked it on another board, although that board has 5V supply;
-- regarding strageness in the soldering iron - no, I succesfully programmed the board at least once since I last touched it, no surges from the iron;
-- the oscillator is still operational;
-- I don't remember what must happen while RESET is pulled low, but I could not notice a change on any of the pins when the button is pressed;
-- pin impedances are in the range between 10-40MOhm, seem to be fine;
-- I cut all SPI wires that go to other devices, leaving only the ATmega connected;
-- the MISO line is silent when the programmer is trying to talk to the uC;
-- the code that ran in teh uC was using SPI in master mode, but it didn't seem to be a problem for a while;
-- I think that at first I only was getting subsequent programming errors, then I thought - what the hell and held the RESET button manually and ran avrdude. I'm not sure if these events are connected because it seemed to be already half-dead, but after this it became fully dead;

I'm hoping to determine the most probable cause of failure to avoid the same fate in the future. What would the more experienced freaks say about this?

Meanwhile, suggestions on how to unsolder a TQFP32 package without help of a special soldering tip are also welcome 8) So far I can only think of cutting its legs with fine-tipped cutters first (those I have).

The Dark Boxes are coming.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I don't know what causes it, but if it's any consolation I killed four Mega32s in one evening a couple of weeks ago. Thereafter I took the hint and bought a parallel programmer (which also uses ISP mode as well) and was able to recover one of the chips fully - two others appeared to recover but had stuck bits after a clear, which I don't understand.

I was using a parallel port -> Atmel 6-pin connector (no connection to the +5v power rail) and the Bascom software to drive it; I believe the fuses were being randomly reset since my app required jtag off and external crystal... and they'd keep appearing on 1 meg internal and jtag on. I can't prove it though since I haven't yet found a way to read the fuses from the T51-prog programmer.

Neil

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

If your programmer is not 100% reliable every time, my guess is that you've blown the wrong fuse. Your SPI may be disabled, the clock settings wrong, or the RESET fuse disabled.
This happens often if the programmer is set to a too high clock frequency or the levels are bad.
Only way back is a parallel programmer. Which in case of a sub 1$ mega8 means : cut if off, throw it out and put a new one on instead.
Which actually is the solution, no matter what really happened.

/Jesper
http://www.yampp.com
The quick black AVR jumped over the lazy PIC.
What boots up, must come down.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Yeah, thanks for the input. Actually this is what I'm going to do right now.

The Dark Boxes are coming.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Ok..

Now I have 2 souvenir ATmega8L's.

But I've found out why. The cause was my cheap-n-tasty "soldering station" with triac regulator (with transformer). Remember when I said that it was a strange day and the iron started to behave strangely?

After this freshly soldered ATmega stopped responding the very first moment I started programming the fuses, and I tried to read it some 10 times prior to programming to verify that it corresponds properly, I decided to put up a little experiment with my old and verified board, carrying ATmega32. I just happen to use it as a 3.3V regulator today.

So I tried to program it, and there's again that error, content mismatch at address 0000. Tried it several more times, with different delay settings, with different programs -- all to no avail. I've been conversing on phone with a friend of mine meanwhile and after about an hour or so of trying every possible and zany thing, he suggested to start turning off devices around. Scope out, nothing. Soldering iron out - voila, it works! Scope on, it works. Soldering iron on - no go.

Ok, here's the hint.

If you see a soldering station that looks like this

and you're tempted to buy it ($20 approx, scrumptious!), try to inquire what's inside of it. Chances are that it has a simple analog triac-driven phase switcher in the primary and soldering iron in the secondary (if you're lucky to find one with a transformer). This circuit is ok for a while, but it seems to be unstable and if something happens (I don't know what exactly), it goes all wrong and although it keeps somewhat working, it radiates awful EMI. If you're not sure, don't buy it, if you can have it with moneyback, first off move a scope probe close to it and if you see characteristic 100hz (120 in USA?) peaks, it's triac driven.

Mine is manufactured by Pro's Kit (a taiwanese company), but I've seen at least 2 other identical designs sold by different names, I'm sure there are more.

The dark boxes surely were coming right for me.

The Dark Boxes are coming.