I got my Arduino kit a few days ago and I've been going through some of the tutorials.

I got to the 8 LEDs with a shift register tutorial, where I got stuck. Nothing would light up after I plugged everything in and uploaded the sketch.


This is the circuit I've attempted to recreate using Fritzing, and the following is the code I used, from the tutorial :

int tDelay = 100;
int latchPin = 11;      // (11) ST_CP [RCK] on 74HC595
int clockPin = 9;      // (9) SH_CP [SCK] on 74HC595
int dataPin = 12;     // (12) DS [S1] on 74HC595

byte leds = 0;

void updateShiftRegister()
  digitalWrite(latchPin, LOW);
  shiftOut(dataPin, clockPin, LSBFIRST, leds);
  digitalWrite(latchPin, HIGH);

void setup()
  pinMode(latchPin, OUTPUT);
  pinMode(dataPin, OUTPUT);
  pinMode(clockPin, OUTPUT);

void loop()
  leds = 0;
  for (int i = 0; i < 8; i++)
    bitSet(leds, i);

I have also attempted to use an 8-segment digit display using the same shift register, also failing.

Is there something wrong that I am doing or could it be that the little chip is broken?

I accidentally discovered that when I swap the ground from pin 8 on the 595 to 5V, all the LEDs will light up.

Update : I got the same circuit in Tinkercad, some kind of arduino simulator. After dropping in the code and running the simulation, after it lights up the 5th LED, I get this warning :


However, when I change the 220 ohm resistors to something like 500 ohm resistors, that pop-up is gone. Could this be another reason of why my chip could be possible broken at the moment?

  • LEDs light up because of protection diodes on the inputs/outputs. You've got negative voltage on the outputs, so current flows. I'd worry about OE input, as it's hardwired to the ground. Protection diodes are for the small currents only so i'd expect burning protection diode and after that /OE might get destroyed. – KIIV Jan 5 at 14:33
  • BTW: code + schematics is working. – KIIV Jan 5 at 15:06
  • Okay... thanks for confirming that. Guess I'll have to buy a new shift register... the issue is I have no idea where in the town I can get electronics like that. Thank you, anyway! – hiimsoba Jan 5 at 15:09
  • And check if connections in breadboard aren't too loose. I've got one dead "pixel" because of it. – KIIV Jan 5 at 15:10
  • I tried the config in different places on the breadboard and with different wires... same result. – hiimsoba Jan 5 at 15:11

One omission I see is that you don't have a bypass capacitor across Vcc and Gnd of the 74HC595. Without it you would have inconsistent operation.

But if you had the power reversed on the chip then that will be the major problem and I'm sure the chip is damaged.

What I would do is put leds on the clock, data, and latch lines. And then make your delay very long, 1 second, so that you can see what the lines are doing. Just to confirm that you are getting the output that you expect. But first put a bypass cap across the chip.

Also double check that your leds are in the right way.

  • I'm quite a newb in the electronics field, may I ask what am I supposed to do, in a step-by-step fashion? I followed the guide I got with the kit and it didn't have any capacitors involved. The LEDs are the right way, I tried each one of them out before and they all light up. – hiimsoba Jan 5 at 14:14

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Not the answer you're looking for? Browse other questions tagged or ask your own question.