|
That should be possible with the existing hardware, as the logic pins brought out to a protoboard include the port C spi pins. If you get a microSD card with SD adapter you can solder a strip of pins with 0.1 spacing so that the adapter plugs into the protoboard for jumpering to the port C pins. That then acts as the socket for the microSD card.
I assume the petitFS library can be built for the xmega32a4. I used the read-only version on an ATTiny85, using it to open a file and position at each sector, then calling my own sector write routine. The files were preallocated using Windows, e.g. Log1.csv, Log2.csv,... each containing 10MB of spaces. .The '85 does not have enough RAM to read or write a 512 byte sector, so I had to use the non-buffered directory read routines. For writing, 16 bit ints were expanded to comma separated ascii which allowed filling the 512 byte sector using only a 128 byte buffer. Probably such tricks would not be needed for the xmega32 as far as RAM goes. But it uses 7.5K of program flash, don't know how much existing stuff you would have to take out to get that to fit.
http://www.avrfreaks.net/index.php?name=PNphpBB2&file=viewtopic&p=645296
I can dig out the code if anyone is interested in modifying it for the xmega.
[mstempin 2011-04-04 21:41:03]:
Ability to save the captured waveforms on a microSD card.
|