Hey!
Im looking at purchasing ones of the CC3000 breakout boards for use with my Arduino Mega project.
My projects already however using an LCD shield and screen from SainSmart (my next LCD screen and driver board will be from Adafruit)
This is what im currently using > (http://www.sainsmart.com/sainsmart-tft- ... -plug.html)
What I need to know is could I have both the CC3000 and LCD shield working on my Mega at the same time? I believe they both use SPI pins.
Since the Mega pins which are to be used according to the Adafruit CC3000 guide are in use (50,51,52) could I connect them up to the ISCP headers SPI pins instead?
Thanks in advance!
CC3000 with other SPI devices on Arduino Mega
Moderators: adafruit_support_bill, adafruit
Please be positive and constructive with your questions and comments.
- jasperp
- Posts: 50
- Joined: Mon May 27, 2013 5:06 am
- adafruit_support_bill
- Posts: 88093
- Joined: Sat Feb 07, 2009 10:11 am
Re: CC3000 with other SPI devices on Arduino Mega
If all devices on the bus and their respective libraries are well behaved, you can share the SPI bus. We do not have any experience with the SainSmart shield, so we can't say for sure that it will work.
- jasperp
- Posts: 50
- Joined: Mon May 27, 2013 5:06 am
Re: CC3000 with other SPI devices on Arduino Mega
So it should work in theory
I believe that each spi device requires a unique ChipSelect pin
Where in the cc3000 library can I modify the CC used by this breakout board?
I believe that each spi device requires a unique ChipSelect pin
Where in the cc3000 library can I modify the CC used by this breakout board?
- adafruit_support_bill
- Posts: 88093
- Joined: Sat Feb 07, 2009 10:11 am
Re: CC3000 with other SPI devices on Arduino Mega
You can specify the CS pin in the CC3000 constructor.
Each device also needs to tri-state its bus pins so that they can be shared. And the libraries need to remember to de-assert the CS pin when they are done with it.
Each device also needs to tri-state its bus pins so that they can be shared. And the libraries need to remember to de-assert the CS pin when they are done with it.
- jasperp
- Posts: 50
- Joined: Mon May 27, 2013 5:06 am
Re: CC3000 with other SPI devices on Arduino Mega
What does Tri-Stating involve exactly?
- adafruit_support_bill
- Posts: 88093
- Joined: Sat Feb 07, 2009 10:11 am
Re: CC3000 with other SPI devices on Arduino Mega
Tri-state means that the output of a device pin can be HIGH, LOW or a high impedance state that allows other devices to control the signal. http://en.wikipedia.org/wiki/Three-state_logic
There are various ways to implement it. We use a 74AHC125 buffer on our CC3000 breakouts.
There are various ways to implement it. We use a 74AHC125 buffer on our CC3000 breakouts.
- jasperp
- Posts: 50
- Joined: Mon May 27, 2013 5:06 am
Re: CC3000 with other SPI devices on Arduino Mega
Thanks for the info
Considering the LCD shield im using takes a 3.2' LCD screen which has an sd card slot which I am also utilizing I believe the libraries correctly use the CS function and the shield is capable of sharing the SPi bus.
I will post my results when I receive my cc3000 board.
Considering the LCD shield im using takes a 3.2' LCD screen which has an sd card slot which I am also utilizing I believe the libraries correctly use the CS function and the shield is capable of sharing the SPi bus.
I will post my results when I receive my cc3000 board.
- jasperp
- Posts: 50
- Joined: Mon May 27, 2013 5:06 am
Re: CC3000 with other SPI devices on Arduino Mega
Just so you know I have been able to get the CC3000 to work without issues with the Arduino Mega and LCD TFT Shield/Screen :)
- adafruit_support_bill
- Posts: 88093
- Joined: Sat Feb 07, 2009 10:11 am
Re: CC3000 with other SPI devices on Arduino Mega
Great! Thanks for the follow-up.
Please be positive and constructive with your questions and comments.