Teensy 4.0 with SmartLed Shield and external SD Board causes interferences of sorts

Status
Not open for further replies.

mludwig

Member
Hi Friends,

I'm running a Teensy 4.0 with a SmartLed Shield V5 and a 3 x [64x64] HUB 75 matrix - works like a charm.
Now I try to connect a generic SD Card module:

VCC - 5,5
GND - GND
MISO - Pin 12
MOSI - Pin 11
CS - Pin 10
SCK - Pin 13

My display (ScrollText) is now slightly garbled (Artefacts and/or "Shadows"), my ScrollText works, but is offset some pixels up. There seems to be a interference of some sort, regardless if a SD is inserted or not. I have NOT tested the SD card function until now.

Did anybody experience similar effects and how did you solve it?

THX
 
The Smartled V5 shield uses pins 10-13:
You can switch to the Teensy 4.1 and use the built-in SD card. I have a Teensy 4.1 running the animated gif program reading GIFs from a SD card right now. You likely want to only have the first 14 pins on each side extend down to the shield. Pixelmatrix suggests using right angle headers to access the last set of 10 pins if you need it. I decided to use stacking headers and just clip off the last 10 pins. In addition, you will need to remove one of the plastic tabs on the shield to allow for the longer Teensy 4.1.

There are some PCBs that bring out the SD card pins for the Teensy 4.0 (assuming you can do some surface mount soldering), but you may not want to use something that is wider than the Teensy. With the Teensy 4.1, it is just simpler to switch to that, rather than get the PCBs made, have them shipped to you, do some amount of surface mount solder, etc.
Alternatively, you could use the second SPI controller (pin 0 = CS1, pin 1 = MISO1, underneath pad 26 = MOSI1, underneath pad 27 = SCK1). I don't know if you would need to modify the SD driver to allow for the second SPI bus.
 
THX, Michael for your detailed answer. *sigh* I was almost expecting something like this ... one has to take care of so many small details in such projects. I think I will try your last suggestion first, otherwise I would have a totally useless 4.0 lying around ... thx for your support.
 
Hi @MichaelMeissner,

one question though: I don't doubt your words for even a second, but how did/do you know that pin 0 = CS1, pin 1 = MISO1 - I could not find that information (which might just be my inexperience).
 
Hi @MichaelMeissner,

one question though: I don't doubt your words for even a second, but how did/do you know that pin 0 = CS1, pin 1 = MISO1 - I could not find that information (which might just be my inexperience).

It was left out of the original pinout card either by accident, or it just didn't fit with the layout. It was listed in some of the spreadsheets that were published in this site when the beta test of Teensy 4.0 was going on.

I have run the uncanny eyes example (Examples -> ST7735_t3 -> uncannyEyes_async_st7789_240x240) that uses two 240x240 displays. Each display is on a separate SPI bus. The cheaper 240x240 displays don't have CS pins, so you need to put them on separate SPI buses. Note, only a few devices have optimizations for the special hardware CS pin (CS1). So if need be, you can use another CS pin that isn't used by the shield. IIRC, one of the other folk (mjs513, KurtE, defragster) also ran the example using the 3rd SPI bus meant for the SD card.

And of course the other method is the so-called UTSL (Use the source Luke), but it can take some amount of digging to find it.

I have soldered wires on the Teensy 4.0 to bring out that second SPI bus, but before I started using the PCB's I had the wires come undone, and I had the resolder them. IIRC, when I resoldered them, I found I had pulled off the pads on one or two of the underneath pads, leaving me some pins that I couldn't use. So be careful....
 
Last edited:
It was left out of the original pinout card either by accident, or it just didn't fit with the layout.

Yup, it didn't fit. :(

I've added "Not shown on this reference card, Pin 0: CS1, Pin 1: MISO1" on the Teensy 4.0 page just below the pinout cards.

https://www.pjrc.com/store/teensy40.html

Hopefully this will help anyone in the future needing to use SPI1 on Teensy 4.0. I tried a little CSS to get a green background with rounded corners similar to the pinout card.
 
Yup, it didn't fit. :(

Hi Paul, maybe I can contribute to this ... I did a quick rearrangement in the PDF. IMHO pinwise reference of PWM provides no additional value, so I changed the orientation which gives more room for the labels. Rounded corners are not perfect, though, since I just copied and scaled. Hope you like it anyway. Cheers. :D
 

Attachments

  • card10a_rev2_web.pdf
    545.7 KB · Views: 84
Hi Michael,

soldering was no problem, but the librairies (SD, SdFat) didn't recognize the card, even with reassigning pins via SPI and trying the SPI1 object. And yeah, I used the source, Luke :). Since I rather value time than money, I have now ordered a 4.1 - I will surely find someone to sell the 4.0 and the SD adapter to in my hood ... thanks for your help.
 
Status
Not open for further replies.
Back
Top