SD card and SCK pin

Just wonder if it is possible to use a different output than D13 for the SCK pin for a micro SD card adapter (SPI interface)?

I have tried to modify the Sd2Card.h file so that it used pin 8, but then the card adapter does not work.

I added the following lines to setup() to verify which pin it use:

Serial.print(F("SPI_SCK_PIN: "));
Serial.println(SPI_SCK_PIN);

It say pin 8 when I changed the header file. When reverting the changes it say 13.

You don't say which board you are using. Some AVRs have several hardware SPI ports. Others, like the 328p, have only one. In the case of the 328p, the hardware SPI port uses a dedicated set of pins for MOSI, MISO & SCK. You can't change these.

However, if you are really stuck and do need to change pins (for whatever reason), then I think your option is to use a software SPI port to bit bang the SPI signals. You can probably use whatever pins you like.

Thanks for the reply. Then it was as I expected. Will look into software SPI and see if I can use it.