Here's my working code example:
#include <SPI.h>
#define LATCH D8
SPISettings tpic6c595(10000000UL, MSBFIRST, SPI_MODE0);
byte digitPattern[10] = {
0b0111111,
0b0000110,
0b1011011,
0b1001111,
0b1100110,
0b1101101,
0b1111101,
0b0000111,
0b1111111,
0b1101111
};
void setup() {
pinMode(LATCH, OUTPUT);
Serial.begin(115200);
SPI.begin();
SPI.beginTransaction(tpic6c595);
}
void loop() {
for (int i = 0; i <= 9; i++) {
unsigned long startTime = micros();
SPI.transfer(digitPattern[i]);
Serial.println(micros() - startTime);
digitalWrite(LATCH, HIGH);
digitalWrite(LATCH, LOW);
delay(500);
}
}
As you can see, I change the latch from high to low with no delay between. What's more, I am running this on a esp8266 @ 80MHz.
*** EDIT **** You have no SPI.begin(). Maybe that's why your code does not work correctly? I'm not certain that using SPI.beginTransaction() means you don't also need to use SPI.begin().