RA8875 Teensy 4.1 again.

AJL Electronics

Well-known member
Referring to this thread... https://forum.pjrc.com/index.php?threads/ra8875-and-4-1-with-spi.69787/

Was anything ever achieved? I have two of these displays and they work fine with a Teensy 3.6. However I have been unable to get a coherent display with the 4.1 Teensy. Once in a while it will display a very broken and distorted image sent to it, other times just colour striations, a white screen or nothing whatever. Transferring the display back to the 3.6 proves that the hardware is fine. It's a shame that I can't just replace the 3.6 I blew up. :-(

I have been using the Sumotoy library but have also experimented with the Adafruit library with no benefit. The Adafruit shows successful initialisation via the serial monitor.

Herewith the display working on the T3.6...

IMG_0276.jpg
 
Last edited:
Try much lower than 12MHz, just to confirm it is not related to speed.
And also measure SPI signals with a scope, both on the teensy and on the display.
 
Try much lower than 12MHz, just to confirm it is not related to speed.
And also measure SPI signals with a scope, both on the teensy and on the display.

Many thanks for that suggestion, how low can I go?

I did put the 'scope on the SCLK signal and was surprised that it wasn't a nice clean square wave of a constant frequency. But hopefully that just shows that I am unfamiliar with the way SPI actually works.
 
SPI works on short connections. On your picture above, it seems the display is connected on the right to the red pcb. And, if I am correct, the Teensy is connected on the left of the red pcb. It makes a "long" line.

Try 1MHz or even lower.
 
SPI works on short connections. On your picture above, it seems the display is connected on the right to the red pcb. And, if I am correct, the Teensy is connected on the left of the red pcb. It makes a "long" line.

Try 1MHz or even lower.

That is the working set with the T3.6. The device is behind the display with very short lines direct to the pins on the display.

Board2.png
 
No idea. As I said, try 1MHz.

You have tracks too close to the big round holes. Machining these holes could touch these tracks depending on tolerances on everything: dimensions, positioning on the machine, tools used, and so on. And imagine you have to make these holes bigger for any reason, after receiving hundreds of them, you have no margin.
 
@AJL Electronics: In my current TeensyMIDIPolySynth project, I make use of the TFTM070-5 from buydisplay.com (see spec below), which is connected to & driven by a T4.1. On my original wire-wrapped prototype of the project, the display worked like a charm. However, when transitioning to a formal PCB, I encountered lots of challenges (my own fault) getting the display to work reliably. After (finally) succeeding, I believe that the major challenge to be addressed was cross-talk between signals due to the blazing speed of the T4.1 combined with the 3.3VDC level signals. The eventual solution was to include 100 ohm resistors inline with the MOSI & SCK signals (placed as close as possible to the T4.1, as suggested elsewhere on this forum, using some value between 100 ohms & 220, experimenting to see what value works best) to reduce ringing. Maybe you could try splitting these two signal traces on your PCB & inserting similar resistors in series to see if that helps.

Code:
         Display options (ER-TFTM070-5):
            Interface:               Pin Header Connection-4-wire SPI
            VDD:                     5.0V (can always change the jumper later to power from 3.3VDC)
            Touch Panel:             7" Capacitive Touch Panel with Controller
            MicroSD Card Interface:  Pin Header Connection (not useable - see display docs)
            Font Chip:               (none selected, but you may want to make use of their custom fonts, so select appropriately)

Mark J Culross
KD5RXT

P.S. I should note that I am using the RA8875 library that is installed with TeensyDuino, & it also works like a champ. MJC
 
I forgot to include the pertinent portion of my PCB schematic for reference.

Mark J Culross
KD5RXT

P.S. Note that I am using MOSI1, MOSI1, CS1, & SCK1 on the T4.1, but that was to allow the RA8875 display & the Teensy Audio Adapter to be on separate buses in my initial design. This is no longer absolutely required, as the Teensy Audio Adapter is now managed by a separate T4.0, with the two Teensy processors interconnected with a share serial port running at 500kbps.


1740588354823.png
 
No idea. As I said, try 1MHz.

You have tracks too close to the big round holes. Machining these holes could touch these tracks depending on tolerances on everything: dimensions, positioning on the machine, tools used, and so on. And imagine you have to make these holes bigger for any reason, after receiving hundreds of them, you have no margin.

The holes are large clearance holes for plastic mounting pillars and I understand that boards are drilled before processing. Therefore there should be no issue, although after finding a major error on that board due to mirroring (again!) I will put a prohibited area around them for Mk6.
 
@AJL Electronics: In my current TeensyMIDIPolySynth project, I make use of the TFTM070-5 from buydisplay.com (see spec below), which is connected to & driven by a T4.1. On my original wire-wrapped prototype of the project, the display worked like a charm. However, when transitioning to a formal PCB, I encountered lots of challenges (my own fault) getting the display to work reliably. After (finally) succeeding, I believe that the major challenge to be addressed was cross-talk between signals due to the blazing speed of the T4.1 combined with the 3.3VDC level signals. The eventual solution was to include 100 ohm resistors inline with the MOSI & SCK signals (placed as close as possible to the T4.1, as suggested elsewhere on this forum, using some value between 100 ohms & 220, experimenting to see what value works best) to reduce ringing. Maybe you could try splitting these two signal traces on your PCB & inserting similar resistors in series to see if that helps.

Code:
         Display options (ER-TFTM070-5):
            Interface:               Pin Header Connection-4-wire SPI
            VDD:                     5.0V (can always change the jumper later to power from 3.3VDC)
            Touch Panel:             7" Capacitive Touch Panel with Controller
            MicroSD Card Interface:  Pin Header Connection (not useable - see display docs)
            Font Chip:               (none selected, but you may want to make use of their custom fonts, so select appropriately)

Mark J Culross
KD5RXT

P.S. I should note that I am using the RA8875 library that is installed with TeensyDuino, & it also works like a champ. MJC

That's very helpful and I will experiment further. Is the touch panel the GS1680 type? I have had zero luck in getting mine to work, but persevering with it when other jobs are sorted.

Fonts wise, I could do with one a third smaller than standard. The smallest is far too small and the standard font only allows just over 40 characters. For RTTY it is useful to be able to display 66 characters. The Sumotoy fonts are all very blocky and far too large too.
 
I forgot to include the pertinent portion of my PCB schematic for reference.

Mark J Culross
KD5RXT

P.S. Note that I am using MOSI1, MOSI1, CS1, & SCK1 on the T4.1, but that was to allow the RA8875 display & the Teensy Audio Adapter to be on separate buses in my initial design. This is no longer absolutely required, as the Teensy Audio Adapter is now managed by a separate T4.0, with the two Teensy processors interconnected with a share serial port running at 500kbps.


View attachment 37052

This was an irritation here too, as I was using the secondary SPI on the 3.6 to avoid the Audio board. Now of course the Audio board uses it and the SPI goes back to convention. It is going to need yet another PCB redesign to use it in this project but maybe I should be satisfied with one fully functional unit, when I get there. ;-)
 
I run the 7" RA8875 over fairly long lines of 5+ inches at full speed on a couple of different Teensy 4.1 boards. I do use series 56 ohm resistors on the CLK and MOSI near the Teensy 4.1 and have found them necessary to use. Anything in the 50-100 ohm should be OK.

If you have a good magnifier, it isn't too hard to cut a section out of the trace with an X-Acto knife, scrape some solder resist off each side and solder in some 0603 resistors. Been there, done that.

SPI Series Resistor Modification.jpg


I run the RA8875 on SPI1 to separate it from anything else on the main SPI bus as the RA8875 doesn't like to play nicely with others when it has to share an SPI bus. One of these systems also supports the Teensy Audio Adapter SD card as well as Flash memory on the main SPI.

For software, you should be using the RA8875.h library that comes with Teensyduino found here or one of the mjs513 branches. https://github.com/PaulStoffregen/RA8875/tree/RA8875_t4/

Your can use the ILI9341_fonts.h fonts with this display. The touch on the 7" uses the FT6206 controller and it is managed by the RA8875 chip.
 
Back
Top