Multiple SC card readers?

A bunch of my bits of hardware include SC card readers. I've been going through the SD library info. but nowhere does it talk about using multiple SD cards. It does talk about using different chip select pins.

I've never seen..

SD.begin(chipSelect1);
SD.begin(chipSelect2);

is it the case where you just have to choose one SD card reader and stick with it?

thanks!

-jim lee

Maybe this could help: Serial Peripheral Interface - Wikipedia

I understand the hardware. I was wondering if the SD library could deal with multiple SD drives.

-jim lee

I think yes but never tested. If you have two instances, each one for its own SD card, it should work. Why not?

One issue that you'll run into is that the SD header file has an extern statement in it, and the source file creates an instance of the SDClass, called SD.

I don't see anything to preclude you creating another instance of SDClass, with a different name, since the source code never references the SD instance.

Thanks guys, that was kinda' what I was wondering. If it was defined such that you get one global instance. Time to rethink how I want to do this.

-jim lee