Hi,
I'm working on a datalogging project using a Seeeduino Stalker (basically a clone with a microSD on-board, using the SPI interface over pins 10-13). I've got this working fine with the fat16 library from
http://code.google.com/p/fat16lib/. My project involves reading various analog inputs via a couple of multiplexers, displaying the values on an lcd screen and logging to the SD card.
My question is this: Is it possible to use pins 11-13 for something else (for example setting the mux pins) at the times when the SD card is not being written to? I'd basically like to free up a few pins for something else. At present it seems that pins 11 and 12 are active all the time, no matter whether or not the card is actually being written to at the time. What I'd like to achieve is something like:
setup:
initialise card
loop:
set mux pins using pins 11-13, and store readings
write readings to card
pin 10 appears to be the card's CS pin, so something like this seems logical, but various permutations I've tried haven't worked so far:
setup:
initialise card
loop:
set CS pin to not access card
set mux pins, and store readings
set CS pin to access card
write to card
Does this seem reasonable, or am I completely misunderstanding how the sd card access works?
I've tried to search for an answer to this, but haven't had any luck so far - any help much appreciated! I'm new to this and picking it up as I go along.
Thanks very much,
Jo