Go Down

Topic: (several...) SD just, simply, not working! [SOLVED, tnx fat16lib] (Read 14461 times) previous topic - next topic


My remark is related to "4050" - the old cmos one. The 74HCT and friends are an another story.
Thanks for clarification..


Found the 4050 "fix" prototype.  This is with the a 1k resistor to the 50 ohm terminator.  Remember my scope is old and has a 2-3 ns rise time.  I set the scope at 20 X


Wow. Thank you guys for the overnight support!

Pito, apparently the current schematic is pretty much what you've posted. I found this very picture too, but my limited knowledge doesn't let me to confirm to be the carbon copy of my current board. Seems real close, though.  :smiley-sweat:
I've also got the idea of buffering, but it's probably beyond my current project, time and capabilities.
Thank you fat16lib for information, too.

Having seen the schematics and components you both recommended, though, while I agree that it's everyone's responsibility to decide what one's need to fit his/her purpose as a newbie I still hold a very straightforward unanswered question (definitively unasked :)) that I believe others might be advantaged as well:

"Which cheap and easy to be handled by software SD module would you guys recommend to start with an Arduino UNO board? Does truly the Adafruit Assembled Data Logging Shield worth those $5 more of the Arduino board itself?"

I might sound cheap, but the Raspberry PI, although a different device, seems to me a better bargain with included SD and pin in/out. Now, shoot on me :)

[for the records: the SD module has been trashed]


Mar 01, 2014, 05:51 pm Last Edit: Mar 01, 2014, 05:55 pm by fat16lib Reason: 1
Here is a cheap card that seems to work.  It has level shifters.  I worry about sharing with other SPI devices since I think it buffers MISO and may not release MISO when chip select goes high.


If you are using only the SD on SPI is works.  Some of these cards have a newer version /date so may be different.


On my way  8)

Thank you, I'll try once it gets here...


Apr 21, 2014, 09:39 am Last Edit: Apr 21, 2014, 09:47 am by greenestmike Reason: 1
A couple of months later, and few trees planted I realized that., apparently, in my house no Arduinos are allowed to write on a SD card.

Fat16lib, I've got the "Micro SD Storage Board Mciro SD TF Card Memory Shield Module SPI For Arduino D9" as recommended, with no result other than much, much frustration.

Tried to format the card using SDformatter4, tried to format using Arduino, tried shamanic and tribal rites with no success.

What could be, for instance, the issue related to:

SD error: c,ff

upon formatting a microSD using the very standard SdFormatter provided with SdFat library?

Thanks in advance...


This following is SdInfo printout, I might suspect the microSD to be defective.
Quite strange though, as it's apparently functional for my daily basis needs. I might invest $10 for a new one.

init time: 3 ms

Card type: SDHC

Manufacturer ID: 0X1C
Product: USD 
Version: 1.0
Serial number: 2013932036
Manufacturing date: 10/2008

readCSD failed
SD errorCode: 0X10
SD errorData: 0X3F

type any character to start


Quite strange though, as it's apparently functional for my daily basis needs.

This is can happen.  SD cards function in two entirely different modes. , SPI mode and SDIO mode.  1-bit SPI mode uses a different protocol than 4-bit SDIO mode.  Few people use cards in SPI mode and a few cards just don't work correctly in SPI mode.

You problem is not a formatting problem.  SD error: c,ff  is at the lowest SPI protocol level.


Apr 23, 2014, 09:21 pm Last Edit: Apr 23, 2014, 09:23 pm by greenestmike Reason: 1
Thank you fat16lib, you're precious as always. Really.

Now I believe is just a matter of buying some other cards and test them all.
By any chance, don't you have any brand/model to recommend? (you know... just to make sure I won't go buying clueless, as I am...)

Greetings from northern Italy ;)


I Have good luck with SanDisk and Transcend micro SD cards.  I don't like Kingston but I haven't tried recent cards.

Don't spend a lot on high end cards.  They are optimized for the 4-bit mode of phones. Only SPI mode matters.

I use this 8 GB class 4 card www.amazon.com/gp/product/B000WH6H1M.  Here is a benchmark.

Type is FAT32
File size 5MB
Buffer size 100 bytes
Starting write test.  Please wait up to a minute
Write 174.54 KB/sec
Maximum latency: 303804 usec, Minimum Latency: 84 usec, Avg Latency: 567 usec

Starting read test.  Please wait up to a minute
Read 310.96 KB/sec
Maximum latency: 2812 usec, Minimum Latency: 84 usec, Avg Latency: 315 usec

Here is a 4GB class 6 Transcend card http://www.amazon.com/Transcend-Class-microSDHC-Memory-TS4GUSDHC6/dp/B0013DXVYK/. This is an old card so you may want to buy a newer class 10 card.
Here are performance numbers

Type is FAT32
File size 5MB
Buffer size 100 bytes
Starting write test.  Please wait up to a minute
Write 201.74 KB/sec
Maximum latency: 197332 usec, Minimum Latency: 84 usec, Avg Latency: 490 usec

Starting read test.  Please wait up to a minute
Read 308.20 KB/sec
Maximum latency: 2888 usec, Minimum Latency: 84 usec, Avg Latency: 318 usec

I plan on trying this card http://www.amazon.com/Transcend-Class-microSDHC-Memory-TS16GUSDHC10/dp/B004TA0AZM in 8 and 16 GB.

Here is the result for a 4 GB class 4 micro SD Kingston card..

Type is FAT32
File size 5MB
Buffer size 100 bytes
Starting write test.  Please wait up to a minute
Write 70.97 KB/sec
Maximum latency: 188880 usec, Minimum Latency: 84 usec, Avg Latency: 1403 usec

Starting read test.  Please wait up to a minute
Read 210.81 KB/sec
Maximum latency: 4472 usec, Minimum Latency: 84 usec, Avg Latency: 468 usec


I worry that the problem may not be your micro SD card.  It is very rare for a card to work in 4-bit mode and fail in SPI mode.


To make things clear, I'd rather plant a tree other than playing with these tiny cards :) but, being the nowaday world quite techie, I have to face the inevitable and deal with these matters time to time  :~

Card reader is NOW:
sorry for the specs in chinese.

while the tested card is a Transcend MicroSD class 4, 8GB.

For the records, the above configuration apparently does NOT the job.

Might the Force be with you.
Please, PLEASE, wish me the same :) :)


Here is a photo of a Catalex breakout with a 4 GB class 4 Transcend micro SD.  Red and black to 5V and gnd.

White pin 13, blue pin 12, yellow pin 11, and green pin 10.

Here is SdInfo output with no mods to the sketch.


SdFat version: 20131225

type any character to start

init time: 756 ms

Card type: SDHC

Manufacturer ID: 0X74
Product: USD 
Version: 1.0
Serial number: 168927237
Manufacturing date: 4/2011

cardSize: 4035.97 MB (MB = 1,000,000 bytes)
flashEraseSize: 128 blocks
eraseSingleBlock: true

SD Partition Table

Volume is FAT32
blocksPerCluster: 64
clusterCount: 122912
freeClusters: 121151
freeSpace: 3969.88 MB (MB = 1,000,000 bytes)
fatStartBlock: 14462
fatCount: 2
blocksPerFat: 961
rootDirStart: 2
dataStartBlock: 16384

type any character to start


Uh fat16lib, thank you!
First at all, congratulations for the picture, very well taken. You're probably an enthusiast photographer as well.

As for my setup, while at first failing on the pin 10 connection (WAS mistakenly wired to pin number 4) is NOW perfectly resembling your* and, not surprisingly, it finally works!

(*) Except for colors, but Arduino works on a 10bit basis, and I assume it will see on gray levels anyway :)

So, shame on me but good to be reported for further references, and to make sure no one will be stressed on the same point.

1. Card readers have to be buffered. Don't ask me why, but make sure there's a little extra component between an Arduino port and the microSD card whatsoever. Spare much frustration and get that reader.
2. IF you connect your microSD board straight onto Arduino, pin have to be 10-11-12-13 while some examples specifically set pin 4 as chipSelect (ReadWriteSdFat is among those). Forget pin number 4, that's apparently to be used with some other shields on the way; make sure to connect 10~13, set up the code properly and off you go.
3. Have a beer.

Go Up