Due to high demand expect some shipping delays at this time, orders may not ship for 3-4 business days. On MLK Day no orders will be shipped.
0

Trying to get CC3000 and sd shield to work together over SPI
Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.

Re: Trying to get CC3000 and sd shield to work together over

by kanderek on Tue Nov 26, 2013 4:13 pm

Thanks for the quick reply. The CC3000 breakout's CS pin is connected to digital pin 10 and the SD card breakout's CS pin is connected to digital pin 4.
kanderek
 
Posts: 4
Joined: Mon Nov 25, 2013 3:34 pm

Re: Trying to get CC3000 and sd shield to work together over

by adafruit_support_rick on Tue Nov 26, 2013 6:54 pm

kanderek wrote:the SD card breakout's CS pin is connected to digital pin 4.

You've got Pin 4 selected as your SoftwareSerial receive pin.
You define sdSelect as Pin 8.
You only want to call SD.begin once, in setup(), not in playSample.

adafruit_support_rick
 
Posts: 35095
Joined: Tue Mar 15, 2011 11:42 am
Location: Buffalo, NY

Re: Trying to get CC3000 and sd shield to work together over

by kanderek on Tue Nov 26, 2013 7:50 pm

Ah, you're right. I remembered incorrectly. The SD Card chip select is wired to pin 8 though. Sorry for the confusion! Anything come to mind?
kanderek
 
Posts: 4
Joined: Mon Nov 25, 2013 3:34 pm

Re: Trying to get CC3000 and sd shield to work together over

by kanderek on Wed Nov 27, 2013 12:29 am

Okay, I moved the SD.begin() into the setup function. The SD card still does not get initialized and as is indicated by the Serial.println() statement that gets triggered.

At a high level I understand chip select for controlling which peripheral communicates with the master device (my atmega328 Arduino guy). I should be able to toggle the chip select low for the device I want to communicate with and all the others connected should be high. This doesn't seem to work out. Is this handled in the library with a simple command? For instance I want to start with the CC3000 communicating with Arduino then I want to switch to reading data off of an SD card. Ideally this would happen in a loop because these actions would be controlled by when an RFID reader was triggered. Any ideas? Toegap, are you there?
kanderek
 
Posts: 4
Joined: Mon Nov 25, 2013 3:34 pm

Re: Trying to get CC3000 and sd shield to work together over

by fmbfla on Wed Nov 27, 2013 10:01 am

http://learn.adafruit.com/adafruit-cc3000-wifi/connections


On the breakout, be aware that the MISO (data out from module) pin does not go 'high impedance' when CS is driven low. Check the shield for how we use a 74AHC125 to manually tri-state this pin when it's shared with an SD card.

fmbfla
 
Posts: 110
Joined: Fri Jun 08, 2012 6:48 pm

Re: Trying to get CC3000 and sd shield to work together over

by adafruit_support_rick on Wed Nov 27, 2013 10:42 am

The libraries take care of setting the chip selects properly. You don't have to worry about it.

adafruit_support_rick
 
Posts: 35095
Joined: Tue Mar 15, 2011 11:42 am
Location: Buffalo, NY

Please be positive and constructive with your questions and comments.