# Question on Simple Digispark ATTiny85 L

I am using the following simple program to blink 5 pairs of LEDs using my Digispark ATTiny85. The circuit is very simple, not even have the necessary resistors to limit current. I was just trying for the first time with Digispark ATTiny85 board. But, when I run it by plugging in 5V power supply to the Micro USB Port on the board, I see the P5 LEDs glow dim and the P4 LEDs glow bright continuously. No blinking effect. Neither does the other LEDs glow at all. Just these 2 pairs glowing continuously. Am I doing something really wrong? I know the HIGH on P5 is 3V and current limiting resistors are missing. But that should not prevent the microcontroller to blink the remaining LEDs.

void setup() {
pinMode(0,OUTPUT);
pinMode(1,OUTPUT);
pinMode(2,OUTPUT);
pinMode(4,OUTPUT);
pinMode(5,OUTPUT);
digitalWrite(0,LOW);
digitalWrite(1,LOW);
digitalWrite(2,LOW);
digitalWrite(4,LOW);
digitalWrite(5,LOW);
}

void loop() {
digitalWrite(0,HIGH);
delay(500);
digitalWrite(0,LOW);
digitalWrite(1,HIGH);
delay(500);
digitalWrite(1,LOW);
digitalWrite(2,HIGH);
delay(500);
digitalWrite(2,LOW);
digitalWrite(4,HIGH);
delay(500);
digitalWrite(4,LOW);
digitalWrite(5,HIGH);
delay(500);
digitalWrite(5,LOW);
}


And following is the schematic.

simulate this circuit – Schematic created using CircuitLab

• > "But that should not prevent the microcontroller to blink the remaining LEDs." Are you absolutely sure about that? What if the current from P4 to GND is large enough to pull the VCC below the operating voltage of the Attiny, or something to that effect? – Dampmaskin Dec 15 '16 at 11:05
• But how would P4 get HIGH before P0-P3? I never see the first 3 LEDs blink. See my program above. – sribasu Dec 15 '16 at 16:22
• Add the current limiting resistors for the LEDs. As you say in your second sentence, they are necessary. – Peter Bennett Dec 15 '16 at 17:14
• What colour or forward voltage are your LEDs? 3 volts may not be enough to light white LEDs. – Peter Bennett Dec 15 '16 at 17:16
• You know what, I just stopped using the 3V pin i.e. P5 and now using P0 through P4. It works fine now. What could be the reason? I really didn't add any resistor to fix it. Is the P5 pin connected to LEDs without a current limiting resistor causing the problem? – sribasu Dec 15 '16 at 19:51