Go Down

Topic: can not read from sd card but initialize (Read 895 times) previous topic - next topic

3rdinger

I am using a sd-card reader like https://www.geeker.co.nz/accessories/catalex-micro-sd-tf-card-module.html with a due board. After some problems in wiring I think I have done it correctly now by using the SPI-pins instead of pin digital 10-13:

CS   -   digital 4
SCK   -   SCK (SPI-pins)
MOSI   -   MOSI (SPI-pins)
MISO   -   MISO (SPI-pins)
VCC   -   5V (SPI-pins)
GND   -   GND (SPI-pins)

according to:
http://www.arduino-projekte.de/images/Module/SDCARD/Arduino_DUE_SPI.png

By the way: I have also connected an audio module:
https://www.amazon.de/LM386-Audio-Verst%C3%A4rker-Modul-200/dp/B00JP82DO4

When I run the example SD => CardInfo I get:
Code: [Select]
Initializing SD card...Wiring is correct and a card is present.

Card type: SDHC

Volume type is FAT16

Volume size (bytes): 3991404544
Volume size (Kbytes): 3897856
Volume size (Mbytes): 3806

Files found on the card (name, date and size in bytes):


No files are displayed although the are two files (test.wav and test.txt) on it.

When I run the example SD => listfiles I also get no files.

When I run the example Audio => SimpleAudioPlayer I get:
Code: [Select]
Initializing SD card... done.
error opening test.wav


- I found in this forum to add:
Code: [Select]
pinMode(4, OUTPUT);
digitalWrite(4, HIGH);

but that did not solve the Problem.

- I found in this forum not to use the OS formatter but the formatter from sdcard.org
https://www.sdcard.org/downloads/formatter_4/index.html
But that formatter uses all of the 8 GB and then the reader does not initialize.

- I found in this forum that maybe the power supply of the USB-connection is not sufficient… But if it is insufficient it should not do anything (init, read info), right?

Nick_Pyner

Using a decent wall wart is always a good idea. Although you get something, anything can happen if the supply is marginal. Have you tried writing to the SD using Arduino?

rpt007

#2
Jan 11, 2017, 12:36 am Last Edit: Jan 11, 2017, 12:36 am by rpt007
Try to re-format your SD card again with the SDFormatter.

-> Use the "Full format" command WITH the option "Formatting Size Adjustment" ON (this option is OFF by default).

This did the trick for me.
Before you ask:
Did you really read and understand How to use this forum ?
AND:
Do you have already some solution or is a part of the problem sitting in front of the screen?  :)

Go Up