I'm stuck at work, but I keep running across these cool things to try with my Arduino, but don't have the time yet...
These two links describe how to use an old floppy drive connector as an SD card slot and tell how you can use one in MMC mode using SPI and five pins (3.3V, GND, clock, data in, and data out). As it happens, I had been thinking about how to store some configuration data for an Arduino program and update it without connected back to the computer or adding an interactive input device.
Does anyone of any reason why this technique wouldn't work with an Arduino program? If I'm reading all of this right, it appears that you could write a bunch raw data to a card (maybe using a tethered Arduino), then read the card from another program running standalone. This would also be great for long-term data logging, wouldn't it?
I was thinking of eventually getting around to doing this.
Should work fine.
The trickiest part is the file system.
If you want it user friendly, you need to create files and obey the rules of FAT16 at least.
Basically only Linux users would be able to use it if you did raw reading and writing.
I was thinking of writing the raw data with the Arduino as well. If you used it for data an Arduino program could read the card back and write the data serially, right?
Of course, supporting a file system would be even better, but I was thinking of keeping it simple.
I tried it once. There must be a topic somewhere here. But I lost my patience before it worked. If it works it will be without filesystem though. I switched to dataflash. (memory from atmel). But that is something you can only use with arduino, you can't take the memory out and put it in a pc.
There is someone here, Nick, who got the vinculum working. With that you have an USB interface which you can use with a memory stick, that is even better. He wanted to post it in the playground but I guess he didn't have time yet to do it.
Well I've wired up my floppy drive SD card socket (damn. I didn't realize I still had so many of them) and I've realized that I don't have a multimeter to test it.
I'll go buy one tomorrow hopefully.
Until then, I'm going to be praying that this works.
Solder some legs from a LED or something to your flatcable, then you can insert it in the headers. When you go out shopping, buy a lot of headers pins. Very handy, especially for flatcable.
Directly dealing with the SPI controller in the AVR is sort of beyond the scope of the Arduino environment, so I'm not sure there is an "arduino style" to follow. The symbols you're looking for (SPE, MSTR, etc) are defined in an include file <avr/iom8.h> or <avr/iom16.h>, which the Arduino environment already includes for you at the beginning of the sketch, and when I copied the code segment you mentioned into the setup() of the led_blink example, it worked fine.