Reading Data from SD card then send it

Sorry this post is so short. I'm on my iPhone about to be at work.

Is it possible to store data on a SD card using a computer, hook it up to an arduino using a shield, then send it to a device using a rs232 to TTL converter?

Any ideas about how to do this in code using the uFat library?

Thanks for your help! :slight_smile:

I don't think ufat or ufat2 can handle reading the data, it can get directory information but doesn't seem to have a read file method. Take a look at fat16lib it does file reads very easily.

http://code.google.com/p/fat16lib/

See also this recent "tiny, read only" SD reading code....

http://www.arduino.cc/cgi-bin/yabb2/YaBB.pl?num=1251776162

http://code.google.com/p/ummc-library-arduino/

Thanks for the links you guys. Do you know if it's possible to read data from a SD card then use xmodem to transfer the data from an arduino to an external device.

Like so...

SD card ---> arduino ---> (xmodem) ---> external device

I know it's probably possible to write the xmodem code just not sure how one would go about doing this. Like what hardware, etc.

It is certainly possible. The XMODEM protocol is a software protocol, so you do not need any hardware other than the Arduino's built-in hardware serial support (and of course an SD shield or PCB for your project, but that is irrelevant to the XMODEM code).

XMODEM is one of the simplest protocols -- with the corresponding limitations that come with that -- so I imagine you could fit it into an Atmega 328, even with an SD library in the chip too.

For details of packet sizes, checksum algorithms, and other protocol details for the XMODEM/YMODEM implementation, start at http://www.textfiles.com/programming/ymodem.txt.

Good luck, and let us know how it goes.

Sorry, I just had to point you here:
Practical Arduino is sweet, Jon found a way to write/read/check everything about a USB flash drive! He can check all the disk space and whatnot!