SD card read/write with Arduino

Hi again,

After further reading (ie that uFat basically takes up the same space as the sd_raw instructions) I've headed down the uFat track. I've downloaded the uFat2 files from SirMorris's blog (http://groups.google.com/group/micro-hacker
) and have integrated them into my program, although I have a few problems...

First, the sketch seems to 'interfere' with my DS1307 real time clock data. With the SD card connected as per the diagram at the beginning of this thread (and the clock connected to analog pins 4 & 5), the clock output is 'mixed up', e.g. the day comes through as the hour, year comes through as day of the month, etc. Leaving the hardware connected and loading up a sketch which ONLY displays output from the RTC, I get the correct output from the clock.

Secondly, I'm not too sure as to exactly how the reads/writes work. Am I correct in thinking that if (RES_OK == mmc::writeSectors(sector_buffer, sector, 1)) simply checks that a 1-byte write to sector (which=0) of sector_buffer works? Is it just the digitalWrite(13, (millis() / 1000) & 1) which writes sector_buffer out to the SD card? If that's correct, can anyone explain how this works for me? I'm very much learning as I go...

I'd like to be able to write data out to the SD card 10 bytes at a time (is this possible, or does the buffer have to be 512 bytes?), and be able to read them back & display them when prompted. Is this also possible, or am I only going to be able to check the output by checking the data.bin file on the PC?

Thanks again for everyone's thoughts...

JB