I have a sketch project that is working well with a 2G MicroSD card that I bought locally for a high price. After shopping around, I was able to locate a much better price on 1G cards and bought a bunch of them. When I use the new 1G cards though, they do not seem to work. The most interesting part is that both cards respond well to the example SD library sketch of "CardInfo" and display the proper parameters and directory readings. When I attempt to run any sketches (canned examples or my own) that need to open a file and write to the newer 1G card, it fails. When I say fail, I will see a series of files created in some cases, but they all have zero bytes in size. Some varieties of the SD libraries simply report an error when attempting to initialize the card. The exact same sketch works on the 2G card without issue. I tried a few other varieties of the available SD libraries, such as FAT16. I also tried formatting the new 1G card with the official SDFormatter utility to ensure I had a good format, but still no luck. The cards do seem to have a FAT16 filesystem on them from the factory.
Other things I tried: insert delay(200) statements around the operations that write to the card to simply slow the logic down. Changed the speed of the compiled project 1MHz, 2MHz, 8MHz & 16MHz.
The new 1G cards do work with a USB adapter on my desktop computer as well as working well in my Android device. I can read/write/delete to the card with no issues. My suspicion is that these newer cards do not perform well with an SPI interface, but work fine for MMC mode. Any thoughts are welcome.
Thanks.
John
I'm reaching out to see if there are any other options or suggestions to try to get these to work that I've not tried yet. Perhaps I simply got what I paid for, but I'd like to find a way to use them since I did end up with 100 of them.