I don't live on the arduino reservation, I don't know $^*@ from libraries and I can live without "shields". It's a nice platform, but you can go your own way, and I do.
I think that the Latch should be kept low. When it's desired to transfer the data to the storage register then the Latch should be brought high and right back low (ting, ting.)
Here is some code that I wrote early on while working out my display board's programming. The orthodoxy may get loud and chide me for not using "shiftOut", and that's OK (I just don't want to.)
Maybe it'll confuse you more than help.
I used different pins for datapin, clockpin, and latchpin.
So, for what it's worth (hold your cat calls) ?
byte infobyte = 0; // byte to "shiftout" ! ! !
byte idxbit = 0; // indexed bit to mask out
byte infobit = 0;
const int datapin = 3; // to IC p14
const int clockpin = 5; // to IC p11
const int latchpin = 7; // to IC p12
void setup()
{
pinMode(datapin, OUTPUT);
pinMode(clockpin, OUTPUT);
pinMode(latchpin, OUTPUT);
digitalWrite(datapin, LOW);
digitalWrite(clockpin, LOW);
digitalWrite(latchpin, LOW);
}
void loop()
{
idxbit = 0;
infobyte = B01010101;
while (idxbit <= 7)
{
shiftroutine();
}
latchcycle();
// ---0---0---0---0---0---
idxbit = 0;
infobyte = B10101010;
while (idxbit <= 7)
{
shiftroutine();
}
latchcycle();
// ---0---0---0---0---0---
idxbit = 0;
infobyte = B11000011;
while (idxbit <= 7)
{
shiftroutine();
}
latchcycle();
// ---0---0---0---0---0---
idxbit = 0;
infobyte = B00111100;
while (idxbit <= 7)
{
shiftroutine();
}
latchcycle();
// ---0---0---0---0---0---
}
void clocktoggle()
{
digitalWrite(clockpin, HIGH);
digitalWrite(clockpin, LOW);
}
void latchcycle()
{
digitalWrite(latchpin, HIGH);
digitalWrite(latchpin, LOW);
delay(500); // *** this is the dwell time ***
}
void shiftroutine()
{
infobit = bitRead(infobyte, idxbit);
digitalWrite(datapin, infobit);
clocktoggle();
idxbit++;
}