Powering ATTINY85 through A3?

Hello everyone!

I have come across something really wierd in one of my projects. I am using an ATTINY85 and I am sending a constant voltage to its A3 pin whenever its powered on. It only fluctuates between 4.7V and 5V, and I am reading this value with AnalogRead so I can react to it. So far so good.

By chance I accidentally removed the VCC to it on my breadboard, but it kept running(?!). My program seems to operate normally, and I even bent the VCC leg away from the circuitry to make sure nothing was wrong there. Yep, still running even without its VCC leg attached to anything!

So it seems the ATTINY85 will be powered on as long as the “operating voltage” to pin A3 is within normal limits. I have tested this with 2 different ATTINY85s, both are the same.

Is this normal? Can someone please explain this? I am so confused. :-![


It's being back powered through the protection diode, which isn't rated for that. Stop doing that before you burn out the pin. Don't apply external voltages to any pin when the microcontroller is not powered.

Aha so thats what it is? I was considering the same for a moment but thought to myself it had to have a protection to prevent just that. I mean I am just using 5V which it should be rated for.

Anyhow, things are as they are. But in light of this can I still safely apply this voltage to A3 just as long as also the VCC is powered? I am thinking since my feed voltage to A3 is within operating voltage for the circuit itself I should be able to just jump the two pins together, right?

Thanks heaps for the fast reply, it is much appreciated. Some karma came your way! :smiley:


You must not apply an external voltage to a pin that's higher than Vcc or lower than ground, unless you put a high value resistor between the external voltage and the pin (Something like 10k - assuming this isn't a problem for the rest of the design - this would limit the current to a level that would not harm the protection diode or backpower the chip. Putting a resistor in series with external voltages that you're measuring is often good practice, because it also prevents excessive current from flowing if you set the pin as an output (without the resistor, it would fight against the external voltage source, likely resulting in current exceeding the maximum per pin current spec)

The problem is not voltage ratings, it’s this:


All IO pins have these protection diodes in order to shunt energy from static shocks to the VCC and GND rails. This clamps the voltage from a static discharge to be no more than a diode drop above the power rail or a diode drop below GND.

If VCC is not connected and you apply voltage to an IO pin, the top protection diode becomes forward biased and the chip can be powered this way.

It is not meant to be powered this way though. The diodes are designed to shunt pulses of energy from brief static discharge events, they are not designed to continually pass current. Allowing the chip to operate this way can break the protection diode.