void pulseGSCLK() {
//ultra fast pulse trick, using digitalWrite caused flickering
PORTB=0x01; //bring PORTB0 high (pin 8), other ports go low [0x01 does only pin 8, 0x21 also lifts pin 13]
//16nanosecs is the min pulse width for the 5940, but no pause seems needed here
PORTB=0x20; //keep pin13 high [0x00 would be all low]
}
Wundert mich nicht, dass der SPI nicht mehr funktioniert. Du setzt hier einen ganzen Port für einen einzigen Pin. Ändere das in:
void pulseGSCLK() {
//ultra fast pulse trick, using digitalWrite caused flickering
PORTB |= 0x01; // set pin 8 HIGH
PORTB &= 0xFE; // set pin 8 LOW
}
und Deine SD-Karte wird wieder funktionieren.