SPI not passing values?

test_shift2 works, however, with my main program (dial_board_Rev2), I get the boot-up sequence, then the display goes blank. If I unplug the controller, then all 8's flash up on the display.

The serial printlines in getDig() print off the correct ints for the value to be displayed, so I know alphaNumToInt() is working correctly, I just don't understand why 2 batches of SPI transfers work and one doesn't.

Using a bare 328 on a PCB with crystal, using pro/pro-mini board selection and 3 daisy-chained TPIC6B595 shift registers to drive 3 7-segment LED panels.

test_shift2.ino (8.78 KB)

dial_board_Rev2.ino (12 KB)

Trying a couple things:

void getDig(char dig1, char dig2, char dig3){

currentMillis = millis();

if (currentMillis - previousMillis > 1000){

previousMillis = currentMillis;

digitalWrite(slaveSelectPin,LOW);
SPI.transfer(alphaNumToIntPrd(dig1));
Serial.println(alphaNumToIntPrd(dig1));
delay(500);
digitalWrite(slaveSelectPin,HIGH);

digitalWrite(slaveSelectPin,LOW);
SPI.transfer(alphaNumToInt(dig2));
Serial.println(alphaNumToInt(dig2));
delay(500);
digitalWrite(slaveSelectPin,HIGH);

digitalWrite(slaveSelectPin,LOW);
SPI.transfer(alphaNumToInt(dig3));
Serial.println(alphaNumToInt(dig3));
delay(500);
digitalWrite(slaveSelectPin,HIGH);

}

}

only displays the rightmost (master) digit as an 8 and doesn't change

void getDig(char dig1, char dig2, char dig3){

currentMillis = millis();

if (currentMillis - previousMillis > 1000){

previousMillis = currentMillis;

digitalWrite(slaveSelectPin,LOW);
SPI.transfer(alphaNumToIntPrd(dig1));
Serial.println(alphaNumToIntPrd(dig1));
SPI.transfer(alphaNumToInt(dig2));
Serial.println(alphaNumToInt(dig2));
SPI.transfer(alphaNumToInt(dig3));
Serial.println(alphaNumToInt(dig3));
delay(500);
digitalWrite(slaveSelectPin,HIGH);

}

}

shows triple 8's that don't change- even though switches are set to position "1" and serial prints return 118, 118, 119.

nevermind. I figured it out.

for(int i = 5; i<13; i++){
pinMode(i, INPUT);
digitalWrite(i, HIGH);
}

for(int i = A0; i<=A7; i++){
pinMode(i, INPUT);
digitalWrite(i, HIGH);
}

and SPI doesn't agree.

for(int i = 5; i<9; i++){
pinMode(i, INPUT);
digitalWrite(i, HIGH);
}

for(int i = A0; i<=A7; i++){
pinMode(i, INPUT);
digitalWrite(i, HIGH);
}

and SPI does