Problem of overriding touches in menus selection - TFT display

Mark,
using RA8875 with FT6206 has always worked for me and doesn't frighten me at all,i assume it,used it for about one year with no problem,
but if you want me to have exactly the same configutation,so i'll take out of my stock another teensy 4.1
and wire exactly like it is in you template,and pull away for a while the FT6206.
The reason i adapted your sketch to my settings is because i was using a pcb board that i made specially with those settings
for a TDM concept,using 2X cs42448 + 1 Sd card + 1 display RA8875,so it was impossible to move the wiring.
After i made the tests,with your wiring, i will tell you the results.

@AntiLoop:

Thanks, that will be a very valuable test.

At the risk of being repetitively redundant (LOL), I'll repeat again: you should not need to add anything over & above the support provided by the RA8875 library installed with TD, which provides the ability for both writing to the display (which you have working), and receiving touch inputs from the touchscreen (which you're looking to get working). Fright or no fright, please just try to use the capability provided by the RA8875 library installed with TD. You'll find that it works very well (without any additional installations/additions/help) !!

And, to @KurtE's point about the display's SPI implementation (a common problem/error with some SPI devices) not playing nicely with other devices on the same SPI bus (another excellent point by @KurtE), that is exactly why I connected my RA8875 display to its own SPI1 bus with no other sharing devices (on the initial implementation of my TeensyMIDIPolySynth, my PJRC Teensy audio adapter was (by default) on the primary SPI bus, completely separate from the RA8875 display...see below where I describe how I've split display processing and audio processing, but I retained the separate SPI bus configuration in case I wanted to recombine these two devices into a single Teensy in a future project). I had absolutely no trouble with either device (display or audio) using this configuration (in fact, everything worked extremely well connected like this...the primary reasons for splitting into separate Teensys was to reduce noise in the audio processing chain, and to allow more audio objects & a higher poly count, which were each previously limited by the amount of RAM1 when a single Teensy supported both devices !!).

The RA8875 7" touchscreen display on my TeensyMIDIPolySynth (TMPS) shows and takes input from hundreds of buttons & hundreds of sliders spread across more than 25 menu screens in real-time, all while receiving & sending real-time MIDI messages among & between traditional circular-DIN MIDI, USB-MIDI, and USBhost-MIDI interfaces. The display portion is hosted on a T4.1 running at the standard 600MHz clock speed, and the Teensy audio interface is hosted on a T4.0 running at the standard 600MHz clock speed. The two Teensy processors are communicating bidirectionally via a shared 500kbs TTL-level serial interface. The Teensy audio adapter connected to the T4.0 implements a 3-voice, 13-poly FM/PM synthesizer, which includes almost 700 audio objects (VFOs, LFOs, modulators, envelopes, filters, effects, noise generators, mixers, etc.), with over 1100 audio patch cords interconnecting everything. All of this is coded in just over 20000 lines of code on the T4.0 & just under 50000 lines of code on the T4.1. I don't mention all of this to brag in any way, but rather to show that the Teensy and the RA8875, when configured together properly, can & do perform very well !!

Looking forward to your reported results (& still looking for a copy of the sketch that you are testing with so others can reproduce the condition(s) that you are troubleshooting) . . .

Mark J Culross
KD5RXT
 
Last edited:
Maybe be you foresee a little explanation with SPI,i have on this PCB an SD card with those settings:

Code:
//----------------------------------------- 
//-------------SD CARD SETTINGS------------
  Serial.print("Initializing SD card...");//CS=38 / MISO=39 / MOSI=26 / SCK=27
  bool ok;
  const int chipSelect = 38;
 
  SPI1.setMISO(39);
  //SPI1.setMOSI(26);
  //SPI1.setSCK(27);
  SPI1.begin();

  // Different SPI port (Teensy 4.1 SPI1 is MOSI:pin26, MISO:pin1, SCL:pin27)
  ok = SD.sdfs.begin(SdSpiConfig(chipSelect, SHARED_SPI, SD_SCK_MHZ(16), &SPI1));

 if (!ok) {
    Serial.println("initialization failed!");
    return;
  }
  Serial.println("initialization done.");
 
Ok it's working now,it was the Sd card conflict,display & touch working,
i'm on discovering you template..back soon...
I didn't connect to the BL pin 14,so your blacklight control, isn't it a simulation?
I see your menus are not overriding together,they are coordonate separated,your sliders look good,
they move smoothly,i like that :)
 
Last edited:
I didn't connect to the BL pin 14,so your blacklight control, isn't it a simulation?

@AntiLoop:

Good to hear that things are working for you.

On this particular display, the backlight is completely under software control, so you should not have to connect anything additional to make use of that capability. The sliders in the example template sketch do control the actual backlight level. Looking at the display datasheet, the comment on pin 14 BL_CONTROL says "Backlight control signal input. When using the internal PWM signal this pin floating." (bold added).

Mark J Culross
KD5RXT

P.S. Please feel free to use any of the capabilities in the example template sketch in your projects (either as is, or modified to suit your purposes) as you see fit. If you do happen to publish anything for others to make use of, including a simple "original slider & button implementation provided by MJC (KD5RXT)" attribution would suffice. MJC

P.P.S. You did remove the extra/unneeded touch panel driver, right ?!?!? MJC
 
Last edited:
So with your template settings the FT5206 was working for me,but some times i'm will not be using the I2C port but I2C1,were can i
change some settings like: &Wire1... in wich library,RA8875 of FT5206?
 
So with your template settings the FT5206 was working for me,but some times i'm will not be using the I2C port but I2C1,were can i
change some settings like: &Wire1... in wich library,RA8875 of FT5206?

When I have questions about what function calls are provided by a library, I go take a look at the .h file for the library, and look at the function definitions in that file. In this case, looking at C:\Program Files (x86)\Arduino\hardware\teensy\avr\libraries\RA8875\src\RA8875.h, you'll find the function that I believe you are looking for as: void setWireObject(TwoWire *wire) {_wire = wire; }.

Hope that helps . . .

Mark J Culross
KD5RXT
 
Back
Top