Forum Rule: Always post complete source code & details to reproduce any issue!
Results 1 to 5 of 5

Thread: Teensy 3.5 with TFT 480x320 HX8357 Feather Stability and Consulting Possibility?

  1. #1

    Teensy 3.5 with TFT 480x320 HX8357 Feather Stability and Consulting Possibility?

    I am wondering if anyone has run into any wiring/speed/interference issues combining the following two items:

    - Teensy 3.5 (with pins)
    - HX8357 TFT Feather

    I have about 5 of each of the above components, and using the normal GraphicsTest example source code for the Teensy version of the HX8357 library, and using SPI communications, and the below symptom(s) are pretty consistent across the multiple setups I have created.

    The problem is that 'sometimes', after applying power to an already programmed Teensy, the TFT just shows the white screen (powered backlight). Of course the 'sometimes' is the problem - once it works, I can turn on and off power without issue, as long as I don't physically adjust any of the wiring. But, if I move wires around (simply just moving the power lead from one rail of the breadboard to another, and in other cases, just simply physically moving the wires around without changing any connections at all), I seem to lose communications to the screen, until I get the wiring into a 'good orientation' again. I am not changing pin usage, just how I physically route the wiring between the Teensy and the TFT.

    So, does this sound like some type of possible noise/interference/signal loss on the SCK line (which I presume may be susceptible to such things) when talking to the TFT over SPI? Or has anyone experience something similar with these TFT displays and the Teensy?

    Since the TFT from AdaFruit is the Feather model, might getting a feather adapter for the Teensy directly to the TFT avoid the issue (by removing wiring on the SPI lines)?

    Side note: would anyone with experience in this be interested in some consulting work? I am especially interested if someone may have soldering skills as well. (I hope this is not an inappropriate use of this forum, and will remove this post if so).

  2. #2
    The TFT FeatherWing contains it's own power-on reset timer (APX803-SAG). This leads to a problem, if the TFT is initialized in Teensy before the reset sequence in the display is over.
    The solution is to put every other initialization before the TFT init and maybe even a delay(200); or depending on what was initialized a yield(); to "waste" some time before trying to start the display.

    The second, SPI wires shall be as short as possible and the wires be of same length to avoid skew and distortion. Of help could also be 330 ohm or less carbon (!) resistors in SPI signal wires, to dampen reflections and harmonics. Metal film resistors are not suitable because of their inductivity.
    Last edited by radias; 10-19-2019 at 02:26 PM.

  3. #3
    Senior Member+ MichaelMeissner's Avatar
    Join Date
    Nov 2012
    Ayer Massachussetts
    There are various things that come to mind.

    Most obvious is you may have slight solder bridges or cracks that only show up occasionally. When you switch wires, you move the board slightly, and maybe things are joined together or not. These are always hard to track down.

    While I'm much better with practice now, I've complained at times that I seem to be going through the de-soldering braid (to remove the solder) much faster than solder wire. My wife who is a great seamstress likens it to using a seam ripper to undo the work.

    Another thing that can show up is the Teensy 3.5, 3.6, and 4.0 tend to be much faster than the slower Arduino AVR and ARM M0 boards the display may have been designed around. I did a google search for the display, and I saw I had answered another query about it in January:

    Since the time I answered that post, I discovered a paper on better SPI design by Paul S. and it mentioned that putting pull-up resistors on the CS and DC pins as one of the three tips. For me, I had a flaky setup where I was driving two displays to do the uncanny eyes project that showed up when I moved to 3.5/3.6 from 3.2. Originally, I was just lowering the CPU clock frequency, and it would work mostly if I slowed down the 3.5/3.6 to 48Mhz or so. Then as I read about it, I discovered that you could independently set the SPI clock lower and it allowed me to run with certain Adafruit displays at 11 Mhz SPI clock speed and full 3.5/3.6 CPU speed. When I read the paper and put in 2.2K pull-up resistors between each of the 2 CS pins and 1 DC pin and 3.3v, I was able to push the SPI clock speed to about about 19Mhz and the problematical displays worked. At 20Mhz or so, the displays just would not work even with the pull-up resistors. So you may need to still tune things:

    Note, the Adafruit feather adapter was designed for the Teensy 3.2 form factor. Because the Adafruit feather adapter puts the JST connector for the battery at the end of the board, you can't mount the 3.5/3.6 directly on top of the adapter because the micro SD card reader would be in the same position as the JST connector. Instead you have mount the 3.5/3.6 underneath the feather adapter. Or you can mount it on top of the feather adapter if you raise up the Teensy so it clears the JST adapter. The 5 pins in the back row are not in the same location on the 3.5/3.6 as the 3.2, and you may need connect two of the pins via a wire:
    • You may want to run a wire to connect A21 (DAC0) to the pin in the back where the Teensy 3.2. This would allow using some of the feather wings that can use DAC0 to create sounds;
    • You may want to run a wire connecting either the reset or program buttons on the Teensy 3.5/3.6 to the program pin on the feather adapter. Adafruit brings this pin out to some of the feather wings. Whether you want it as the program button or the reset button depends on your whim. The feather adapter for the 3.2 uses program (since reset is not brought out to those pins), and if you press it, it disable the Teensy as it waits to be re-programmed.

    I tend to think it is an unfortunate design decision that the only real way to mount the feather displays on the Teensy adapter (and some of the Adafruit boards BTW) is if you have the stacking headers provided with the feather display have the male feather pins underneath the Teensy, and mount the display underneath the Teensy. I soldered up a prototype board that reversed the wiring, so that I could have the displays more properly on the top.

  4. #4
    Speed does not matter from the FeatherWing's side of view. See the datasheet. 48 MHz should run quite well, if the wiring is properly built. Extra pullup resistors in addition to those on the FeatherWing make no sense, especially if they have an inductive component. It is the ringing on wires that makes the signals unreliable.

  5. #5
    I've just tested this FeatherWing with T4.
    It runs the graphicstest at 166MHz SPI. If you remove all the delays (except the delay(200); to be put in the beginning of setup), it shows how fast it all can go...

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts