Unexpected 74HC595 behaviour

I have Arduino Uno from the Starter Kit. I have been following Paul McWorther Arduino tutorials on You Tube. I tried the exercise on using 74HC595 Shift Register to control 8 LEDs.

I have used the circuit digram from the tutorial but added a 100micro farad capacitor at IC pin 16 to GND, from reading other forums.

int latchPin=2;
int clockPin=3;
int dataPin=4;

int dt=100;
 
byte LEDs=0B10000000;

 
void setup() {
  // put your setup code here, to run once:
Serial.begin(9600);

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

}
 
void loop() {
  // put your main code here, to run repeatedly:


digitalWrite(latchPin,LOW);
shiftOut(dataPin,clockPin,LSBFIRST,LEDs);
digitalWrite(latchPin,HIGH);
delay(dt);

}

When uploaded the LEDs light sequentially and all remain HIGH.

if I reverse the LEDs order to =0B00000001; the they go out sequentially. They do this to the delay time.

Can anyone see where I am going wrong? Or is there something I don't understand about the 74HC595.

Did you mean a 100 nF (0.1 uF) ceramic bypass capacitor?

Please post a clear, close up photo of your wiring.

sorry yes , it is a 1J63

Thank you

Sorry, that picture does nothing for me. I do not see the cap connections, and cannot determine the orientation of the IC.

Triple check your wiring, and also check continuity of each connection, using your multimeter.

Please post a real wiring.

Thanks

The cap is on the chip pin 16 VCC to ground.

I was expecting all 8 LEDs to change at once but they seem to go in series and in time with the delay function

Also if a swap LSB and MSB with 0b00000001 they all go OUT or ON

I am on second chip and 3rd rewire. Is there a particular pin that could cause issue?

Swap clock and data pins?

According to Arduino reference...

Syntax
shiftOut(dataPin, clockPin, bitOrder, value)

Is wiring wrong? No wiring posted yet, only wall paintings.

Thanks. It was actually the Latch and Clock the wrong way around

Thanks every one for your help

Send thanks to the Chrystal ball.

This topic was automatically closed 120 days after the last reply. New replies are no longer allowed.