Hi! I am trying to use a 32GB SD card to log a lot of data in a remote location and I would like to completely fill the card with data when I do go get it back. And I got some questions while writing the code:
The SD card is formatted as FAT32, which I believe has a maximum file size of 4.3GB. Does it means that Arduino won't be able to append additional data into the same data file once it reaches 4.3GB? I cannot find anything related to maximum accessible file size in the SD library link: SD - Arduino Reference
Does the write time becomes slower as the data file grow in size?
I would like to check for the space remaining on the card such that I know when to stop the routine. But I believe that the SD library doesn't support it? (I cannot use any other newer library) I can check the size of the data file using size(), but the maximum returnable value is 4,294,967,295 bytes. What happen if my data file size goes above that many bytes?
What is the largest number an 8 bit uC can read ?
Can you address a 32 Gb SD card wirh a processor that can't read a number greater tha 4.3 billion ?
I know the SD card uses SPI . The problem is telling the SD card to read a number greater than an unsigned long.
How to tell it to read a number you can't express ?
Hi! I am trying to use a 32GB SD card to log a lot of data in a remote location and I would like to completely fill the card with data when I do go get it back.
A new file every day/week/month would solve that problem.
Does the write time becomes slower as the data file grow in size?
Of course it does.
I would like to check for the space remaining on the card such that I know when to stop the routine. But I believe that the SD library doesn't support it?
Can you address a 32 Gb SD card wirh a processor that can't read a number greater than 4.3 billion ?
No, but then that's not necessary. There may be 32000000000000 bytes on the card, but those bytes are arranged in blocks that are larger than one byte, so there are considerably fewer blocks.
The SD library doesn't support other than the FAT16 structure, though, so the point is moot.
SD.h is a wrapper for SdFat and both support FAT32 file systems.
The file size field in a FAT32 directory entries is 32-bits so the max file size is 0XFFFFFFFF bytes or 4,294,967,295 decimal. There is no way around this limit.
I have looked at Linux file systems like ext3 and the Microsoft exFAT file systems. I don't think they could run on Uno since these file system are far more complex than FAT32.