SD card write problem - please help

Hello,

I'm new of Arduino world. Trying to assemble a simple data-logger.

So, I have an SD card shield:

http://cgi.ebay.com/ws/eBayISAPI.dll?ViewItem&item=270716733202&ssPageName=STRK:MEBIDX:IT

and SdFat
http://code.google.com/p/sdfatlib/

Running SdFatInfo from examples gives:

Card type: SD1


Manufacturer ID: 1B

OEM ID: SM

Product: SD   
Version: 1.0

Serial number: 1221333468

Manufacturing date: 1/2008



cardSize: 1987584 (512 byte blocks)

flashEraseSize: 128 blocks

eraseSingleBlock: true


part,boot,type,start,length

1,0,6,249,1987335

2,0,0,0,0

3,0,0,0,0

4,0,0,0,0


Volume is FAT32

blocksPerCluster: 8

clusterCount: 247928

fatStartBlock: 281

fatCount: 2

blocksPerFat: 1937

rootDirStart: 2

dataStartBlock: 4155

Data area is not aligned on flash erase boundaries!

Also file reading from SD card works well.

But problems starts when I'm writting data to card. Filesistem looks broken when I'm connect SD to my laptop and resulting file have 0 bytes length.

The same result I had with standard SD library with arduino-0022.

Is it hardware problem?
I suggest, SD shield works wrong.

Any ideas?
Please help.

Does it work with the included Examples->SD->Datalogger sketch? If so, perhaps something is wrong with your program. If not, perhaps the card or card formatting is faulty. Is your file name within the 8.3 limits?

Thanks for a quick answer.
DataLogger example could initialize SD card and give a nice output to SerialMonitor.

When I connect SD card to computer I have output:

ls: cannot access /media/disk/@ .Ç@: Input/output error
total 3698976
-rwxr-xr-x 1 troll root  541097984 1982-01-08 03:01 ?.??
-rwxr-xr-x 1 troll root 1082130433 1984-01-16 05:02 ??.???
-r-xr-xr-x 1 troll root 2147483906 1988-01-01 09:04 ???.???
-rwxr-xr-x 1 troll root      66052 1996-02-01 16:00 ????.???
-rwxr-xr-x 1 troll root   16909320 2012-04-01 01:00 ?????. ??
d????????? ? ?     ?             ?                ? @ ?????.Ç@
-rwxr-xr-x 1 troll root          0 2000-01-01 01:00 DATALOG.TXT

The card was formatted before running DataLogger (I'd tryed Far16 and Fat32 fs)