Need help with multiple SPI and sdcard

Status
Not open for further replies.

linuxgeek

Well-known member
I've been using the mini sd card adapter for awhile now and it works really well and is fast.

But now that I want to use another hardware serial, I'm wondering how to hook it up.

Using this guide for the mini sd card adapter:
http://forum.pjrc.com/threads/16758-Teensy-3-MicroSD-guide
+5V goes to 3.3V (red wire)
Ground goes to GND (black wire)
MOSI goes to pin 11 (blue wire)
MISO goes to pin 12 (green wire)
SCLK goes to pin 13 (white wire)
SS goes to pin 10 (yellow wire)

What serial port am I using with this, or am I using any at all?
pin#: t3/spi
-----------------
10: TX2/SS
11: DOUT/MOSI
12: DIN/MISO
13: (LED)/SCLK

Am I using Serial2 with this? Which would mean I could still use Serial1 & Serial3.
And if I am using Serial2, why am I not using RX2 (pin 9)?

How would I wire up multiple serials?

For instance, if I want to use Serial1, do I just need to wire up RX->TX, and TX->RX, and then use Serial1. Is it as easy as that, as it does seem? Or do I need to do something with SS & SCLK too? Do I need to worry about using them at the same time, or is that all taken care of? I'm thinking it is, since they are all hardware serial.

My intention is to use the sdcard and a bluetooth module, hopefully simultaneously.
I'm using this bluetooth module:
http://www.goodluckbuy.com/serial-b...rs232-w-backplane-enable-and-state-pin-1.html
which I think is essentially the same as this one:
http://blog.makezine.com/projects/connect-an-arduino-to-a-7-bluetooth-serial-module/

I think I can stumble through this, but any tips appreciated. Thanks.
 
I just plugged in the bluetooth module and it was as easy as pie using Serial1. It's now talking to my tablet over bluetooth. Wow! Pretty incredible.
I don't know what'll happen when I try both sdcard and bluetooth, but it seems like everything just works most of the time with the teensy.

If anyone is interested, it seems that mine works fine over 3.3V. I think the newer versions work fine with 3.3V, eventhough it says 3.6V-6.0V on the unit.
bluetooth module: JY-MCU V1.3
 
Status
Not open for further replies.
Back
Top