Programming Attiny45 using Arduino Uno with weird behavior I bought an Arduino Uno a few days ago.

I programmed an ATtiny45 using an Arduino Uno following "How-To: Shrinkify Your Arduino Projects" video on YouTube.

I uploaded the blink example successfully. I altered the sketch in a way so there is also a blinking on pin 4 (which is ATtiny45 pin 3).

Now, if I connect +5V from the Arduino to ATtiny45 pin 8, ground to pin 4 and the LEDs from pin 2 and 3 to ground everything works as expected.

But if I use 4 AA batteries instead of the power from the Arduino I only get a blinking on ATtiny pin2.

What could be the reason for this behavior? Is it because I use 4 AA -> 6 V instead of 5 V? I tested it also with 3 AA batteries and got the same result.

So why does it work if I use power and ground from the Arduino but not from the batteries?
If you take a look at Attiny45 datasheet, you will find at the very first page:

Operating Voltage

1.8 - 5.5V for ATtiny25V/45V/85V

2.7 - 5.5V for ATtiny25/45/85



Your circuit will have unpredictable behavior out of this range. If you want to use four AA cels, you can organize them to have a 3V output or use a step-down voltage regulator.