Problem with assembling an SPI bus for LCD&SD

Hey guys,
I'm trying to integrate an LCD to a project with an existing micro sd card module that is already hooked up correctly. Now I'm trying to integrate the Sparkfun color LCD shield (the Nokia 6100 display). When I run the following piece of code (the setup section is the relevant part here), the LCD module seems to responds up to the moment when I'm start using the sd card. After that, the LCD doesn't responds to any display command.
I suspect that the problem is in the SPI communication rather than in the LCD itself, but I can't pinpoint the problem and don't know how to surmount it.
Please help me overcome this problem, I'll be so grateful!
This is the code in which I don't know what the problem is:

#include <SD.h>
#include <SPI.h>
#include <SparkFunColorLCDShield.h>
int CS_PIN = 10; // Chip Select pin for the SD
int LCD_SSpin=9; // Chip Select pin for the LCD
LCDShield lcd;
int buttonPins[3] = {3, 4, 5};
File file;
void setup()
{
  Serial.begin(9600);
  // LCD initialization:
  for (int i = 0; i < 3; i++)
  {
    pinMode(buttonPins[i], INPUT);
    digitalWrite(buttonPins[i], HIGH);
  }
  lcd.init(PHILIPS); // This initialization function turns on the communication with the LCD
  lcd.contrast(-51);
  lcd.clear(BLACK);
  lcd.setStr("First", 30, 30, WHITE, BLACK); // This line executed correctly so "First" was displayed on the LCD
  delay(1000);
  lcd.clear(BLACK);
  digitalWrite(LCD_SSpin, HIGH); // Turn off the communication with the LCD
  initializeSD(); // This initialization function turns on the communication with the SD
  createFile("test.txt");
  writeToFile("This is sample text!");
  closeFile();
  openFile("prefs.txt");
  String WORD;
  unsigned int len=10;
  char buf[10];
  WORD=readLine();
  closeFile();
  WORD.toCharArray(buf,len);
  Serial.println(buf);
  // Up to now, everything works pretty well.
  digitalWrite(CS_PIN, HIGH); // Turn off the communication with the SD
  digitalWrite(LCD_SSpin, LOW); // Turn on the communication with the LCD
  lcd.setStr("Second", 30, 30, WHITE, BLACK); // This line does not executed correctly at all, the "Second" wasn't displayed on the LCD :(
  lcd.setStr(buf, 50, 50, WHITE, BLACK); // This line also does not executed correctly, probably because of the same esoteric reason.
  delay(1000);
}
void loop()
{
}
void initializeSD()
{
  Serial.println("Initializing SD card...");
  pinMode(CS_PIN, OUTPUT);
  if (SD.begin())
  {
    Serial.println("SD card is ready to use.");
  } else
  {
    Serial.println("SD card initialization failed");
    return;
  }
}

int createFile(char filename[])
{
  file = SD.open(filename, FILE_WRITE);

  if (file)
  {
    Serial.println("File created successfully.");
    return 1;
  } else
  {
    Serial.println("Error while creating file.");
    return 0;
  }
}

int writeToFile(char text[])
{
  if (file)
  {
    file.println(text);
    Serial.println("Writing to file: ");
    Serial.println(text);
    return 1;
  } else
  {
    Serial.println("Couldn't write to file");
    return 0;
  }
}

void closeFile()
{
  if (file)
  {
    file.close();
    Serial.println("File closed");
  }
}

int openFile(char filename[])
{
  file = SD.open(filename);
  if (file)
  {
    Serial.println("File opened with success!");
    return 1;
  } else
  {
    Serial.println("Error opening file...");
    return 0;
  }
}

String readLine()
{
  String received = "";
  char ch;
  while (file.available())
  {
    ch = file.read();
    if (ch == '\n')
    {
      return String(received);
    }
    else
    {
      received += ch;
    }
  }
  return "";
}

Any help will be highly appreciated :slight_smile:
Thanks!

Links to the hardware (links, not just URLs - use the link icon) and libraries are going to be necessary to help you understand what the problem is.

What do you mean? that I shall provide links of the sources from which I downloaded the LCD library? (this is the only library that I took from outside, the reat are traditional libraries that come with the arduino software)
Or do you mean I should present how I hooked up the circuit?
Anyway this is the display I used Color LCD Shield Quickstart Guide - SparkFun Electronics and this is the source of its library GitHub - sparkfun/ColorLCDShield: This is an Arduino library for SparkFun's Color LCD Shield

The LCD shield uses certain pin numbers, depending on which Arduino it is attached to. Unfortunately, the library doesn't make it clear which pins are used. The values are bits in a port.

It appears to be bit-banging SPI on the hardware SPI pins. That is not going to let it play well with other SPI devices.

PaulS:
It appears to be bit-banging SPI on the hardware SPI pins. That is not going to let it play well with other SPI devices.

That is very weird, because the guys from Sparkfun wrote (in the tutorial I linked to) that "You should be safe if you want to set up an SPI bus, using the DIO and SCK pins"...

So this isn't possible and should I give up?