When there are multiple devices on the SPI bus, with one of them being an SD card reader, can I select it, open and read from a file, switch to a different device to do something else, then come back to the SD card reader and continue reading where the pointer left off? Note I did not close the file prior to moving to a different device, so in a sense it's still open.
Note I did not close the file prior to moving to a different device, so in a sense it's still open.
No in "a sense". In every sense.
can I select it, open and read from a file, switch to a different device to do something else, then come back to the SD card reader and continue reading where the pointer left off?
Of course.
You'll have to excuse my primitive thinking here Paul. When I think of disconnecting a signal line, I instantly believe that everything else related to that device is lost and will have to be re-initialized. So that's why I'm asking whether it's possible to disconnect the CS signal and re-connect and expect the read pointer to be where I left it.
Sounds like it could work just fine.
So that's why I'm asking whether it's possible to disconnect the CS signal and re-connect and expect the read pointer to be where I left it.
I hope that you are simply misusing the term "disconnect". You should not be making connections or disconnecting anything while the Arduino is running. Setting CS HIGH or LOW is a completely different action, and is quite possible. That's how SPI is meant to work.
Setting CS HIGH or LOW does not move the read pointer. That is a property of a class instance, not of the hardware.
Uh yah, not a physical removal of a wire, sorry. Just flipping its state so I can select something else then come back and continue reading where I left of.