I accidentally sent 5V to pin 2 instead of VCC on it and now no matter what code I upload I get power on all the time at all pins. Sounds like it's fried to me. I tested it with this code:
I imagine 5V with no resistors coming straight from the voltage regulator (L7805) would cause something inside to break. Is that right or did I make a stupid error in my code to test it out?
Does downloading a sketch to it actually work according to the IDE? IF you can download to it and the IDE says so, at least part of it must be operating.
But 5V to a pin (if Vcc is @ 5V) is not a problem at all. The problem starts when Vcc is not at 5V. Like when it's connected to 3,3V.
But also when Vcc is disconnected. You phantom power the uC via the input. As long as noting current consuming is connected to the ATtiny this not that bad. Bad practice but the tiny will survive. But if it has to power more (connected to an output or Vcc) you can blow up the tiny.
But uhm, programming goes okay? No errors whatsoever? Most of the time that will fail as well...
If the sketch uploads OK, but all I/O pins are high all of the time, then it's not quite dead, just very, very seriously injured. (Might as well be dead for all intents and purposes though.)
If the above is true, it's time to pull the plug and let your Arduino die with dignity.
(I have an old dog in the same condition, unfortunately, and have to do exactly that within days.)
If an upload succeeds, all the pins can't be stuck high!
For an upload to succeed, there would need to be MOSI, SCK signals reaching the chip, which couldn't happen if the pins were shorted to Vcc.... And for the upload to succeed, it would have to respond appropriately on the MISO line, so the chip must be able to control the outputs....
DrAzzy:
If an upload succeeds, all the pins can't be stuck high!
For an upload to succeed, there would need to be MOSI, SCK signals reaching the chip, which couldn't happen if the pins were shorted to Vcc.... And for the upload to succeed, it would have to respond appropriately on the MISO line, so the chip must be able to control the outputs....
Very good point. I missed that. Hmmm. Gotta wonder.....
red913, exactly which pins are always high? How many did you actually measure, and which ones?
red913:
*big sigh
Seriously...
I forgot to connect ground rails on BOTH sides of the breadboard to eachother.
I keep them permanently connected on my breadboards. I remove other connections beteen uses, but never them unless there's a special reason. That way I can't forget. Easier, too, since I don't have to fit them every time I use a breadboard.