T3.6 with WIZ820io adaptor board

Status
Not open for further replies.

FredA

Active member
If I use the WIZ820io adaptor board with a T3.6 and the WIZ850io module, there are several posts on the forum that say it all works well.

But, then their are two SD card slots mounted. Are they both active? Will they conflict?

FredA
 
But, then their are two SD card slots mounted. Are they both active? Will they conflict?

No and no. There's no conflict, because you choose which to use with SD.begin. SD.begin(4) for the one on the adaptor, or SD.begin(BUILTIN_SDCARD) for the one on Teensy 3.6. Read the comments in any of the SD library examples for details.
 
Paul,

Thank you. The really nice thing about this forum is that people get informed answers from knowledgable people, and often from the top guy. Many forums have a lot of BS that goes like "I don't really know but here is what I think".

FredA
 
Paul,

I am trying to use two SD cards with Teensy3.6. It is OK with the built in sd card but I do not succeed to make the second one work.

Here is the spec of the SD card on the shield:

MOSI = Teensy3.6 pin 7
MISO = Teensy3.6 pin 12
SCK = Teensy3.6 pin 14
SDCS = Teensy3.6 pin 10

Here is the code that I use:

Code:
#include <SD.h>
#include <SPI.h>

// set up variables using the SD utility library functions:
Sd2Card card;
Sd2Card card1;

const int chipSelect = BUILTIN_SDCARD;
const int chipSelect1 = 10;

void setup()
{
  pinMode(chipSelect1, OUTPUT);
  
  SPI.setMOSI(7);  // Shield has MOSI on pin 7
  SPI.setMISO(12); // Shield has MISO on pin 12
  SPI.setSCK(14);  // Shield has SCK on pin 14
 
 // Open serial communications and wait for port to open:
  Serial.begin(9600);
   while (!Serial) {
    ; // wait for serial port to connect. Needed for Leonardo only
  }

  Serial.print("\nInitializing SD card...");

  if (!card.init(SPI_HALF_SPEED, chipSelect)) {
    Serial.println("initialization failed.");
  } else {
   Serial.println("Wiring is correct and the card is present."); 
  }

  Serial.print("\nInitializing SD card1...");

  if (!card1.init(SPI_HALF_SPEED, chipSelect1)) {
    Serial.println("initialization failed.");
  } else {
   Serial.println("Wiring is correct and the card 1 is present.");
  }
}

void loop() {
  // put your main code here, to run repeatedly:

}

Did I miss something to make the second SD card work?

Thanks!
 
Thanks Paul!
I looked at Bill's SdFat and it is more complex than expected since the two SD cards are on different SPI buses: One uses the Teensy 3.6 Built In and the other uses SPI0.
 
Status
Not open for further replies.
Back
Top