chipKIT® Development Platform

Inspired by Arduino™

Standard SD Library and chipKIT UNO32

Created Fri, 13 Jul 2012 08:35:10 +0000 by settorezero


Fri, 13 Jul 2012 08:35:10 +0000

I'm using the chipKIT UNO32 with a microSD adapter (this: Card used is a microSD HC, 4Gb, FAT32-formatted.

I'm using 2 demos from MPIDE (Examples -> SD)

The CardInfo demo works, but memory sizes are not right and showed as negative numbers.

The ReadWrite demo doesn't works, it stops at "Initializing SD card...".

I notice that CardInfo example uses a different way to initialize the card:

card.init(SPI_HALF_SPEED, 4)

and the ReadWrite example uses this:


(4 is the IO used as Card Select in both examples)

If I use the card.init(SPI_HALF_SPEED, 4) in the "ReadWrite" example instead of SD.begin(4), after "Initializing SD card..." I got "initialization done." but example stops here and file is not created.

Someone encountered the same problem?


Sat, 14 Jul 2012 18:24:33 +0000

I've buyed a microSD 2Gb. Formatted in FAT16. Now the demo (SD->ReadWrite) stops at "Writing to test.txt...". File is created but nothing in it (0Kb). I've tried to format the microSD in all the ways. Nothing to do. I think the SD adapter works since initialization is done and file is created. Anyone can help me?


Mon, 16 Jul 2012 09:48:12 +0000

If the numbers are wrong it would seem the SD card is an unsupported one?

Can you write to an existing file? Can you read from a file? Which version of the MPIDE are you using?