Arduino MEGA2560 and Sparkfun Openlog Micro SD card

I am trying to interface the sparkfun openlog micoSD chiphttp://www.sparkfun.com/products/9530 with an Arduino MEGA2560. I have not been able to send data to the SD card. I have the RX1 pin on the openlog wired to the TX1 port, the GND on the openlog to the GND, and VCC on the openlog to the 5V power port on the MEGA. I have no lights on the openlog chip and cannot get any data to write to the card, even when using the provided code.

/*
  4-14-2010
  Copyright SparkFun Electronics© 2010
  Nathan Seidle
  spark at sparkfun.com
  
  This is a simple test sketch for OpenLog. It sends a large batch of characters to the serial port at 9600bps.
  Original test was recomended by ScottH on issue #12:
  http://github.com/nseidle/OpenLog/issues#issue/12
  
  To use this sketch, attach RXI pin of OpenLog to TX pin on Arduino. Power OpenLog from 5V (or 3.3V) and GND pins from Arduino.
  After power up, OpenLog will start flashing (indicating it's receiving characters). It takes about 1 minute for 
  the sketch to run to completion. This will create a file that looks like this:
  
  ...
  6:abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ-!#
  7:abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ-!#
  8:abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ-!#
  9:abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ-!#
  #:abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ-!#
  1:abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ-!#
  2:abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ-!#
  ...
  
  The reason for creating these character blocks is it allows for a reader to very quickly scan the visible characters and 
  indentify any byte errors or glitches along the way. Every 9 lines we print a 10th line that has a leading character 
  such as # or !. These allow us to quickly see the different blocks of 10 lines.
  
  Note: Bootloading an Arduino will cause OpenLog to drop to command mode. This is because OpenLog is looking for the 
  escape character (ctrl+z). During a bootload, all sorts of characters get sent to the Arduino and therefore ctrl+z is likely
  to get sent to OpenLog. v1.51 of the OpenLog firmware fixes this potential error by requiring three escape characters.
  
*/

int ledPin =  13;    // LED connected to digital pin 13

void setup() 
{ 
  pinMode(ledPin, OUTPUT);     

  Serial.begin(9600); //9600bps is default for OpenLog
  //Serial.begin(57600); //Much faster serial, used for testing buffer overruns on OpenLog
  //Serial.begin(115200); //Much faster serial, used for testing buffer overruns on OpenLog

  delay(1000); //Wait a second for OpenLog to init

  Serial.println(); 
  Serial.println("Run OpenLog Test"); 
} 

void loop() 
{ 
  int testAmt = 10; 
  //At 9600, testAmt of 4 takes about 1 minute, 10 takes about 3 minutes
  //At 57600, testAmt of 10 takes about 1 minute, 40 takes about 5 minutes
  //testAmt of 10 will push 111,000 characters/bytes. With header and footer strings, total is 111,052
  
  //Each test is 100 lines. 10 tests is 1000 lines (11,000 characters)
  for(int numofTests = 0 ; numofTests < testAmt ; numofTests++)
  {
    //This loop will print 100 lines of 110 characters each
    for(int k = 33; k < 43 ; k++)
    {
      //Print one line of 110 characters with marker in the front (markers go from '!' to '*')
      Serial.print(k); //Print the ASCII value directly: ! then " then #, etc
      Serial.println(":abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ-!#");
      //delay(50);
  
      //Then print 9 lines of 110 characters with new line at the end of the line
      for(int i = 1 ; i < 10 ; i++)
      {
        Serial.print(i, DEC);
        Serial.println(":abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ-!#");
        //delay(50);
      }  

    if(digitalRead(ledPin) == 0)
      digitalWrite(ledPin, HIGH);
    else
      digitalWrite(ledPin, LOW);

    }
  }

  unsigned long totalCharacters = (long)testAmt * 100 * 110;
  
  Serial.print("Characters pushed: ");
  Serial.println(totalCharacters);  
  Serial.print("Time taken (s): ");
  Serial.println(millis()/1000);
  Serial.println("Done!");
  
  while(1)
  {
    digitalWrite(ledPin, HIGH);   // set the LED on
    delay(1000);                  // wait for a second
    digitalWrite(ledPin, LOW);    // set the LED off
    delay(1000);                  // wait for a second
  }
}

Does anyone have any advice? Think its possible that the chip is fried or dead on arrival? Or am I missing something?

Thanks in advance...I'm new to this stuff and feel like I'm driving myself crazy :blush:

I have the RX1 pin on the openlog wired to the TX1 port

Then you are writing to the wrong serial port. You should be using Serial1 instead of Serial.

I was under the impression that Serial defaulted to Serial 1; however, I changed it to Serial1 and it still doesn't work :frowning:

try swapping the RX/TX wires round.

Having the same issue with the UNO. Here's the response from Sparkfun. Didn't solve my issue, but maybe it helps you out.

*If you are getting no LEDs at all it could be a power issue. Double check your power connections and try running the board at 5V instead of 3.3V. All of our boards are tested so I doubt it came without firmware (although I don't know if the test procedure involves anything other than checking the hardware on this board). But once the board has power even if its not recognizing the uSD card it should flash the LEDs. It also sounded like when you got it it was flashing the LEDs at startup but stopped somewhere along the way. Also if you had your Open Log connected to the Arduino when you uploaded the code that could cause problems, it shouldn't erase the code, but it could put it in a weird state. If this is the case try the safety mechenism mentioned below. *
The fact that you don't have a configuration file on the SD card means that the OpenLog didn't put one there and so never recognized the card, even when you were getting blinking LEDs.
If you get OpenLog stuck into an unknown baudrate, there is a safety mechanism built-in. Tie the RX pin to ground and power up OpenLog. You should see the LEDs blink back and forth for 2 seconds, then blink in unison. Now power down OpenLog and remove the RX/GND jumper. OpenLog is now reset to 9600bps with an escape character of ctrl+z sent three consecutive times.