SD Card 8 Gig works 40 Gig no

I have an Ethernet Mega that will read an 8 Gig SD Card fine but cannot read a 40 Gig.
I have tried reformatting the 40 to FAT32 using the windows reformatter (Windows 7) with no help. Under Windows the 40 Gig reads fine.
Is this a known problem?
Solution?
Thanks.

What SD card library are you using?
fat16lib's, or something else?
https://code.google.com/p/sdfatlib/downloads/detail?name=sdfatlib20110702.zip&can=2&q=

I think it was the one directly from Arduino. Not sure. Does that one work?

No - I am using that one GitHub. Does it have a problem?

I haven't tried cards that big.
You could PM fat16lib and ask if he's tried it that size card.
Check his recent posts too, he put up some test results very recently.

Thanks - I will PM him.
The way things are going 40 Gig will be the only thing you can buy soon...

I don't know about that, I see plenty of 8 & 16G drives on the shelves.
40 seems like an odd intermediate size.

Well as I look at it - its 32 GB.
I tried to format it with SD's formatter and it failed. I guess I might simply have a bad card although it works fine under Windows.

CrossRoads:
I haven't tried cards that big.
You could PM fat16lib and ask if he's tried it that size card.
Check his recent posts too, he put up some test results very recently.

Could you perhaps put up the link to fat16lib's results please?

I too am currently using an 8GB SDHC card, but will need bigger very soon, I was wondering what the biggest size is that SD.h can handle....

What other libraries are out there that offer SD.h functionality for bigger cards?

If for example 16GB is the limit, how would you go about dis-mounting, removing a card and then mounting another one without powering down the 'duino? Is this even possible?

Thanks for any possible assistance.

Here is fat16lib
http://code.google.com/p/fat16lib/

CrossRoads:
Here is fat16lib
Google Code Archive - Long-term storage for Google Code Project Hosting.

Hi CrossRoads,

Thanks for that, but that was not actually what I meant, I was referring to your previous post "Check his recent posts too, he put up some test results very recently." That was the link I was after if you still have it...

Regards,

Graham

SdFat supports 32 GB SDHC cards. SdFat is here Google Code Archive - Long-term storage for Google Code Project Hosting..

SD.h also supports 32 GB SDHC cards.

Remember FAT32 is limited to files no larger than 4 GB so you will need eight or more files to fill a 32 GB card.

Recent versions of SdFat also supports SDXC cards when formatted FAT32 with the SdFat/examples/SdFormatter sketch. FAT32 is not the standard format for SDXC cards but PCs, Macs, and Linux accept FAT32 formatted cards.

I have tested with 64 and 128 GB SDXC cards.

fat16lib:
Remember FAT32 is limited to files no larger than 4 GB so you will need eight or more files to fill a 32 GB card.

Recent versions of SdFat also supports SDXC cards when formatted FAT32 with the SdFat/examples/SdFormatter sketch. FAT32 is not the standard format for SDXC cards but PCs, Macs, and Linux accept FAT32 formatted cards.

I have tested with 64 and 128 GB SDXC cards.

Hi fat16lib,

How about 678 folders in root, each folder containing upto but no more than 400 files each.....approximately 29GB and 271,200 files..... all files same size 115200 bytes...

My current setup is 8GB SDHC with 144 folders in root, each folder contains exactly 400 files of 115200bytes.

128GB SDXC would be awesome, and negate my previous question of dis-mounting a card, and mounting another one on a live system...

Am I correct in thinking random access of directory entry 1000 is slower than directory entry 500, due to sequential access? Sorry for the newb type questions if this is supposed to be obvious. I have a general understanding of FAT32, but not the Arduino implementation. The reason I ask, when I access some of the previously mentioned files, access times can vary by upto 40ms I have seen, but repeated access of the same file, will yield the same access time, so is this slower access because it reads all entries until it locates the one requested?

Regards,

Graham

FAT32 allows 65,534 files/directory entries in a folder so you will be well under the limits.

Directories are not sorted so open just scans the directory file and time to open a file depends where it is located. A variation of 40 ms sounds about right for a directory with 400 files.

I have a general understanding of FAT32, but not the Arduino implementation.

The big problem is lack of memory on Arduino so very little is cached in memory. This is why open is slow. A PC or Mac caches huge amount of directory data.

That is a potential significant obstacle to my current project overcome. Many thanks fat16lib. :slight_smile: 8)