Teensy 3.1 + Ethernet adapter: SPI pins assignation

Status
Not open for further replies.

amundsen

Well-known member
Hello,

I want to use a Teensy 3.1 with an unbranded SPI Ethernet adapter (WizNet W5500).

1. Does one want to include the SPI library in their program, or is the Ethernet library self-sufficient?

2. As I am using pin 10 for Serial communication, how can I assign another pin to CS? On the pinout diagram CS is written in grey next to pins 2, 15, 20, 21, 22 and 22.

3. Same question to select SCK pin (on pinout diagram, SCK is written in black next to pin 13 and in grey next to pin 14).

Thank you in advance.
 
So, I have found some answers:

1. No, the SPI library doesn't have to be included.

2. That's the job of the Ethernet.init() function, to be used before Ethernet.begin().

Question (3) remains.
 
Easy answer, use pin 13 for SCK, since that is the default.

To see how to use pin 14, in Arduino click File > Examples > Audio > WavFilePlayer. The audio lib on Teensy 3.x needs pin 13 for digital audio input, so pin 14 is used.

But unless you *need* pin 13 for something else, simplest to just do with the default.


Now that I've answered your last question, I'm hoping to can answer one too. When & where did you buy this Teensy 3.1? 3.1 was discontinued several years ago.
 
Thanks Paul. I bought this Teensy 3.1 several years ago indeed. I have been using it in several projects and the one described in this thread is just an improvement from a previous one. The Teensy 3.1 is up to the task so far, so I hope you don’t mind I keep using it. Be reassured: I do also have a Teensy 4.0, but I think it deserves projects up to its processing power.
 
Status
Not open for further replies.
Back
Top