Go Down

Topic: SD & USB SDCard Reader (Read 1 time) previous topic - next topic



I currently I am trying to achieve the following:

- write data via SdFat lib to an external SDcard
- access via PC -> USB -> cardreader the SD (while the arduino hardware and its peripherie is off)

Only one of this two states is activated at the same time, while the other is eithjer off( arduino) or disconnected (PC access).

The arduino is connected via a MUX to the sd-card reader. The reader itself is a simple opened cardreader which you can buy in every electronic market.

Accessing the SD card via USB is fully working without any errors yet.
However initialising/reading/writing to the SD card is the troublesome part.

The connecting sheme is like in this thread:

I experimented and tried out A LOT and even the mentioned solution is NOT working the way it should for me...
For example: if i connect the CI pin directly to the arduino (without the voltage divider) it seems fine, but obviously the voltage is way to high, with the two resistors in between the SD actions fail.

Ill initialize the SD card in the loop the following way:

SdFat sd;

if( !sd.begin( 47 , SPI_HALF_SPEED ) )
//error output, since this fails the most of the times
SdFile file( "DATA.CSV" , O_RDWR | O_CREAT | O_AT_END );

Is there a way to get the things working as i would like to have is? Are there any hints/tutorials/references about this?
If you need more specific information ill post it here.

Merry christmas and thank you in advance.

Go Up