Pages: [1]   Go Down
Author Topic: Arduino Mega 2560 - troubles with LC Studio card reader  (Read 1109 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

Hi everybody!

I'm using SdFat lib, Arduino Mega 2560 and such a SD card reader:
  http://img.alibaba.com/img/pb/914/939/371/371939914_193.jpg

I've connected pins like it's written in Arduino Mega datasheet:
   MOSI - pin 51
   MISO - 50
   SCK - 52
   
CS from card reader is connected to pin 53, and I specify chipSelect as 53 when calling SdFat::init. Card is initializing without errors and I can read files.

But I have troubles with writing files. I can't open file with a trunc flag - I get 0x13 error; also I can't change it's size, e.g. if file is of X bytes, then having opened it in write mode, I can't write more than X bytes and expand it. Also I can't delete file. (card isn't locked, of course, I've checked it ). I tried to supply card reader either  with 3.3V and 5V, results are the same. I was advised to slow down SPI speed, I also tried it, but it didn't work even with one sexteenth of clock speed.
 I have no idea what to do with it.

I used that same card reader and SdFat with Uno, and all worked fine.

« Last Edit: August 11, 2012, 07:26:28 am by olegigst » Logged

Lormaison
Offline Offline
Newbie
*
Karma: 0
Posts: 44
Omnes vulnerant, ultima necat !
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hi, I have the same problem with the same cards :

see post in French : http://arduino.cc/forum/index.php/topic,125710.0.html

and in English : http://arduino.cc/forum/index.php/topic,125973.msg947232.html#msg947232

regards
Logged

Quidquid agis, prudenter agas, et respice finem !

Offline Offline
Newbie
*
Karma: 0
Posts: 43
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I also have problems with this.
Everythings seems to work fine, Cardinfo is showing....

But Im not able to write to a file..
Would apreciate if anyone knew whats causing this problem....
Logged

Pages: [1]   Go Up
Jump to: