i have a question, need help?

Status
Not open for further replies.

anhngoc032

New member
Join Date
Mar 2015
Posts
7

SPI Pinout in guide correct ?

Hello,

at first i would like to admit, that i am a beginner.
I would like to connect a SPI-Device to Teensy 3.1.

I am referencing to wiki :


In Teensys beginer guide, it says clock is on pin 13 :
https://www.pjrc.com/teensy/td_libs_SPI.html

Is this correct ? I was thinking 13 is connected to the yellow LED and can not be used...


Maybe some of you can straight out, how to get SPI going for the first time ?
 
The original Arduino UNO used this layout of using pin 13 for both the on-board LED and the SPI clock pin, and the Teensy copied it.

The clock pin is an output only pin, so when you are using SPI, the LED will flash on/off very fast as the clock is turned on/off. This means you can't use pin 13 as a general debug indicator to indicate that the program is in a state by whether the LED is lit or not.

If you want to still use pin 13 to drive the on-board LED (or you are using I2S, which also uses pin 13 for something else), you can use the SPI.setCLK to make pin 14 as the alternate clock pin:
 
In Teensys beginer guide, it says clock is on pin 13 :
https://www.pjrc.com/teensy/td_libs_SPI.html

Is this correct ?

Yes, that's correct. The same info is also on the pinout card which came with your Teensy. Also correct.

I was thinking 13 is connected to the yellow LED and can not be used...

The LED is not an issue. The SCK output can easily drive the LED and also the SCK signal to other SPI chips you connect.

Most of the Arduino boards also have a LED connected to pin 13, which is SCK. They also work fine. The LED is not a problem.
 
Status
Not open for further replies.
Back
Top