Connecting an SD card to a Due: Failed

I connected a Due to a SD Card Shield by SEED Studio v. 3.1 using jumpers. A picture of the result is attached. Because the SPI pins should only get 3.3V max I connected the SD Shield to the 3.3 V pin of the Due and left the 5V pin unconnected.

I slightly modified the example software that comes with the IDE v 1.5.2. That code that includes details on the pin connections is:

  SD card datalogger after the Arduino Examples in the SD Card Library with the 1.52 program version
 This example shows how to log data from three analog sensors 
 to an SD card using the SD library.
 The circuit:
 * analog sensors on analog ins 0, 1, and 2
 * SEEED SD Card Shield 3.1 attached to Due SPI bus as follows:
 ** MOSI - pin A26
 ** MISO - pin A25
 ** SCK - pin A27
 ** CS - pin 4
 ** Power: 3.3V from Due
13 Jul 2013
 This example code is in the public domain.

#include <SPI.h>
#include <SD.h>

const int chipSelect = 4;  // On the SD shield, CS is pin 4 for the Due.

void setup()
 // Open serial communications and wait for port to open:
   while (!Serial) {
    ; // wait for serial port to connect. Needed for Leonardo only

  Serial.print("Initializing SD card...");
  // Set default chip select pin CS to output:
  pinMode(4, OUTPUT);
  // see if the card is present and can be initialized:
  if (!SD.begin(chipSelect)) {
    Serial.println("Card failed, or not present");
    // don't do anything more:
  Serial.println("card initialized.");

void loop()
  // make a string for assembling the data to log:
  String dataString = "";

  // read three sensors and append to the string:
  for (int analogPin = 0; analogPin < 3; analogPin++) {
    int sensor = analogRead(analogPin);
    dataString += String(sensor);
    if (analogPin < 2) {
      dataString += ","; 

  // open the file. note that only one file can be open at a time,
  // so you have to close this one before opening another.
  File dataFile ="datalog.txt", FILE_WRITE);

  // if the file is available, write to it:
  if (dataFile) {
    // print to the serial port too:
  // if the file isn't open, pop up an error:
  else {
    Serial.println("error opening datalog.txt");

The output of this sketch shows that the SD card is not recognized:

ror opening datalog.txt
error ?¹¥¹datXëë¹txt
error oþInitializing SD card...Card failed, or not present
error opening datalog.txt
error opening datalog.txt
error opening datalog.txt
error opening datalog.txt
error opening datalog.txt
error opening datalog.txt

Is there an error(s) in the sketch? Is there a better library? Any ideas ??

What does that tape on the Due's chip say?

It reads: "Broken?". Analog channel 5 does not work. To make sure I repeated the test with a new Due "out of the box"- I got the same results.