[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [avr-gcc-list] AT90s1200-12 latched short circuit
From: |
Bruce D. Lightner |
Subject: |
Re: [avr-gcc-list] AT90s1200-12 latched short circuit |
Date: |
Mon, 02 Feb 2004 15:33:33 -0800 |
User-agent: |
Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.5) Gecko/20031007 |
Richard,
I have a AT90s1200-12 with four switches (PD3-6 to earth) and a
pizzo-electric transducer (PD0 also to earth.) The switches are
diode-OR'd to INT0 (PD2.)
The program spends most of it's time in power-down, until it gets a
button press.
I powered this from 4 AAA cells. Since new 1.5V cells give over 1.5V I
included a couple of diodes (1N4001) in series to pull the voltage down
a bit. I measured it to be about 6.15V and decided that was close
enough. (Maximum voltage for a AT90s1200-12 is 6V.) I don't have good
current measuring capability, but I did what I could to check that the
current was about 10-20mA active and < 1uA inactive.
I've used the "diode trick" myself many times with no problems in the
past. This by itself should not cause a problem.
The project worked for several days and then lay idle for a week or two.
On trying it again it was not working (pressing the buttons - no
sound.) Now, several days after noticing this, I just opened it and
burned myself. The chip was too hot to touch, and the diodes were
hotter. The voltage was 5V. The open circuit voltage was 6V. So it was
sinking a lot of power. On putting the processor back in, it works OK
and there's no indication of it failing again.
It is not clear to me if this "hot" state occurred once, or if it is
reproducable...
Without a schematic for the circuit (indicating at least what you *think*
you built! :-) one has to assume that your circuit is OK. Assuming that
it is, there are at least a couple of possibilities:
(1) You managed to get the chip to "latch up". The AT90S1200 is a pure
CMOS design and therefore static discharge, or any other sort of
unexpected pulse on an I/O (or power/ground) pin can induce "latch-up".
This means that literally every single transistor on the microcontroller's
die has gone into an "on" state. Therefore every single CMOS transistor
on the die is conducting power from Vcc (i.e., +6V) to ground. The only
way to clear the "latch up" is to remove power. Usually, the chip never
recovers from this, unless you detect it early. If "latch-up" was to
blame, I'd assume that your "trying it again" caused this event because
the chip did survive, and thus this was an isolated event.
(2) You have one of the I/O pins "fighting" an immovable electrical force,
such as trying to drive a grounded I/O pin high. (In fact, I have seen
this induce "latch-up" in AVR parts in the past.) Normally though, the
chip resets and re-runs the program over again and then does exactly the
same thing. This can consume a *lot* of power and heat up the chip.
Also, your program will look like it's "not working".
The only routes to either power line with no button pressed is via the
pizzo transducer, or the reset pin (standard power-on reset circuit.)
There is no limiting resistor on the pizzo, but even with the chip
driving it hard I wouldn't expect it to develop much more than 20mA.
Why?
That would not make the 1N4001s hot enough to burn my finger.
Ah...this is significant. Follow the current! Show us the circuit and
tell us what you think you are doing with the I/O lines connected to these
diodes! Are they programmed as inputs. How are you "pulling up" PD3-6?
How is the INT0 pin onfigured? Show us the code!
(The 6502 had a Halt-And-Catch-Fire instruction. It seems I may have
found one for the AVR. ;-)
Has anyone seen this behaviour? Might 0.15V above maximum voltage cause
this to happen?
Unlikely.
Or am I looking for something else?
Probably...
TIA for any suggestions.
Best regards,
Bruce
--
Bruce D. Lightner
Lightner Engineering
La Jolla, California
Voice: +1-858-551-4011
FAX: +1-858-551-0777
Email: address@hidden
URL: http://www.lightner.net/lightner/bruce/