Pages: [1]   Go Down
Author Topic: SD & USB SDCard Reader  (Read 258 times)
0 Members and 1 Guest are viewing this topic.
Offline Offline
Newbie
*
Karma: 0
Posts: 1
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hello,

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:
http://forum.arduino.cc/index.php?PHPSESSID=eo8i9d27o97m7eqgnnqpc7d1d1&topic=203731.0

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
else
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.

Logged

Pages: [1]   Go Up
Jump to: