Go Down

Topic: 2 SD readers on Arduino? (Read 1 time) previous topic - next topic

vmansmx5

Is it posable to have multiple SD card readers on the arduino that open and save dataloging at differnt times?
Can it be done with CS on pin 2 and other CS on pin 4 using the SPI

PaulS

Quote
Is it posable to have multiple SD card readers on the arduino that open and save dataloging at differnt times?

Why would you need the files on two different cards? Do you replace hard drives in your PC each time you want to save a file? You can create multiple files on the same SD card, opening one at a time to write to.

frank26080115


Can it be done with CS on pin 2 and other CS on pin 4 using the SPI


Yes
Freelance engineer, consultant, contractor. Graduated from UW in 2013.

vmansmx5

just thinking about have one sd1 save a value then have SD2 save another so thay are not saving the same data files
not sure on the SD side of it how to run 2 sds in the code

PaulS

Quote
just thinking about have one sd1 save a value then have SD2 save another so thay are not saving the same data files

But, you don't write to the SD card, any more than you write to a hard drive. You write to a file on the SD card. You can write to 2 different files on one card, easier than writing to one file on each of two different cards.

vmansmx5

Yeah ok so if i was using my ethernet board witch has a sd card reader that saves to a datalogger and a tft lcd that has it own SD reader that use it for its own bmp files how can this work if i can even do it

PaulS

Quote
Yeah ok so if i was using my ethernet board witch has a sd card reader that saves to a datalogger and a tft lcd that has it own SD reader that use it for its own bmp files how can this work if i can even do it

Each SPI device needs its own SS (slave select) pin. The Ethernet shield uses pin 10 as the SS pin. The SD card on the Ethernet shield uses pin 4 as the SS pin. You need to look at the documentation or schematics for the TFT's SD card to determine its SS pin.

In the SD.begin() call, specify the SS pin that activates the device you want to write to/read from.

Go Up