Can you confirm Im ok with this?

Hello!

Im thinking about buying this screen (320x240 TFT Touchscreen, ILI9341) because im tired of having a mess of wires, multiplexers and leds.
The thing is I would like to send my PCB design to print, so I would like to be sure that my connections are ok.
Also Im not from the USA, so buying will take a few weeks to arrive to me. So if I buy the screen to test it and then I send the PCB it will delay my project at least three weeks... and Im pretty anxious to build it :)

So im attaching the design that I built following what I saw in the website. I just follow the connections that are in the table. If someone can confirm me this is ok I will be very grateful.

teensy and screen.PNG
 
Did you on purpose connect SCK/T_CLK to pin 14 of the T3.2?
The table states pin 13 [when not using the Audio adapter]:

Capture.PNG

Paul
 
To amplify what PaulS said, on the Teensy 3.x microprocessors, you can choose two sets of pins for the 3 SPI pins:
  • Pin 11 or pin 7 for DIN/MOSI;
  • Pin 12 or pin 8 for DOUT/MISO; (and)
  • Pin 13 or pin 14 for SCK/SCLK.

If you use the default pins (11, 12, 13), the code should work fine. If you use the alternate pins, you will need to tell the SPI library that the alternate pins are used. If you use the audio shield (revisions A through C), you have to use some of the alternate pins because the I2S pins use some of the SPI pins.

On the other hand, if you ever use a Teensy 4.0 or 4.1, you have to use the standard pins (11-13). The Teensy 4.0/4.1 do not support using alternate pins for SPI. The I2S pins used by the Teensy and the revision D audio shield for the Teensy 4.x series are on different pins than in the Teensy 3.x series.
 
Did you on purpose connect SCK/T_CLK to pin 14 of the T3.2?
The table states pin 13 [when not using the Audio adapter]:

View attachment 28426

Paul

Yes, I've connected using the second column (Teensy 3.x Audio Board) because I plan to use the Audio Board. Is that Ok?


To amplify what PaulS said, on the Teensy 3.x microprocessors, you can choose two sets of pins for the 3 SPI pins:
  • Pin 11 or pin 7 for DIN/MOSI;
  • Pin 12 or pin 8 for DOUT/MISO; (and)
  • Pin 13 or pin 14 for SCK/SCLK.

If you use the default pins (11, 12, 13), the code should work fine. If you use the alternate pins, you will need to tell the SPI library that the alternate pins are used. If you use the audio shield (revisions A through C), you have to use some of the alternate pins because the I2S pins use some of the SPI pins.

On the other hand, if you ever use a Teensy 4.0 or 4.1, you have to use the standard pins (11-13). The Teensy 4.0/4.1 do not support using alternate pins for SPI. The I2S pins used by the Teensy and the revision D audio shield for the Teensy 4.x series are on different pins than in the Teensy 3.x series.

So is it easy to "tell the SPI library that the alternate pins are used"?

Sorry if these are noob questions but well... I'm a noob

Thank you for your time!
 
Yes, I've connected using the second column (Teensy 3.x Audio Board) because I plan to use the Audio Board. Is that Ok?

So is it easy to "tell the SPI library that the alternate pins are used"?

Sorry if these are noob questions but well... I'm a noob

Thank you for your time!

In general, if you go over to https://www.pjrc.com/teensy/td_libs.html, it has all of the pages for documentation about the Teensy libraries.

From there, go to the SPI page, https://www.pjrc.com/teensy/td_libs_SPI.html. It has the following text:

Alternate SPI pins
Sometimes, the SPI pins are already in use for other tasks when an SPI device is added to a project. If that task is simply a digital pin, or an analog input, it is usually better to move that to another pin so that the hardware SPI can be used. Sometimes though, the conflicting pin cannot be moved. The Audio Adapter, for example, uses some of the SPI pins to talk to the Audio DAC over I2S. For this case, Teensy 3.x provides an alternate set of SPI pins.

The main SPI pins are enabled by default. SPI pins can be moved to their alternate position with SPI.setMOSI(pin), SPI.setMISO(pin), and SPI.setSCK(pin). You can move all of them, or just the ones that conflict, as you prefer. The pin must be the actual alternate pin supported by the hardware, see the table above; you can't just assign any random pin.

You should be aware that libraries sometimes have to move SPI pins. (The Audio Library is an example). If you add an SPI device yto your project and it does not work, check whether the library has moved the pins and if so, use the same pins the library does.

If all else fails, the SPI protocol can be emulated ("bit-banged") in software. This has the advantage that any convenient pins can be used, and the disadvantage that it is much, much slower and prevents your sketch from doing useful work meanwhile.
 
Back
Top