Pages: 1 ... 8 9 [10] 11 12 13   Go Down
Author Topic: SD card read/write with Arduino  (Read 109887 times)
0 Members and 1 Guest are viewing this topic.
0
Offline Offline
Newbie
*
Karma: 0
Posts: 14
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

OMG! At last I've get info from SD card. That was painful smiley At the begining I used HP card 16 MB (card comes with my HP PhotoSmart 850 photocamera) and my Duemilanove don't initialize it. Then I tried with SanDisk SD 128 MB card and yes - it works! I use fat16 library.

I've get my Duemilanove some weeks ago and I preffer to write in Assembler, so I will try to put all this stuff in that language, because, if compiled C sketch (.PDE & .CPP) have length of 9 KB, then Assembler output will be smaller ~10 times and more. So I think Assembler code will be better choice for our small friend - Arduino with 16-32 KB memory onboard.

Thank You guys! I'm very happy!  smiley-wink

Now my fantasies about robots and machines are going deeper and deeper.

One question - isn't there problems for FAT16 reading card with big capacity? isn't there a limitations?

I search in google and got answer - "The size limit for logical drives using the FAT16 file system in Windows Me/98/95 and MS-DOS is 2GB." Is it because of these systems, or FAT16 structure cannot hold values bigger?
« Last Edit: December 25, 2009, 05:29:42 pm by Syntetik » Logged

0
Offline Offline
Newbie
*
Karma: 0
Posts: 19
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Sorry to resurrect such an old thread but mother google informs me that this is the definitive place to discuss "arduino sdcard" smiley

so I've loaded up the sketch and I get
Code:
                from /home/sirus/arduino/hardware/libraries/SDcard/sd_raw.cpp:13:

/home/sirus/arduino/hardware/libraries/SDcard/sd_raw_config.h:86:6: error: #error "no sd/mmc pin mapping available!"

/home/sirus/arduino/hardware/libraries/SDcard/sd_raw.cpp: In function 'uint8_t sd_raw_init()':

/home/sirus/arduino/hardware/libraries/SDcard/sd_raw.cpp:167: error: 'configure_pin_mosi' was not declared in this scope

/home/sirus/arduino/hardware/libraries/SDcard/sd_raw.cpp:168: error: 'configure_pin_sck' was not declared in this scope

/home/sirus/arduino/hardware/libraries/SDcard/sd_raw.cpp:169: error: 'configure_pin_ss' was not declared in this scope

/home/sirus/arduino/hardware/libraries/SDcard/sd_raw.cpp:170: error: 'configure_pin_miso' was not declared in this scope

/home/sirus/arduino/hardware/libraries/SDcard/sd_raw.cpp:172: error: 'unselect_card' was not declared in this scope

/home/sirus/arduino/hardware/libraries/SDcard/sd_raw.cpp:198: error: 'select_card' was not declared in this scope

/home/sirus/arduino/hardware/libraries/SDcard/sd_raw.cpp: In function 'uint8_t sd_raw_read(uint32_t, uint8_t*, uint16_t)':

/home/sirus/arduino/hardware/libraries/SDcard/sd_raw.cpp:418: error: 'select_card' was not declared in this scope

/home/sirus/arduino/hardware/libraries/SDcard/sd_raw.cpp:423: error: 'unselect_card' was not declared in this scope

/home/sirus/arduino/hardware/libraries/SDcard/sd_raw.cpp:455: error: 'unselect_card' was not declared in this scope

/home/sirus/arduino/hardware/libraries/SDcard/sd_raw.cpp: In function 'uint8_t sd_raw_write(uint32_t, const uint8_t*, uint16_t)':

/home/sirus/arduino/hardware/libraries/SDcard/sd_raw.cpp:663: error: 'select_card' was not declared in this scope

/home/sirus/arduino/hardware/libraries/SDcard/sd_raw.cpp:668: error: 'unselect_card' was not declared in this scope

/home/sirus/arduino/hardware/libraries/SDcard/sd_raw.cpp:689: error: 'unselect_card' was not declared in this scope

/home/sirus/arduino/hardware/libraries/SDcard/sd_raw.cpp: In function 'uint8_t sd_raw_get_info(sd_raw_info*)':

/home/sirus/arduino/hardware/libraries/SDcard/sd_raw.cpp:809: error: 'select_card' was not declared in this scope

/home/sirus/arduino/hardware/libraries/SDcard/sd_raw.cpp:814: error: 'unselect_card' was not declared in this scope

/home/sirus/arduino/hardware/libraries/SDcard/sd_raw.cpp:863: error: 'unselect_card' was not declared in this scope

/home/sirus/arduino/hardware/libraries/SDcard/sd_raw.cpp:908: error: 'unselect_card' was not declared in this scope

Logged

0
Offline Offline
Newbie
*
Karma: 0
Posts: 19
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I think that my issue is that i have a 328 smiley-sad
Logged

Germany
Offline Offline
Newbie
*
Karma: 0
Posts: 9
Arduino rocks and shocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

@Syntetik
Quote
One question - isn't there problems for FAT16 reading card with big capacity? isn't there a limitations?

I search in google and got answer - "The size limit for logical drives using the FAT16 file system in Windows Me/98/95 and MS-DOS is 2GB." Is it because of these systems, or FAT16 structure cannot hold values bigger?
You can't address more than 65.535 Cluster (= 16 Bit) with FAT16.
It also depends on a few other things like Clustersize, Bootsector, Backup Sectors...

@sirus20x6
Which library are you using?
Look like your library "SDcard" does not compile correctly.
Maybe try to "clear" library directory. delete all *.o files in /home/sirus/arduino/hardware/libraries/SDcard/ and try again.

Quote
I think that my issue is that i have a 328
You mean an ATmega328 on your Arduino?
I don't think thats the problem. Arduino first compiles all basic stuff and libraries. Than it compiles your sketch.
Logged

Why is it that only drug dealers and software developers call their clients "users"?

0
Offline Offline
Newbie
*
Karma: 0
Posts: 8
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hai
Logged

0
Offline Offline
Newbie
*
Karma: 0
Posts: 8
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hello everyone. I m from India and currently doing my final year project.
I m trying to interface an SD card with Arduino atmega8 for datalogging. I dont have any shield for the interface,since it is not affordable for me. and i m following this schematic

www.arduino.cc/cgi-bin/yabb2/YaBB.pl?num=1206874649/8

I tried the DevicePrint library, File Logger library.

But watever I try , I get only the following error msg "card Failed initialising". smiley-sad

I m using Arduino-0017 IDE in Linux.
 
could any one help me.

Thanks in advance.

Nandhakumar
Logged

Germany
Offline Offline
Newbie
*
Karma: 0
Posts: 9
Arduino rocks and shocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
Hello everyone. I m from India and currently doing my final year project.
I m trying to interface an SD card with Arduino atmega8 for datalogging. I dont have any shield for the interface,since it is not affordable for me. and i m following this schematic

www.arduino.cc/cgi-bin/yabb2/YaBB.pl?num=1206874649/8

I tried the DevicePrint library, File Logger library.

But watever I try , I get only the following error msg "card Failed initialising". Sad

I m using Arduino-0017 IDE in Linux.

Have you read my post: http://www.arduino.cc/cgi-bin/yabb2/YaBB.pl?num=1206874649/124#124 ?

- How many different SD-Card have you tested (some card are much more picky than others)
- i've had good results with two old 16mb sd-card (came with my canon digital camera) and one 256MB Card
« Last Edit: January 25, 2010, 04:25:23 pm by pixeldoc2000 » Logged

Why is it that only drug dealers and software developers call their clients "users"?

Australia
Offline Offline
Full Member
***
Karma: 7
Posts: 210
AVR Microcontrollers
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
Nandhakumar

If dataloging does not require you to access the sd card
data on your pc using a FAT.

If you just want to log data straight to and from the sd card using the arduino.

Then look at:

http://www.arduino.cc/cgi-bin/yabb2/YaBB.pl?num=1259789744/0#0
Logged

0
Offline Offline
Newbie
*
Karma: 0
Posts: 40
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hi, i just want to test this uFAT, but i cant find the mmc1.rar from http://groups.google.com/group/micro-hacker

has anyone the files i need ?

btw, heres my idea of an Cardslot:

Its just a mini or micro SD-Cardadapter
« Last Edit: February 03, 2010, 12:30:40 pm by unic » Logged

Montreal, QC
Offline Offline
Newbie
*
Karma: 0
Posts: 3
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

To Nnk:

I've had problems initializing a card also, it turned out I had a bad contact between my card reader board and the header it was sitting upon. I soldered everything and it works perfectly now. You might want to verify all the electrical contacts, just to be sure.

Good luck!

Note: I use the very same circuit that you are using, except for 2 additional 100nF and 47uF capacitors between the 3.3V and GND pins next to the card (it probably works without that). I use a 2GB SD San Disk card.
Logged

0
Offline Offline
Full Member
***
Karma: 0
Posts: 131
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Has anyone used the fat16 library SparkFun mentions?

I went back a couple of pages here but didn't see this mentioned.  I am looking for a way to read files off a removable storage device.  The files will have some commands.  A push of the button on the arduino will cycle through the files/commands.  I need to be able to read and write tot eh storage device from windows or mac.  I think hooking up microSD and using that library will work.
Logged

0
Offline Offline
Newbie
*
Karma: 0
Posts: 8
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

This is Nnk again .

Thanks to carl47 and Cemath for the response . I tried the way u said in ur posts. But it did not work. I also tried re-building and re-testing the connections too.But still the same.

I am really confused and not clear on how to proceed with SD card interfacing with Arduino . Here I will tell the real need or requirement of my project and the purpose for which I need a SD card interfacing.

My project name is Tran-Duino , the purpose of the project is to track a moving vehicle,say ,a Bus using GPS and display the upcoming or the next stop names in the route by placing a display inside the Bus.

Inorder to store the latitude, longitude and location names , I will be using a SD card. The SD card will contain these information in the form of a textfile with fields separated by commas and one location name per line.

for example A line in the file may hv values like

13.119697 , 80.218537 , kolathur

Now , when the bus moves in the route , I ll get the GPS values from a GPS receiver module about the bus curent location frequently, I ll also fetch the values from the sd card , compare it , if it matches then the location name is sent to the display unit.

All these processing are done using the arduino. Now the work of the SD card is

    [must be able to store values when i go to locations and get the GPS positions (for storing purpose) ]
    [must be able to read from the card for comparing it with received values from GPS]
    [/list]

    So , please tell me your suggestions on how to achieve this task. If it is possible to do this task without a shield for SD card it will be more useful.

    Thanks in advance

    N.Nandhakumar
    Logged

    0
    Offline Offline
    Newbie
    *
    Karma: 0
    Posts: 20
    Arduino rocks
    View Profile
     Bigger Bigger  Smaller Smaller  Reset Reset

    Hi,
        I'm new to Arduino. Tried to search for micro SD/regular SD card adapter/holder to solder it into PCB without any results. >smiley-sad :o Could somebody help me to find where to buy it?
    Thanks.
    Logged

    0
    Offline Offline
    Newbie
    *
    Karma: 0
    Posts: 20
    Arduino rocks
    View Profile
     Bigger Bigger  Smaller Smaller  Reset Reset

    Already found it at SparkFun.com  smiley smiley-wink

    http://www.sparkfun.com/commerce/product_info.php?products_id=136
    « Last Edit: March 08, 2010, 06:36:04 pm by pineapple2010 » Logged

    0
    Offline Offline
    Newbie
    *
    Karma: 0
    Posts: 1
    Arduino rocks
    View Profile
     Bigger Bigger  Smaller Smaller  Reset Reset

    Hello all,

    I am relativly new to all of this (I just joined the forum 30 seconds ago), and I was wondering if I could use this to read/write Replicator G files.

    I have a makerbot, and I have been trying to find a way to use it without hooking my computer up to it every time I want to print. I have found the serial commands given by the computer to initiate Build form SD, and so I wanted to set up my arduino to take an SD card with the file on it, transmit that file to my Makerbot, and then send the Build from SD command.  Does this sound feasible to you all?
    Logged

    Pages: 1 ... 8 9 [10] 11 12 13   Go Up
    Jump to: